Chapter 1 Typing Commands 15
Commands Requiring Root Privileges
Many commands used to manage a server must be executed by the root user. If you
get a message such as “permission denied,” the command probably requires root
privileges.
To issue a single command as the root user, begin the command with sudo.
For example:
$ sudo serveradmin list
You’re prompted for the root password if you haven’t used sudo recently. The root user
password is set to the administrator user password when you install Mac OS X Server.
To switch to the root user so you don’t have to repeatedly type sudo, use the su
command:
$ su root
You’re prompted for the root user password and then are logged in as the root user
until you log out or use the su command to switch to another user.
Important: As the root user, you have sufficient privileges to do things that can cause
your server to stop working properly. Don’t execute commands as the root user unless
you understand clearly what you’re doing. Logging in as an administrative user and
using sudo selectively might prevent you from making unintended changes.
Throughout this guide, commands that require root privileges begin with sudo.
LL2354.book Page 15 Monday, October 20, 2003 9:47 AM