Can't log in until after reboot I have an iMac running OS X Mavericks and OS X Server. The OS X Server services running are Time Machine and Xcode.

A couple of times per week, the iMac gets into a state where I cannot log in. I can select my user account on the login screen, and I can enter my password, but the password field just shakes as if I have entered the wrong password. This happens for each of the three user accounts on the machine.

After rebooting, we can log in for a while (a day or two), and then the can't-login state recurs.

I don't know whether this is related, but sometimes this same iMac gets into a state where everything is really slow. Activity Monitor shows that CPU usage is low, memory pressure is low, disk is not full, but everything seems to be running at 5% normal speed. It's fine after a reboot.

When the iMac is in one of those bad states, I can still ssh to it from another Mac, and I can "sudo shutdown -r now" to restart it.

Any ideas about what is going wrong, or how to diagnose the problem?

Update:

After uninstalling an old version of VirtualBox about a week ago, the problem hasn't recurred.  Maybe its kexts were causing problems?
From your symptoms and the lack of any other any evidence within your
log files,
the origin of your problem is a keyboard mode switch.
This keyboard mode switch will only make your password wrongly typed through the login window and not through an ssh access.
This remapping of your keyboard might have been caused by command ⌘+space (select previous input source) or command ⌘+alt ⌥+space (select next input source).
The 1st one of these 2 key combinations may be easily entered by typing the spacebar on one of its left or right borders, thus pressing the command ⌘ at the same time.
This shortcut is defined in:

System Preferences &gt; Language &amp; Text &gt; Input Sources


This keyboard remapping might also have been done by any other keyboard shortcut defined by Xcode or another application.

To avoid to be trapped by such an invisible keyboard remapping or misbehaviour, here are 2 personnal trick.


Within System Preferences &gt; Users &amp; Groups &gt; Login Options,
for Display login windows as:
select Name and password.
Hence you will have a possibility to diagnose any wrong mapping or any other misbehaviour of your keyboard within the field Name:. You might try your password there and have a total feedback.
Within System Preferences &gt; Users &amp; Groups &gt; Login Options,
activate the function Show Input menu in login window. This 2nd trick won't help you diagnose a dead key.