Sudo Configuration in Debian
Sudo is a program designed to allow a sysadmin to give limited root privileges to users and log root activity. The basic philosophy is to give as few privileges as possible but still allow people to get their work done.
Debian's sudo package has the password timeout set to 15 minutes. This means that when you first enter your password, as long as you don't wait more than 15 minutes between sudo commands, you won't have to enter it again. The password timeout can be immediately expired with
Debian's sudo is compiled with
As a consequence, the PATH of the user is ignored except if the user is in group sudo.
Installing SUDO in Debian
# apt-get install sudo
sudo is configured entirely through the file /etc/sudoers. This file controls the commands which users are allowed to run.
# emacs /etc/sudoers
add a line:
user ALL=(ALL) ALL
To run one command as root:
For more commands, run your shell with sudo.
sudo sh (if sh is your shell.)
Be careful when you are root. When you are done, type exit
For more details about sudo options check man pages of sudo.Click here for sudo man page.
some random SUDO examples
Cmnd_Alias SHUTDOWN = /sbin/shutdown
Cmnd_Alias APT = /usr/bin/apt-get, /usr/bin/dpkg