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...
- 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.
mount -uw /
This will mount the root writable and give you root access to the machine.
passwd root Enter a new root password.
dsenableroot -u root
Enter the root password you just set three times and the root account will be enabled
- Type exit to boot up normally
- Log in as the root user by clicking other and entering root as the username and the password you set.
- Open System Preferences > Accounts and disable the Guest account by deselecting both check boxes. Close the preferences window.
- This alone will not actually disable the account so open a terminal and enter:
dscl . delete /Users/Guest
- Now go back to Accounts and re-enable the Guest user.
- Log out of the root account and you should be able to log in as guest now.
- If you don't want anyone to know you enabled the root account, you will want to disable it. Log on as root.
- Go back to Accounts > click Login Options
- Click the Join box next to Network Account Server
- Click Open Directory Utility
- Choose Edit(top menu) > Disable Root UserSo thanks Apple, that was a right pain in the arse. Fix this bug with the guest account please.