You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Fix for El Capitan stuck at login

Last month I updated to 10.11.1 and my system would no longer log in. I would enter my password correctly and then the cursor would change to the spinning pinwheel and just sit there forever. The only way out was a power off reboot. I later found that when it was in this state I could SSH into it from another machine, and the system log revealed that /usr/libexec/lsd (the Launch Services Daemon) was crashing repeatedly. I searched these forums and others and found lots of ideas, none of which helped.


No problem, though, I've got hourly time machine backups, right? Well, no. Apparently El Capitan had not been doing the hourly backups so my most recent backup was from sometime in October, which was a month old at the time. Not good.


Fortunately, I had an older boot drive that I put in an external enclosure and was able to boot from that to experiment. The drive I normally boot from was fine -- permission checks and disk repair and all that all came back good, and I could read and write files to it just fine.


After lots of experimentation and frustration I was just about to give up and add another drive to do a clean install and start moving everything over -- a process that I *really* hate doing. But one last web search and a bit of luck gave my one last shot at fixing it.


To do this, you'll either need to be in a recovery console, or ssh into the machine, or boot from an external drive, or otherwise somehow get to a command prompt. Once you are there, do this:


find /private/var/folders/ | grep com.apple.LaunchServices | grep csstore


Note that if you boot from an external drive, you need to run that command against the boot drive you are trying to fix. Just add the /Volumes/Whatever_Your_Boot_Drive_is to the path, like so:


find /Volumes/YourBootDriveHere/private/var/folders/ | grep com.apple.LaunchServices | grep csstore


That will find the cache databases that Launch Services is using. They will have long and random-looking names that end in csstor. Make a note of every file shown, then delete them, by a command like this (obviously using whatever paths the above command found instead of this example):


rm /private/var/folders/cd/someLongRandomNameHere/someFolderNumberHere/com.apple.L aunchService-whatever.csstore


If you're more cautious, you can rename them instead of deleting them, so you can put them back if necessary. That would look like this:


mv /full/path/like/shown/above/to/whatever.cssstore /full/path/like/shown/above/to/whatever.csstore.backup


After removing or renaming those files, restart your Mac. You should now be able to log in. Or at least, that's what finally worked for me. The login did take longer than normal -- a few minutes -- to rebuild those files, but the desktop finally appeared, and now I'm back to running on my normal boot drive.


Hopefully this helps someone.

Mac Pro, OS X El Capitan (10.11.2)

Posted on Dec 13, 2015 3:47 AM

Reply
123 replies

Nov 21, 2016 10:43 AM in response to robertk1

The issues described are typically to do with the LaunchServices database; the manual methods here do work well but do require some more technical knowledge incase it all goes wrong.


I had this issue and quickly resolved this by running Onyx - http://www.titanium.free.fr/ - and running (under utilities) the LaunchService rebuild (and also fix your disk permissions while you're at it). This took about 10-15mins and all is now working as expected.

Jan 19, 2017 2:09 AM in response to robertk1

Robertk1,

Your absolutely straight forward guidelines work seamlessly and correct the issue even on 10.11.6.

The latest Security Update 2016-003 Supplemental Update gave me a hard time yesterday afternoon, letting me wonder about what's next, since no other solution could make me login into my account.

I left the office troubled but relieved, since I saw I could login with the root account I had well before activated, and was also able to create a new account that worked perfectly.


Today, I tried to lean on the Onyx solution but felt once more helpless after the respective rebuild that was mentioned above, proved unsuccessful in letting me in


After that, I restarted (once more...) and used the Terminal to enter the proposed commands and backed up the files found.


Restarted and violá! A happy Mac user again, greeting Robert and this wonderful community!

Feb 2, 2017 6:43 PM in response to robertk1

Solid thanks mate!

I'm running a mbp 17" early 2011 and was presented with this problem after updating to el captain os x 10.11.6

after a few unsuccessful tries via the terminal recovery mode, I started working through the single user mode (cmd-s on startup), followed your steps, and after a few attempts it finally worked and booted successfully.


for some reason, you have to trust that the path is being type, because it too long for the prompt. also you have to mount the disk and make it writeable, however those commands are included when you first boot in single user mode.


thanks again!

Feb 9, 2017 4:14 AM in response to robertk1

I recently had this problem too. On my MacBook Pro, I was updating it. I had MacOS Sierra beta but not the real one. On the startup screen (white background, gray apple logo), it was stuck at a very low percentage, I let it sit for 5 minutes, and that was it! I was very happy. However, when I went to login as admin, I just had a loading bar. I simply just waited for a while and everything was back!

Mar 7, 2017 3:08 AM in response to robertk1

ok so only 160 other folk have this question as well !!


Many , many thanks for posting this. Your solution worked for me using Terminal in Restore mode. The only addition, mentioned amongst these posts, is that I had to do the "find" on "/Volumes/MyHardDiskName/private/var/folders" ..etc..etc, even though I was doing this on internal hard drive. This revealed ALL of the .csstore files. (if I did the find on /private/var/folders - only one .csstore file showed up).


Never usually play around in this much Unix - many thanks again.


I only did a "recommended" Security update to El Capitan..............will I dare do another one !?

May 5, 2017 10:00 AM in response to robertk1

Hi,


I'm trying to follow your recomendation. I'm not a terminal expert but I can do simple tasks. I'm trying to figure what is the right way of write the name of my volume in the path "/Volumes/YourBootDriveHere/private/var/folders/ | grep com.apple.LaunchServices | grep csstore". My hard drive names is: ALICASTRO iMAC


Right now I am in my Mac Book Pro accessing my iMac hard drive in target mode. I've done all the key commands and there's no way I can make the computer boot, not in safe mode, just stuck in the apple and the the imac keeps rebooting and then again the apple and the rebooting endlessly.


My hard drive is in perfect condition. I even copy some important files to my laptop as a back up. Any suggestions?

Thank you

Jun 20, 2017 4:02 PM in response to robertk1

Sir:

Thank you for this post.


This actually works if you can't get to the login as well.

My startup process stalled after the hardware check and never got to the login prompt.

I have been going from startup disk to startup disk on my MAC Pro.

A call to Apple Care and many attempts to reinstall the OS X did not work.


I finally broke down and tried your fix.

I have been able to now restore not one but two startup disks with different versions.


Thank you very much.

Jun 20, 2017 6:30 PM in response to robertk1

Sir:

Thank you for this post.


This actually works if you can't get to the login as well.

My startup process stalled after the hardware check and never got to the login prompt.

I have been going from startup disk to startup disk on my MAC Pro.

A call to Apple Care and many attempts to reinstall the OS X did not work.


I finally broke down and tried your fix for El Capitan.

I have been able to now restore not one but two startup disks with different versions.


Thank you very much.


For users of earlier OS X, the file names to delete for "resetting launch services" is different.

see http://www.thexlab.com/faqs/resetlaunchservices.html

Jul 11, 2017 6:59 AM in response to robertk1

I just fixed the issue with your resolution. So thanks for that.

But ssh wasn't active, guest wasn't activated and I didn't have a boot-drive.


But I started the "faulty" mac in Target Disk Mode. (Hold "T" while booting)

And used a thunderbolt cable to connect the faulty MBP to another MBP.

Then the hard drive of the faulty MBP shows as an external drive.

So I could just execute the commands on this drive.

"/Volumes/TargetDrive/private..."


I did had to change the name of the drive in Disk Utility because it had the same name as the drive in the second MBP.


But I was able to fix the issue in a couple of minutes.


Thanks.

Oct 14, 2017 7:15 AM in response to robertk1

I have the exact same problem. I didn't have Guest Account active however, from the login screen (while the gearwheel is spinning) pressing the play button (the function key at top of keyboard) opened iTunes and gave me a menu bar. I could then go to the Apple menu and open System Preferences and check the "guest login" check box. Oddly, I was also able to fire up Safari by selecting 'Send Feedback" from the iTunes menu, which also worked perfectly.


However I tried the Terminal trick within the guest account, switching users and deleted the files shown. Unfortunately it didn't work. I also notice that even if I create a new account and try to log in to that, I get the same issue. So I don't think it's a specific file within each user account's directory. The only account that seems to work perfectly, is the guest account. I am completely stumped. 😕

Jan 7, 2018 4:29 PM in response to robertk1

Thank you very much robertk1!


This worked for me too on 10.11.6. Was struggling to solve a problem for three days after the security update 2017-005.


I deleted those files via “test“ account, that I luckily have for such occasions. Then rebooted, logged in and after few seconds the desktop showed up.


Thank you again for your contribution.


Roger

Fix for El Capitan stuck at login

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.