Radsoft
 About | Buy | News | Products | Rants | Search | Security
Home » Resources » Red Hat Diaries

Red Hat Diaries/0032

The Quest for Root

Getting root on OS X turns out to be both simpler and smarter than I had begun to suspect.

For starters, you as the owner of a Mac box are not root - you are an admin, and root is higher. So there will be eminent places in your file system where you will not be able to go. They're owned by root.

And setting up a new account and trying to make a new user a member of group 0 will probably not work either - the system is set up to protect itself. Still, I would recommend Mac users to immediately create a lower account to use for ordinary box usage - for surfing the net et al. You need to be at least admin to change any configuration settings that have been locked by admin or higher (a good move Apple) and to install new software.

But how to get to root? There is an application down at the bottom of the Utilities folder - it's called Terminal. Firing it up will log you onto your own system. (Don't worry about logging out - it's a separate new session. This is the kind of cool thing you can do on Unix but would never get away with on intellectually limited Windows.) You will log on as yourself, the system understands your password, you are automatically there - and in your home directory.

Now try going to root.

su root
Password:
Sorry.

You can try both your own password and be daring and try a null password and neither will work. The system will apologize nicely and then dump you back where you started from.

Hackbuster Tom Liston came up with the solution.

sudo passwd root

What was going on here? Tom Liston figured that one out too. Macs are shipped with a root account with a null password, but they're also configured to never accept a null password. Meaning there is only one way to get to root - and most people won't even think about it or care.

And oddly enough, once I'd solved that one, I immediately exited and went back to playing with my comely desktop assistant.

Tell me a joke.
Knock knock.
Who's there?
Tennis.
Tennis who?
Tennis five and five.
Go away!
Ok, back to work!

Click here »

About | Buy | News | Products | Rants | Search | Security
Copyright © Radsoft. All rights reserved.