Mac OS X,  Mac OS X Server,  Mac Security,  Mass Deployment

Enable/Disable Root on Mac OS X

The dsenableroot command can be used to enable the root user and assign it a password.  To enable root:

dsenableroot

You will then be prompted for a password to assign the root account and then to verify the password.  On success you’ll see the following success code:

dsenableroot:: ***Successfully enabled root user.

To then disable the root account:

dsenableroot -d

You should now be able to look into the /var/db/dslocal/nodes/Default/users directory on your system and see root.plist.  You can then make any changes to the account using this file that you would like.