My Mac Locked Me Out & Threw Away the Key

| Analysis

I am close to my Mac. It’s a serious relationship. So when my iMac locked me out of the login screen and threw away the key, I was in various stages of grief. Denial, anger, and depression. But I remained calm and solved the problem without an OS reinstall. Here’s how it happened.

It was a Sunday afternoon, September 25. I wasn’t in the mood for the NFL yet and held my breath, suspecting the Broncos would lose again. (They did.) So I decided to work on some iMac housekeeping.

Previously, I noticed that I had a stray Input Manager in /Library/InputManagers. I knew that these are bad news items, and I thought I had cleaned them all out. I even chatted with our Dave Hamilton after MacGeekGab #352 about how useful his podcast was to remind me about them. (If you want to read more about these tricky little critters, here’s the full story by Adam Engst.)

However, just before I cleaned out that folder, I had noticed that Lion (10.7.1) was being stupid about displaying the disk space used on my Time Machine external drive. (LaCie, d2 Quadra). So I did a Get Info on the Time Machine folder itself. This takes some time, so I went back to my clean up of the InputManagers folder. Finally, the Get Info was taking so long, I just decided to go ahead and reboot.

After the login screen came up, I was locked out. No keyboard or mouse response whatsoever. I was shoved out the door, and my Mac had thrown away the key.

iMac login

Where you’re locked out here, it’s a scary moment.

Believe me, it’s a very, very bad feeling.

Of course, my first reaction was suspicion of a loose USB cable to my keyboard, but deep in my heart, I knew this wasn’t going to be the answer. It was fine 20 seconds ago. And indeed, that wasn’t it. Guessing that Lion had gone wonky, I rebooted again.

Same result. Oh, crap. I took a deep breath.

Diagnosis

My next guess was that my fiddling with an input manager had caused a problem. I didn’t believe that either, but I figured that putting things back the way they were before the reboot is never a bad idea. But how to do that? After reflecting for a second, I remembered that I had been using screen sharing from my MacBook Air, and it was all set up. So I went to the MBA and, sure enough, I was able to log in remotely. I went ahead and put the “1PasswdDlM” file back and rebooted the iMac from the MBA.

Screenshare

OS X Screen Sharing can be a life saver.

Same result. I was still locked out. I sat staring at my iMac thinking about my options, whether I wanted to do a Lion restore, recalling the state of my Time Machine backup and pondered how my Sunday was soon to become absolutely shot. Forget about the Bears and the Packers.

As I sat, with head in hands, glaring at the Mac that had unceremoniously jilted me, my eyes wandered over to the LaCie external drive. The activity light was still continuously flickering. That shouldn’t have been happening after a reboot. WTF.

From deep in my subconscious, after 27 years of using Macs, I recalled that maybe, just maybe, a FireWire drive that’s hung up can block keyboard input. Don’t ask me how I knew that. It was just an intuitive guess. So I reached over, turned off the drive and rebooted.

Login was normal.

At this point I felt like I was half idiot and half genius. My smugness was quickly erased by the realization that had I reinstalled Lion, that attempted fix would have failed spectacularly (had I not cycled the external drive).

Recommendations

I can offer some humble recommendations.

  1. Don’t obscure the disk activity light on your external drives. That light is a great diagnostic tool.*
  2. Leave Screen Sharing on. (System Preferences -> Sharing.) That way, if you have another Mac, you can access a sick Mac with a ful GUI interface.
  3. If you have a problem similar to this, don’t rush to reinstall the OS. Even if you’re in a panic mode. Sit back. Ponder. Make some tea. Try to think of things that you can do that don’t involve a reinstall. For example, try disconnecting all external devices, except the keyboard, plug in a wired mouse and reboot.

This time, I got lucky. Maybe, just maybe, it’ll help you someday.

Oh, and by the way. Apple? Is there a way to fix this long-time Mac problem?

__________

* Disk drive makers: Did you hear that? Please don’t try to save 50 cents by deleting that light, tied to disk activity. We need it.

Sign Up for the Newsletter

Join the TMO Express Daily Newsletter to get the latest Mac headlines in your e-mail every weekday.

Comments

Nemo

John:  Admit it.  It was, was it not, that relationship that you started with that sexy, younger MacBook Air that caused the domestic rift with your iMac?  Your promiscuity with technical devices is well noted on these very pages.  It seems that your promiscuous eggs have hatched and come home to roost.

And don’t expect your iPad to continue to put up with your flirtatious behavior toward the iPhone 5.

John Martellaro

I am deeply ashamed.

Lancashire-Witch

“Make some tea.”

That’s the one I recommend.

It provides refreshment - and 15 minutes of sound, analytical thinking time. For best results I use Twinings English Breakfast tea.

geoduck

Leave Screen Sharing on. (System Preferences -> Sharing.) That way, if you have another Mac, you can access a sick Mac with a ful GUI interface.

You know, I’ve always considered ScreenSharing or any VNC a vulnerability so they are always off, but then I am a bit obsessive about such things.

For best results I use Twinings English Breakfast tea.

I like Cream Earl Grey, but for caffeine free a nice cup of Roobois is good.

Lee Dronick

I was hoping that this story addressed an occasional problem I have with Lion on my MacBook Pro.

1. Start the Mac from a shutdown

2. Get to the login screen

3. Choose the account

4. Enter a few password characters

5. Get the spinning rainbow wait/beachball of death

6. Eventually I have to shut down via the start button

7. Problem may or may not reoccur with the next start or may be weeks.

John Martellaro

Sir Harry.

I can think of a few things, and others may have some additional thoughts.

1. Maybe there’s a process that’s starting up right after you boot, and it’s stealing CPU time.  Try waiting for a few minutes and see if you still get the spinning beach ball. Afterwards, check the logs to see what stuff gets launched at boot.

2. Try, as I did, disconnecting external devices and see if the problem disappears.

3. I don’t think login items start to launch until you’ve logged in, so that would be low on my list.

4. Turn off any sharing functions you may have on. Or just disconnect from your network before rebooting.  The Mac may be searching for a server at boot time, and the CPU in the MBP may get tied up.

5. Check to see if, maybe, a Time Machine backup had just started.  That would account for seemingly random delay in login.

It’s a UNIX system, and logins get lower priority when the OS is running something that it thinks is a higher priority process. Even if you are god, master, owner, and the only registered user.

Anyone else have any ideas?

Lee Dronick

John I appended the log entries from the startup time.

There were no peripherals attached, just the power cord.

TimeMachine was/is turned off. Most of the time I don’t have a disk attached to the MacBook Pro. I periodically make a mirror backup using Carbon Copy Cloner. Important files get manually copied to a drive attached to the AirPort Extreme

It isn’t consistent making it hard to troubleshoot.

I need to check the other accounts to see if they have a startup item. They shouldn’t.


9/26/11 1:33:17.154 PM com.apple.launchd.peruser.503: (com.apple.quicklook.32bit) Unknown key for boolean: DisallowDataExecute

9/26/11 1:33:17.154 PM com.apple.launchd.peruser.503: (com.apple.ReportCrash) Falling back to default Mach exception handler. Could not find: com.apple.ReportCrash.Self

9/26/11 1:33:17.645 PM SystemUIServer: In ‘__CFPasteboardCopyData’, file /SourceCache/CF/CF-635/AppServices.subproj/CFPasteboard.c, line 2372, during unlock, spin lock 0x10bd59a78 has value 0x0, which is not locked.  The memory has been smashed or the lock is being unlocked when not locked.

9/26/11 1:33:20.675 PM com.apple.dock.extra: Could not connect the action buttonPressed: to target of class NSApplication

geoduck

Check to see if, maybe, a Time Machine backup had just started.? That would account for seemingly random delay in login.

I also have occasional spinning beach balls. Not just at startup but randomly throughout the day. Almost always when I look at the top of the screen the TimeMachine icon is spinning.

Lee Dronick

The only startup item was iTuneHelper. I removed that so I will see of that was the culprit. Usually I don’t run as admin and from startup it opens to a list of users.

I love that line from the log “The memory has been smashed or the lock is being unlocked when not locked.”

John Martellaro

Sir Harry:  Based on your log, I’d try taking the Mac off the network before you reboot to see if that helps.
The way I do that for convenience is to create a location, in the network preferences, called “Off the Air”.  Then it’s easy to select in the Apple menu -> Location.

Gareth Harris

IIRC, version 6 UNIX was distributed with all source code on a 2.5MB RK05 disk pack. Version 7 is considered an improvement over not only its predecessors, but also its successors. I think the OS kernel was about 10,000 lines.

Now we have millions of lines of code which are inhabited by “ghoulies, ghosties, long-leggidy beasties and things that go bump in the night.”

I would recommend booting into single user mode and fixing things by hand EXCEPT that I have written, modified, cloned OS, including UNIX for 40 or 50 years and even I am afraid to tinker in OS X in single user mode.

My suggestion?: Take it out in the pasture and put it out of its misery.

What happened to “simplify and add lightness”—Colin Chapman, ???

John Martellaro

iTunes Helper checks to see if you have connected an iOS device and have asked that iTunes be launched when the device is connected.  I’ve had a few problems with it in the past.

If you always have iTunes running before you connect an iOS device, I don’t think you need it.

Lee Dronick

iTunes Helper checks to see if you have connected an iOS device and have asked that iTunes be launched when the device is connected.? I?ve had a few problems with it in the past.

If you always have iTunes running before you connect an iOS device, I don?t think you need it.

All of our iPods, iPhones, and the iPad are synched from a different Mac so yeah I don’t need the iTunesHelper. I do use ImageCapture to transfer photos from my iPhone onto this MacBook Pro.

Thanks for the help thus far, and any other suggestions that may come in.

jbruni

John, don’t forget single-user mode (hold down command-S while booting). You can right many wrongs when nothing but a shell is running.

webjprgm

I was hoping that this story addressed an occasional problem I have with Lion on my MacBook Pro.

If the system is hung, you can hit ctrl-opt-cmd-shift-period. As of Lion, that will save a tar ball of diagnostics (including system and crash logs, but also info about the state of running processes) in /var/tmp/sysdiagnose….tar.gz.  Then you can send that to Apple in a bug report, or you can poke around in there yourself to see where all the running processes are stuck (the file is “spindump.txt” inside the tar ball).

Leave Screen Sharing on. (System Preferences -> Sharing.) That way, if you have another Mac, you can access a sick Mac with a ful GUI interface.

You know, I?ve always considered ScreenSharing or any VNC a vulnerability so they are always off, but then I am a bit obsessive about such things.

Me too, though at work it’s super convenient. At home I even turn off file sharing except when I am about to transfer a file.  I don’t trust my wifi to be all that secure.

Lancashire-Witch

Looks like it’s time to make some tea, Sir Harry.

If the spinning ball doesn’t disappear in 15 minutes then not even tea will fix it.

I sympathise - I have a couple of weird problems since installing Lion on an iMac.

There you have it - Tea & Sympathy.  grin

Lee Dronick

Looks like it?s time to make some tea, Sir Harry.

Time out for Tetley

I forgot to mention that this started to occur after I installed Lion. That could be coincidence, but perhaps not. What ever it may be it is all part of the rich tapestry of life

ron1amr

From what you are saying in your article John I guess you may not have had this problem prior to Lion install. I downloaded Lion and sometimes I wish I hadn’t. Although there are some very nice features, there are also the annoying ones like the inability to have full control of your mac like in the past. I feel mac needs to make necessary updates like even simple things like turing off your mac and not always having to click the tick box. The thing with Lion is if you have a problem and last solution on a big freeze (which I have only had since installing Lion) turning the power button off. On reboot everything that was happening will resume where you left. And so again it takes forever for your machine to be up and running. I must say in my 3 years of owning my 24 inch mac I have only had my computer freeze since initialling Lion. So I think mac needs to make very important updates on Lion.

Lancashire-Witch

There’s no doubt that Lion is the flakiest OS upgrade I’ve experienced.
Here’s an example-
I’ve had to attach a 3rd party USB mouse because the magic trackpad occaisonally loses it’s Bluetooth connection. Trying to reconnect can cause more problems. In the worst case the Bluetooth hardware can disappear - it’s not visible in About this Mac:more info:system report. The solution: remove the batteries from the Keyboard and Trackpad and reboot.

Lancashire-Witch

There’s no doubt that Lion is the flakiest OS upgrade I’ve experienced.
Here’s an example-
I’ve had to attach a 3rd party USB mouse because the magic trackpad occaisonally loses it’s Bluetooth connection. Trying to reconnect can cause more problems. In the worst case the Bluetooth hardware can disappear - it’s not visible in About this Mac:more info:system report. The solution: remove the batteries from the Keyboard and Trackpad and reboot.

Lancashire-Witch

There’s no doubt that Lion is the flakiest OS upgrade I’ve experienced.
Here’s an example-
I’ve had to attach a 3rd party USB mouse because the magic trackpad occaisonally loses it’s Bluetooth connection. Trying to reconnect can cause more problems. In the worst case the Bluetooth hardware can disappear - it’s not visible in About this Mac:more info:system report. The solution: remove the batteries from the Keyboard and Trackpad and reboot.

Lancashire-Witch

There - it just happened again.  3 times I tapped the trackpad - nothing happened, then the grey window “Trackpad - Connection lost” appeared.

Lee Dronick

There?s no doubt that Lion is the flakiest OS upgrade I?ve experienced.

As I have said a few times it isn’t fully baked. It should have had a few more minutes in the oven.

There are some real nice things about it, but there are too many flakes. I wonder how much of it is the result of maybe not having Steve hovering constantly over the project.

I am sure that they will have an update sooner rather than later.

geoduck

There?s no doubt that Lion is the flakiest OS upgrade I?ve experienced.

I am sure that they will have an update sooner rather than later.

You guys are really not making me want to leave Snow Leopard. I mean I’d like to try Lion but I gotta tell you, so many horror stories….

webjprgm

In general I prefer polish releases like Snow Leipard over feature releases like Lion because of issues like these. My own experience has been mostly positive, but I have seen a few glitches. If you don’t like that, wait for the next update 10.7.2 and hopefully everything will be stable then (or 10.7.3?). But they did make a lot of changes this release.

I rather like resume, since it saves me from needing to reopen the same apps everytime I reboot. (I’d debated for years whether to put Mail and Safari in my login items, and never got around to it.)

Lee Dronick

You guys are really not making me want to leave Snow Leopard. I mean I?d like to try Lion but I gotta tell you, so many horror stories?.

Overall I like it and there are some nice touches. However, if your Mac is mission critical then as webjprgrm said wait for the next update. I probably won’t install Lion on my wife’s MacBook Pro until next spring when her college classes are over and she gets her new degree. By then Lion should be quite stable.

Lancashire-Witch

You guys are really not making me want to leave Snow Leopard.

Overall I like it and there are some nice touches.

I agree with Sir Harry.  Except that I’m not installing Lion on my other 2 machines until I see the 2 flakes that cause the most trouble have gone on my iMac. The first update didn’t resolve my issues. No deadline. Of course I could try a clean re-install on my iMac. (I must buy more tea)

Log-in to comment