The
sudo
tool (aka "su do") has long been a favorite of Unix admins (including MacOS), but prior to now, had to be installed from third parties on Solaris. Now in Solaris 11, it comes as part of the base OS package.
For those people who have somehow never used it before—don't worry, it's quite simple to use. The user interface is a little like Solaris pfexec
. In the simplest case, you simply insert the word sudo
in front of any command you wish to run with root privileges. For example:
sudo snoop
If you have not run the sudo
command in the last few minutes, it will ask for your password (not the root password, but your own). It will then cache a successful entry so you do not have to enter your password every time.
It is also possible to run commands as other users quite easily. For example:
sudo -u apache apachectl restart
All this presupposes that there is an appropriate entry for your account in the sudoers
config file.
Here are a collection of sample sudoers...