DirectNET

Data Center Management Solutions including UPS Systems, Data Center Cooling, KVM over IP & IP Power Strips, Server Racks and Server Rack accessories; KVM Switches and KVM Extenders; Rackmount Monitors and Rackmount Keyboards.


NAVIGATION
Home
Store
INSIDE MAC
Television Shows
Broadcast Shows
Daily News Shows
Special Shows
EVENTS
DAILY TIPS
Design
Mac OS X
Mac OS X UNIX
COMMUNITY
Forums
Surveys
NEWS
Current
Press
Archive
FEATURES
Editorial
Dr. Mac
Reviews
Reader Reports
RESOURCES
FAQ
Documentation
Learning Center
MAN pages
Glossary
Tutorials
Tips
Links

OUR PARTNERS

Tutorials 

Root User Creation

By Christian Pickman, Contributing Editor

Root user account in Mac OS X.

So you want to be a "Superuser" of your Macintosh? Well, whether you personally consider yourself a superuser or not, your Macintosh will not know that unless you actually setup a user called 'root.'

What is a root user?

On a traditional UNIX machine, the root user (or superuser) is the first user account created when the operating system is initially installed. The root user, better known as the System Administrator, this the person who has the ability to create or delete user accounts, install software or hardware and perform other system administrator tasks.

In Mac OS X the same is relatively true as it is in UNIX. Logging in as a root user makes it easier for you to manage files and folders without being told by the operating system that you have insufficient privileges. Also, logged in as a root user, authentication requests from certain programs will be not ask since you already have superuser status.

Is a root user account exactly the same in Mac OS X as in UNIX?

This is a Yes and No answer.

Yes:

You can manage user accounts and software installations (for example) without being asked for authentication or privilege access.

...and No:

If you went into Terminal and typed at the command line:

rm /

(rm is the delete command in UNIX and / means the root directory of the entire volume) Mac OS X in Terminal prevents you from wiping out all your data in a couple of keystrokes, whereas, on a UNIX machine the same command is very unforgiving. Gee, do you think that Apple made it this way on purpose? ;-)

How do I setup a root user account in Mac OS X?

In order to setup a root user account in Mac OS X, you must first be logged in with administrator (Admin) privileges. To find out if you have Admin privileges, go to the Apple Menu and select System Preferences. In System Preferences, select Users. Once you have select the User preference, you should see something similar to this:

From the above example, you can see that my account, Christian, has Admin privileges and since I have logged in as Christian, I can create a root user in Mac OS X. If your user account does not have Admin privileges, then you will not be able to create a root user account.

With administrator privileges on the machine you can continue and create a root user account. To start, you will need to locate the application called, NetInfo Manager. Its default path in Mac OS X is:

/Applications/Utilities/NetInfo Manager

After locating NetInfo Manager inside the Utilities folder, go ahead and launch the application.

With NetInfo Manager, launched go to the Domain from the file menu and select Security and then Authenticate.

After selecting Authenticate, you will be asked for your administrator password.

Type in your password for your account and click the OK button. Typically, the password will be the same password that you used when you first installed Mac OS X on the machine. After typing in your administrator password, go back to Domain from the file menu, select Security again and now choose, Enable Root User.

Now you will be asked to re-authenticate. Click on the OK button.

From this point you will be asked for a password for the root user. Type in a password and then click OK and you will be asked to verify the password you typed in. After you have completed doing this, go ahead and quit the NetInfo Manager application.

Okay, you are making great progress so pat yourself on the back. Lastly, you will need to enable the "Other User" feature in the Login preference of System Preferences. Go to System Preferences and select the Login preference. In the Login preference, chose the tab called, Login Window.

Typically, you will have "Automatically log in" box checked, I have remove the checkmark from this box and place a checkmark in the Show "Other User" in list for network users. You can have "Automatically log in" checked, however, I would highly recommend that you do not make the root account the automatic log in to your machine, especially if you share your machine with others.

As for the "Display Login Window as:" option, you can select one or the other. In the picture below, I have "List of users with accounts on this computer" since I want to know has accounts on this computer when I startup.

Now that you have made this change, quit System Preferences. From the Apple Menu, select "Log Out..." at the bottom of this menu.

Now click on the "Log Out" button to logout of your account. This will close all processes.

Once, logout has completed, you will be presented with the Login screen. From here, click on the "Other..." icon.

Now, type in 'root' (without the quotes) and the password that you assigned to the root account.

After typing in root and the password, click on the Log In button to login as root.

Once in your root account, you will notice that everything is setup as it was when you first logged into Mac OS X initially with your Admin account. Once you have setup your root account to your satisfaction (ie. adding applications to the Dock), you can logout and then relogin as yourself.

So there you have it. Your Macintosh now has a root user account on the machine and you can login into this account if necessary.

If you have any questions or comments about this article, feel free to e-mail me: christian_pickman@osxfaq.com

Copyright © 2000-2008 Inside Mac Media, Inc. All rights reserved.
Apple assumes no responsibility with regard to the selection, performance, or use of the products or services. All understandings, agreements, or warranties, if any, take place directly between the vendors and prospective users.
Apple, the Apple logo, Mac, PowerMac G4, PowerMac G5, Xserve, Xserve RAID, PowerBook, iBook, Airport, AirPort Extreme, iMac, eMac, iLife, iMovie, iCal, iPhoto, iTunes, QuickTime, FireWire, iPod, iSight, AppleWorks, Macintosh, Jaguar, Panther, Mac OS, Mac OS X and Mac OS X Server are trademarks of Apple Computer, Inc.