Tuesday 27 August 2013

OSX Guest account "Shakes" and won't log on after power failure

I have been borrowing a friends mac lately only for a couple of weeks while they are away. They have set up the guest account for me to log into. This is a great idea, it allows me to pretty much do what I like without any risk of damaging the computer (or so Apple will have you think). This assumption is almost correct, but as anyone with a little unix knowledge could tell you, "if you have physical access to the console and are able to reboot it, you can boot into single user mode". This means you can get root access :)

The problem is that this is a iMac, and there is a design flaw with it. The power cable goes into the monitor, this is the only power cable for the whole thing so if it comes out, your computer dies. Now Apple saw fit to put a highly reflective display on this thing so it needs constant adjustment to stop reflections, this means the power cable can work itself loose. Normally this might not be catastrophic since you could just plug back in and boot it up. Sure you might loose some work but since its an apple its unlikely your doing anything important. (Yes I am inferring that if you are a mac user you are probably just playing Facebook games or some sort or art, and yes thats not really important).

Now, rant over, if you are logged in as Guest when this power failure happens you will not be allowed to log back in. You will be faced with the login box, with the guest account, but instead of logging in you get an INFURIATING shaking box with no error message. So what does this mean? Who bloddy knows, the result though is you can't use the computer.

Where to now? Well Apple are no help here, so after a LOT of googleing I found a series of different blog posts that sort of related that I could string together into a solution. Here goes...

  1. Boot into single user mode: Reboot the mac and hold cmd+s you will end up at a terminal prompt as the root user... sort of. 
  2. Type:
    fsck -fy
    mount -uw /
    This will mount the root writable and give you root access to the machine.
  3. Type:
    passwd root  Enter a new root password.
  4. Type:
    dsenableroot -u root
    Enter the root password you just set three times and the root account will be enabled
  5. Type exit to boot up normally
  6. Log in as the root user by clicking other and entering root as the username and the password you set.
  7. Open System Preferences > Accounts  and disable the Guest account by deselecting both check boxes. Close the preferences window.
  8. This alone will not actually disable the account so open a terminal and enter:
    dscl . delete /Users/Guest
  9. Now go back to Accounts and re-enable the Guest user.
  10. Log out of the root account and you should be able to log in as guest now.
  11. OPTIONAL:



  12. If you don't want anyone to know you enabled the root account, you will want to disable it. Log on as root.
  13. Go back to Accounts > click Login Options
  14. Click the Join box next to Network Account Server
  15. Click Open Directory Utility
  16. Choose Edit(top menu) > Disable Root User

    So thanks Apple, that was a right pain in the arse. Fix this bug with the guest account please.

No comments:

Post a Comment