Restart your computer and press COMMAND + S then this will enter to terminal mode. First you need to mount the "root" path before you can modify the disk.
:/ root# mount -uw /
Now after mounting the root path, you have two option here, factory reset or reset password of a user so you can access the files. Factory Reset In factory reset, all you need is to delete the file /var/db/.applesetupdone then OS X will detect that the system has run the first time (but the data are all intact).
rm /var/db/.applesetupdone
User Reset Password In user reset password, this is what you will do:
  1. go to /Users directory then list the files and folders
  2. whoever you want to reset the password, just type passwd <username>
  3. then this will ask you for the new password and confirm new password
  4. that's it
:/ root# cd /Users
:/ root# ls -lsa
:/ root# password user1
Enter New Password: 
Confirm Password:

:/ root# reboot
then type exit or reboot or restart the machine. then you all good to go...
enlarge
iMac Intel Diagnostic LED's
Posted: 25 Mar 2016, 5:44am - Friday
To observe the LED's you need to apply power to the iMac with the front bezel off. Please ensure you don't touch any part of the iMac or the exposed circuit boards while you have power connected. Locate the Diagnostic LED's between the RAM slots and the SATA connector. The LED's are numbered 1-4 from left to right. You may need to move the SATA cable to get a clear view of the LED's. If you are using this guide for iMac Intel 20" EMC 2210 and 2133 the LED's are located above the SATA connector and not as visible.
  • LED 1 - Indicates that the trickle voltage from the power supply is detected by the main logic board. This LED will remain ON while the iMac is connected to the AC power. The LED will remain on even when the computer has been shut down or put to sleep. The LED will turn off only if the AC power is disconnected or the power supply is faulty.
  • LED 2 - Indicates that the main logic board has detected proper power from the power supply when the computer is turned on. This LED will be ON when the computer is turned on and the power supply is working correctly.
  • LED 3 - Indicates that the computer and the video card are communicating. This LED will be ON when the computer is communicating properly with the video card. If LEDs 1 and 2 are ON and you heard the startup sound, but LED 3 is OFF, then the video card might be installed incorrectly or need replacement.
  • LED 4 - Indicates that the computer and the LCD display panel are communicating. This LED will be ON when the computer is turned on and video signal is being generated. If the LED is ON and there is no image on the LCD display panel, the LCD display panel or inverter might be installed incorrectly or need replacement.
Refence: https://www.ifixit.com/Guide/iMac+Intel+24-Inch+EMC+2134+and+2211+Diagnostic+LED's/7443
enlarge