Activating root user


Havnt used the root login since clean-installing 10.1; needed to do so recently, but I couldnt activate it! Went in NetInfo, autentified myself without problem, but when I selected the "activate root user" menu item, I got more or less the following error:

NetInfo Error

NetInfo writing failed (operation successful)

Now the error message is funny, but not having a root user is not. Any ideas? (bar reistalling everything please)


duplicate your user account

change the UID to 0

change the name to root

change the GID to wheel....?

change the home directory to /private/var/root

make sure that directory exists after you su

type your password

you should be root

you could change the passwd from there if you want...
That seems like a lot to go through. How about this:

sudo passwd
[type your password at the prompt]
[and type a password for root at the prompts]

I seem to remember that it really was that easy. Since 'sudo' allows you to run commands as root anyway, you can just use sudo instead of enabling the account, or use sudo to get a shell (sudo tcsh OR sudo -[something?])
While sudo allows you to run one command as root (or a few within 3 minutes, something like that) if you just switch user to root, you can run as many as you like. Type: su then your root password. You can also switch to any other user this way by typing su username (even su root works, but su does the same thing). You'll stay as root until you type exit, then you'll be put back to your normal user account.
Jadey, it sounds like that's exactly what this person can't do -- su. Correct?

With sudo active, there is no operational need to su directly to root. As baur mentioned, sudo-ing a shell (such as 'sudo tcsh') is sufficient: You are now the root user, in a shell until you choose to exit, and all you had to do was enter your own password.

There are security advantages to this, too. If root has no password itself, then no one can gain root by guessing the root password. And if they can sudo to root, at least you have some kind of record of their actions in the system log.

If you can think of a need for root to have a password, I'd love to hear it. Otherwise, just stick to sudo -- it will do everything you need it to.
If you haven't resolved this yet, I have a simple solution that just worked for me.
Go to netinfo.
Click the lock to make changes.
From the Domain Menu select Security.
Select "Enable Root User".
You should be prompted for a password and then asked to verify.
If you have a lot to do as root, you can just:

sudo -s

This tells sudo to open a new shell as root, which is functionally equivalent
to su. There is no reason that I know of to enable the root account on
your system. Just get Pseudo for launching GUI apps, and use sudo -s
for terminal stuff.
I had the same error as you. This wouldn't just happen when trying to enable the root user, but if I tried to do anything in NetInfo and save it.

The only thing I could get to work was re-installing OS X :(
Pure guesswork here, but...
The error message ("writing failed") seems to indicate that the write permission is missing for your user. Maybe you could try something along the lines of:
sudo chmod g+w [path_to_NetInfo]
But I could be totally off base here.