Back up all data if you haven’t already done so. There are ways to back up, even if you can’t log in. Before proceeding,you must be sure you can restore everything to the state it’s in now. If you’re not sure you can do that, STOP.
The procedure below may spare you the need for a clean reinstallation of OS X. If you don't feel comfortable carrying it out, don't. try.
Briefly, you need to delete the following file:
/var/audit/current
If you already know how to do that, you can skip the rest of this message. Do it, and try again to log in.
Boot in single-user mode by holding down the key combination command-S at the startup chime. If you’re using an external USB keyboard, it must be plugged directly into a built-in port on the Mac, not into a hub. Release the keys when you see a black screen with scrolling white text. In this mode, there’s no graphical interface; just a command line. Initially, you can’t make any changes to files.
When the text stops scrolling, and you see a line ending in a pound sign (“#”), type the following command:
mount -uw /
You must type the command exactly as given, with no mistakes. If you don’t feel able to do that, STOP. At this stage, no harm will be done if you make a mistake, but later, it will be. Press the return key.
Next, type the following command:
rm -i /var/audit/current
Press return. You should get the following output:
remove /var/audit/current?
If that's not what you get, STOP. Type the single letter N, press return, and try again. Otherwise, type the single letter Y and pressreturn.
Finally, enter the command:
exit
Press return. The text will start scrolling again, and then the system will reboot. Try again to log in.
Credit for this solution to ASC user AnthonyTW.