Name
sudo
Synopsis
sudo [options
]command
Executes a command as the superuser or as another user on the system.
Before sudo
executes
command
, it prompts for the current
account password (not root’s).
sudo
determines authorized users by consulting the
file /etc/sudoers
. If the current user account
is listed in /etc/sudoers
and is authorized
there to run command
, that user can then
run subsequent sudo
commands without being
prompted for a password. However, if five minutes (the default value)
passes between sudo
commands, the user is prompted
again for a password at the next sudo
attempt and
given another five minute window.
By default, Mac OS X includes the admin group in
the sudoers
file and gives that group
authorization to run any command with sudo
. Mac OS
X accounts given administrator privileges become members of the
admin group and thereby receive complete
sudo
privileges.
All attempts to use the sudo
command are logged to
the system log.
Options
-
-V
Print the version number. When run by root, also list the options used at
sudo
’s compilation.-
-l
List the commands that the current user is authorized to run with
sudo
.-
-L
List all option settings that can be used in the Defaults section of the
sudoers
file.-
-h
Print a usage statement.
-
-v
Reset the timestamp, giving the user a new five-minute window to use
sudo
without being prompted for a password.-
-k
Kill the timestamp by setting it past the default timeout value. A password is not needed to use this option.
-
-K
Kill the timestamp ...
Get Mac OS X Panther in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.