Playing with Skype and iChat, my Mac froze and I had to force shut down. At the login window prompt, I typed my username and password and pressed Enter as usual, yet only the Time Machine Desktop screen (the one with the galaxy-like picture and stars of Mac OS X 10.5 Leopard) showed. It stayed like that forever. Eventually I found that pressing Command-Option-Esc and waiting some 30 seconds returned me to the login screen. From there, the story repeats.
Yet that was handy to reboot or shut down without forcing shut down. Repairing disk and permissions, running DiskWarrior, resetting PRAM, etc. did not help. I even trashed the preferences for Finder, Desktop and Dock. Even replaced the full Library and Desktop folders inside the user account suffering the issue from the latest Time Machine backup. Resetting the login password (after booting from the Mac OS X DVD) did not help either. The issue remained, but amazingly only on the standard booting account, but not on another extra account created for troubleshooting. In such a case, the Mac booted fine. Weird!
Logging in with the troubleshooting account, I found that right at the time of the failed login from the standard account, Console said something about Keychain. Indeed, some caches were corrupt, but Cocktail could not fix them.
Here's how I fixed the problem...
/sbin/fsck -fy
Make sure to type the line exactly as shown -- you're running as the root user, and any mistakes may cause big problems. This repairs disk permissions. Run it until you see a message stating that no problems were found.$ /sbin/mount -uw /
$ cd /Library/Preferences
$ rm com.apple.loginwindow.plist
$ rm com.apple.windowserver.plist
$ cd /Library/Caches
$ rm -r *
$ cd /System/Library
$ rm Extensions.mkext
$ cd /System/Library/Caches
$ rm -r *
$ rebootMac OS X Hints
http://hints.macworld.com/article.php?story=20090729055230625