2011/09/22

Mac OS "login loop" after resetting password

This isn't an Ubuntu issue. But Mac's are a close [distant?] cousin of Ubuntu, in my opinion, due to their freebsd origins.

I needed to reset the password for my CEO's MacBook Pro running Mac OS 10.5. I did so but encountered a login loop at the login window once putting in the new (and correct) password. I would just end up back at the login screen after ten or fifteen seconds. Deleting the following files in these directories solved the issue:

  • /Library/Preferences:
    • com.apple.loginwindow.plist
    • com.apple.windowserver.plist (was supposed to be there but wasn't)
  • /Library/Caches/*
  • /System/Library/Extensions.mkext
  • /System/Library/Caches/*
The Apple Support Communities discussion suggesting this is here. I was lucky and had another computer to ssh into the Mac from and do this without booting back into singleuser mode again. Once these files were removed I was immediately able to login, no problems.

While tailing the system.log during my ssh session, a lot of crashreport crap came up while trying to log in to the [corrupted?] account. The line I focused on follows, I'll include the entire log sample at the end of this post if anyone is actually interested. 
Sep 22 13:41:47 mac0023df830af2 loginwindow[266]: ERROR | -[Login1 setupEnvironment] | Unable to unlock the keychain, SecKeychainLogin returned -2147413984
And to reset a user account's password in OS X or create a new account (Thank you, Google! I forget exactly where I found these instructions, I definitely cannot take credit for documenting this the first time and now can't find it, maybe someone can send or comment a link to the original if you know where it is, I only have my notes from the time I copied it down):

Reset 10.5 Leopard & 10.6 Snow Leopard password
  1. Hold down Command + S to boot into singleuser mode.
  2. fsck -fy (optional, but not a bad idea)
  3. mount -uw /
  4. launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist
  5. ls /Users (if you don't know the exact username)
  6. dscl . -passwd /Users/{username} {password}
  7. reboot
Reset 10.4 Tiget password (way easier!)
  1. Hold down Command + S to boot into singleuser mode.
  2. sh /etc/rc
  3. passwd user
  4. reboot
Creating a new user account from singleuser mode
  1. Hold down Command + S to boot into singleuser mode.
  2. fsck -fy (optional, but not a bad idea)
  3. mount -uw /
  4. rm /var/db/.AppleSetupDone
  5. shutdown -h now (reboot, maybe?)

The entire output from system.log after trying to login to the broken account:



Sep 22 13:41:46 mac0023df830af2 authorizationhost[275]: MechanismInvoke 0x1272d0 retainCount 2
Sep 22 13:41:46 mac0023df830af2 SecurityAgent[276]: MechanismInvoke 0x101670 retainCount 1
Sep 22 13:41:46 mac0023df830af2 SecurityAgent[276]: NSSecureTextFieldCell detected a field editor ((null)) that is not a NSTextView subclass designed to work with the cell. Ignoring...
Sep 22 13:41:47 mac0023df830af2 loginwindow[266]: Login Window - Returned from Security Agent
Sep 22 13:41:47 mac0023df830af2 SecurityAgent[276]: MechanismDestroy 0x101670 retainCount 1
Sep 22 13:41:47 mac0023df830af2 authorizationhost[275]: MechanismDestroy 0x1272d0 retainCount 2
Sep 22 13:41:47 mac0023df830af2 loginwindow[266]: USER_PROCESS: 266 console
Sep 22 13:41:47 mac0023df830af2 loginwindow[266]: ERROR | -[Login1 setupEnvironment] | Unable to unlock the keychain, SecKeychainLogin returned -2147413984
Sep 22 13:41:47 mac0023df830af2 com.apple.launchd[1] (com.apple.UserEventAgent-LoginWindow[272]): Exited: Terminated
Sep 22 13:41:47 mac0023df830af2 OSXvnc-server[270]: OSXvnc-server received signal: 15
Sep 22 13:41:47 mac0023df830af2 com.apple.launchd[1] (com.apple.ScreenSharing.server[271]): Exited: Terminated
Sep 22 13:41:47 mac0023df830af2 OSXvnc-server[270]: Unloading Tiger Extensions
Sep 22 13:41:47 mac0023df830af2 OSXvnc-server[270]: Unloading Jaguar Extensions
Sep 22 13:41:47 mac0023df830af2 OSXvnc-server[270]: Disabling Bonjour Service - dssmacbookpro.nt_wan
Sep 22 13:41:47 mac0023df830af2 OSXvnc-server[270]: Removing Observers
Sep 22 13:41:47 mac0023df830af2 OSXvnc-server[270]: RFB Shudown Complete
Sep 22 13:41:47 mac0023df830af2 OSXvnc-server[307]: Arguments: -rfbport 5900 -desktop dssmacbookpro.nt_wan -rfbauth /Library/Application Support/VineServer/.vinevncauth -donotloadproxy -SystemServer 1 -restartonuserswitch N -UnicodeKeyboard 0 -keyboardLoading N -pressModsForKeys N -EventTap 3 -swapButtons -rendezvous Y 
Sep 22 13:41:47 mac0023df830af2 OSXvnc-server[307]: Main Bundle: /Library/Application Support/VineServer
Sep 22 13:41:47 mac0023df830af2 OSXvnc-server[307]: Loading Bundle /Library/Application Support/VineServer/Resources/TigerBundle.bundle
Sep 22 13:41:47 mac0023df830af2 OSXvnc-server[307]: Loading Bundle /Library/Application Support/VineServer/Resources/JaguarBundle.bundle
Sep 22 13:41:47 mac0023df830af2 OSXvnc-server[307]: Running in Little Endian
Sep 22 13:41:47 mac0023df830af2 OSXvnc-server[307]: Pasteboard Inaccessible - Pasteboard sharing disabled
Sep 22 13:41:47 mac0023df830af2 ReportCrash[317]: Too many crashes in rapid succession! No crash report being written for pid 313
Sep 22 13:41:47 mac0023df830af2 com.apple.launchd[303] (com.apple.Spotlight[313]): Exited abnormally: Segmentation fault
Sep 22 13:41:47 mac0023df830af2 com.apple.launchd[303] (com.apple.Spotlight): Throttling respawn: Will start in 10 seconds
Sep 22 13:41:47 mac0023df830af2 ReportCrash[317]: Too many crashes in rapid succession! No crash report being written for pid 309
Sep 22 13:41:48 mac0023df830af2 mds[32]: (Error) Import: importer:0x850000 Importer start failed for 501 (kr:268435459 (ipc/send) invalid destination port)
Sep 22 13:41:48 mac0023df830af2 ReportCrash[318]: Formulating crash report for process lsregister[315]
Sep 22 13:41:47 mac0023df830af2 com.apple.launchd[303] (com.apple.pbs[309]): Exited abnormally: Segmentation fault
Sep 22 13:41:48 mac0023df830af2 ReportCrash[318]: Saved crashreport to /Library/Logs/CrashReporter/lsregister_2011-09-22-134147_Steve-Sorensens-MacBook-Pro.crash using uid: 0 gid: 0, euid: 0 egid: 0
Sep 22 13:41:52 mac0023df830af2 mds[32]: (Error) Import: importer:0x850000 Importer start failed for 501 (kr:268435459 (ipc/send) invalid destination port)
Sep 22 13:41:52 mac0023df830af2 ReportCrash[317]: Too many crashes in rapid succession! No crash report being written for pid 314
Sep 22 13:41:52 mac0023df830af2 com.apple.launchd[303] (com.apple.UserEventAgent-Aqua[314]): Exited abnormally: Segmentation fault
Sep 22 13:41:52 mac0023df830af2 com.apple.launchd[303] (com.apple.UserEventAgent-Aqua): Throttling respawn: Will start in 5 seconds
Sep 22 13:41:55 mac0023df830af2 ReportCrash[319]: Formulating crash report for process ReportCrash[317]
Sep 22 13:41:55 mac0023df830af2 ReportCrash[319]: Saved crashreport to /Users/stevesorensen/Library/Logs/CrashReporter/ReportCrash_2011-09-22-134154_Steve-Sorensens-MacBook-Pro.crash using uid: 501 gid: 20, euid: 501 egid: 20
Sep 22 13:41:55 mac0023df830af2 com.apple.launchd[303] (com.apple.ReportCrash[317]): Exited abnormally: Segmentation fault
Sep 22 13:41:56 mac0023df830af2 mds[32]: (Error) Import: importer:0x850000 Importer start failed for 501 (kr:268435459 (ipc/send) invalid destination port)
Sep 22 13:41:59 mac0023df830af2 ReportCrash[319]: Formulating crash report for process ReportCrash[321]
Sep 22 13:41:59 mac0023df830af2 ReportCrash[318]: Too many crashes in rapid succession! No crash report being written for pid 320
Sep 22 13:41:59 mac0023df830af2 ReportCrash[319]: Saved crashreport to /Users/stevesorensen/Library/Logs/CrashReporter/ReportCrash_2011-09-22-134159_Steve-Sorensens-MacBook-Pro.crash using uid: 501 gid: 20, euid: 501 egid: 20
Sep 22 13:42:00 mac0023df830af2 mds[32]: (Error) Import: importer:0x850000 Importer start failed for 501 (kr:268435459 (ipc/send) invalid destination port)
Sep 22 13:42:02 mac0023df830af2 ReportCrash[318]: Formulating crash report for process FlipShareAutoRun[306]
Sep 22 13:42:02 mac0023df830af2 ReportCrash[318]: Formulating crash report for process AppleVNCServer[311]
Sep 22 13:42:02 mac0023df830af2 ReportCrash[318]: Formulating crash report for process OSXvnc-server[307]
Sep 22 13:42:03 mac0023df830af2 ReportCrash[318]: Formulating crash report for process AirPort Base Station Agent[308]
Sep 22 13:42:03 mac0023df830af2 ReportCrash[318]: Formulating crash report for process loginwindow[266]
Sep 22 13:41:59 mac0023df830af2 com.apple.launchd[303] (com.apple.Spotlight[320]): Exited abnormally: Segmentation fault
Sep 22 13:41:59 mac0023df830af2 com.apple.launchd[303] (com.apple.Spotlight): Throttling respawn: Will start in 9 seconds
Sep 22 13:41:59 mac0023df830af2 com.apple.launchd[303] (com.apple.ReportCrash[321]): Exited abnormally: Segmentation fault
Sep 22 13:42:03 mac0023df830af2 com.apple.launchd[303] (com.flipvideo.FlipShareAutoRun[306]): Exited abnormally: Segmentation fault
Sep 22 13:42:03 mac0023df830af2 ReportCrash[318]: Saved crashreport to /Library/Logs/CrashReporter/FlipShareAutoRun_2011-09-22-134155_Steve-Sorensens-MacBook-Pro.crash using uid: 0 gid: 0, euid: 0 egid: 0
Sep 22 13:42:03 mac0023df830af2 com.apple.launchd[303] (com.apple.ReportCrash): Throttling respawn: Will start in 5 seconds
Sep 22 13:42:03 mac0023df830af2 com.apple.launchd[303] (com.apple.ScreenSharing.server[311]): Exited abnormally: Segmentation fault
Sep 22 13:42:04 mac0023df830af2 mds[32]: (Error) Import: importer:0x850000 Importer start failed for 501 (kr:268435459 (ipc/send) invalid destination port)
Sep 22 13:42:04 mac0023df830af2 com.apple.launchd[303] (VineServer[307]): Exited abnormally: Segmentation fault
Sep 22 13:42:04 mac0023df830af2 OSXvnc-server[325]: Arguments: -rfbport 5900 -desktop dssmacbookpro.nt_wan -rfbauth /Library/Application Support/VineServer/.vinevncauth -donotloadproxy -SystemServer 1 -restartonuserswitch N -UnicodeKeyboard 0 -keyboardLoading N -pressModsForKeys N -EventTap 3 -swapButtons -rendezvous Y 
Sep 22 13:42:04 mac0023df830af2 ReportCrash[318]: Saved crashreport to /Library/Logs/CrashReporter/AppleVNCServer_2011-09-22-134155_Steve-Sorensens-MacBook-Pro.crash using uid: 0 gid: 0, euid: 0 egid: 0
Sep 22 13:42:04 mac0023df830af2 OSXvnc-server[325]: Main Bundle: /Library/Application Support/VineServer
Sep 22 13:42:04 mac0023df830af2 OSXvnc-server[325]: Loading Bundle /Library/Application Support/VineServer/Resources/TigerBundle.bundle
Sep 22 13:42:04 mac0023df830af2 OSXvnc-server[325]: Loading Bundle /Library/Application Support/VineServer/Resources/JaguarBundle.bundle
Sep 22 13:42:04 mac0023df830af2 com.apple.launchd[303] (com.apple.AirPortBaseStationAgent[308]): Exited abnormally: Segmentation fault
Sep 22 13:42:04 mac0023df830af2 OSXvnc-server[325]: Running in Little Endian
Sep 22 13:42:04 mac0023df830af2 com.apple.launchd[1] (com.apple.loginwindow[266]): Exited abnormally: Segmentation fault
Sep 22 13:42:04 mac0023df830af2 com.apple.launchd[303] (com.apple.pboard[316]): Exited: Terminated
Sep 22 13:42:04 mac0023df830af2 OSXvnc-server[325]: OSXvnc-server received signal: 15
Sep 22 13:42:04 mac0023df830af2 OSXvnc-server[325]: Unloading Tiger Extensions
Sep 22 13:42:04 mac0023df830af2 OSXvnc-server[325]: Unloading Jaguar Extensions
Sep 22 13:42:04 mac0023df830af2 ReportCrash[318]: Too many crashes in rapid succession! No crash report being written for pid 324
Sep 22 13:42:04 mac0023df830af2 com.apple.launchd[303] (com.apple.ServerScanner[312]): Exited: Terminated
Sep 22 13:42:04 mac0023df830af2 com.apple.launchd[303] (com.apple.AirPortBaseStationAgent[326]): Exited: Terminated
Sep 22 13:42:04 mac0023df830af2 com.apple.launchd[303] (com.apple.ReportCrash.SafetyNet[319]): Exited: Terminated
Sep 22 13:42:04 mac0023df830af2 OSXvnc-server[325]: Removing Observers
Sep 22 13:42:04 mac0023df830af2 OSXvnc-server[325]: RFB Shudown Complete
Sep 22 13:42:04 mac0023df830af2 /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow[327]: Login Window Application Started -- Threaded auth
Sep 22 13:42:04 mac0023df830af2 com.apple.launchd[303] (com.apple.ScreenSharing.server[324]): Exited abnormally: Segmentation fault
Sep 22 13:42:04 mac0023df830af2 ManagedClient[274]: CGSShutdownServerConnections: Detaching application from window server
Sep 22 13:42:04 mac0023df830af2 ReportCrash[318]: Saved crashreport to /Library/Logs/CrashReporter/OSXvnc-server_2011-09-22-134155_Steve-Sorensens-MacBook-Pro.crash using uid: 0 gid: 0, euid: 0 egid: 0
Sep 22 13:42:04 mac0023df830af2 ReportCrash[318]: Saved crashreport to /Library/Logs/CrashReporter/AirPort Base Station Agent_2011-09-22-134155_Steve-Sorensens-MacBook-Pro.crash using uid: 0 gid: 0, euid: 0 egid: 0
Sep 22 13:42:04 mac0023df830af2 ReportCrash[318]: Saved crashreport to /Library/Logs/CrashReporter/loginwindow_2011-09-22-134155_Steve-Sorensens-MacBook-Pro.crash using uid: 0 gid: 0, euid: 0 egid: 0
Sep 22 13:42:04 mac0023df830af2 OSXvnc-server[331]: Arguments: -rfbport 5900 -desktop dssmacbookpro.nt_wan -rfbauth /Library/Application Support/VineServer/.vinevncauth -donotloadproxy -SystemServer 1 -restartonuserswitch N -UnicodeKeyboard 0 -keyboardLoading N -pressModsForKeys N -EventTap 3 -swapButtons -rendezvous Y 
Sep 22 13:42:04 mac0023df830af2 OSXvnc-server[331]: Main Bundle: /Library/Application Support/VineServer
Sep 22 13:42:04 mac0023df830af2 OSXvnc-server[331]: Loading Bundle /Library/Application Support/VineServer/Resources/TigerBundle.bundle
Sep 22 13:42:04 mac0023df830af2 OSXvnc-server[331]: Loading Bundle /Library/Application Support/VineServer/Resources/JaguarBundle.bundle
Sep 22 13:42:05 mac0023df830af2 OSXvnc-server[331]: Running in Little Endian
Sep 22 13:42:05 mac0023df830af2 OSXvnc-server[331]: Pasteboard Inaccessible - Pasteboard sharing disabled
Sep 22 13:42:05 mac0023df830af2 OSXvnc-server[331]: Waiting for clients
Sep 22 13:42:05 mac0023df830af2 OSXvnc-server[331]: Using Private Event Source
Sep 22 13:42:05 mac0023df830af2 OSXvnc-server[331]: 3891612: (connectAndCheck) Untrusted apps are not allowed to connect to or launch Window Server before login.
Sep 22 13:42:05 mac0023df830af2 OSXvnc-server[331]: Window Server is not available.
Sep 22 13:42:05: --- last message repeated 1 time ---
Sep 22 13:42:05 mac0023df830af2 OSXvnc-server[331]: CGSCreateEventSourceState: cannot resolve shmem.
Sep 22 13:42:05 mac0023df830af2 OSXvnc-server[331]: No Event Source -- Using 10.3 API
Sep 22 13:42:05 mac0023df830af2 OSXvnc-server[331]: Using Dynamic Event Tap -- HID for console user
Sep 22 13:42:05 mac0023df830af2 OSXvnc-server[331]: Registering Bonjour Service(_rfb._tcp.) - dssmacbookpro.nt_wan
Sep 22 13:42:05 mac0023df830af2 OSXvnc-server[331]: IPv6: Failed to Bind Socket: Port 5900 may be in use by another VNC
Sep 22 13:42:05 mac0023df830af2 OSXvnc-server[331]: Started Listener Thread on port 5900
Sep 22 13:42:05 mac0023df830af2 loginwindow[327]: Login Window Started Security Agent
Sep 22 13:42:06 mac0023df830af2 ReportCrash[318]: Formulating crash report for process UserEventAgent[322]
Sep 22 13:42:06 mac0023df830af2 ReportCrash[318]: Formulating crash report for process FlipShareAutoRun[323]
Sep 22 13:42:06 mac0023df830af2 ReportCrash[318]: Saved crashreport to /Library/Logs/CrashReporter/UserEventAgent_2011-09-22-134204_Steve-Sorensens-MacBook-Pro.crash using uid: 0 gid: 0, euid: 0 egid: 0
Sep 22 13:42:06 mac0023df830af2 ReportCrash[318]: Saved crashreport to /Library/Logs/CrashReporter/FlipShareAutoRun_2011-09-22-134204_Steve-Sorensens-MacBook-Pro.crash using uid: 0 gid: 0, euid: 0 egid: 0
Sep 22 13:42:06 mac0023df830af2 com.apple.launchd[303] (com.apple.UserEventAgent-Aqua[322]): Exited abnormally: Segmentation fault
Sep 22 13:42:06 mac0023df830af2 com.apple.launchd[303] (com.flipvideo.FlipShareAutoRun[323]): Exited abnormally: Segmentation fault
Sep 22 13:42:08 mac0023df830af2 mds[32]: (Error) Import: importer:0x850000 Importer start failed for 501 (kr:268435459 (ipc/send) invalid destination port)

No comments:

Post a Comment