Apple Xserve Up Mac OS X Server Specifications Page 27

  • Download
  • Add to my manuals
  • Print
  • Page
    / 329
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 26
Chapter 1 Executing Commands 27
The sudo command gives root user privileges to users specified in the sudoers file.
If you’re logged in as an administrator user and your username is specified in the
etc/sudoers file, you can use this command.
To execute a single command with root user privileges, begin the command with sudo
(short for super user do). For example:
$ sudo serveradmin list
If you haven’t used sudo recently, you’re prompted for your administrator password.
To switch to the root user so you don’t need to repeatedly enter sudo, use the su
command:
$ su root
or simply:
$ su
Youre prompted for the root user password and are then logged in as the root user
until you log out or use the su command to switch to another user.
Note: The root user password is set to the administrator user password when you
install Mac OS X Server.
Important: To avoid running commands as root, log out after you finish using the su
command.
For more information about the sudo and su commands, see their man pages.
Terminating Commands
To terminate the currently running command, enter Control-C. This keyboard shortcut
sends an abort signal to the command. In most cases this causes the command to
terminate, although commands can install signal handlers to trap this signal and
respond differently.
Scheduling Tasks
To schedule tasks to run at defined times, use the cron tool. This tool is a daemon that
executes scheduled commands defined in crontab files.
The
cron tool searches the /var/cron/tabs/ folder for crontab files that are named after
accounts in /etc/passwd, and loads the files into memory. The
cron tool also searches
for crontab files in the /etc/crontab/ folder, which are in a different format. cron then
cycles every minute, examining stored crontab files and checking each command to
see if it should be run in the current minute.
Page view 26
1 2 ... 22 23 24 25 26 27 28 29 30 31 32 ... 328 329

Comments to this Manuals

No comments