My iMac is stuck in a login bootloop. After entering the password, I see a white screen for a second and then I am thrown back to the login screen again.
I tried the same in safe mode, and it behaves the same.
I also tried resetting the PRAM, and it behaves the same even after that.
Since this is a hand-me-down, I am not sure of the version its running. I am ok with data loss too.
Best Answer
Boot to single user mode (hold cmdS while booting), delete the setup file and try making a new clean admin account.
At that point, assuming the OS is minimally functional, you can make a new admin account (call it test12345 or something to avoid hitting an existing user account) Optionally, you can delete the old user accounts and user home folders before you type exit above.
Perform the two commands above for each user you want to remove from the system. You can also delete things more cleanly by logging in to your new admin account and deleting the old users from the graphical tool in system preferenes.