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.
# edit /etc/sudoers
add a line:
user ALL=(ALL) ALL
To run one command as root:
sudo command
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.
some random SUDO examples:
# groups
User_Alias ROOT = user1, user2, user3
User_Alias WEBMASTERS = user4, user5, user6
# commands
Cmnd_Alias APACHE = /usr/local/sbin/kickapache
Cmnd_Alias TAIL = /usr/bin/tail
Cmnd_Alias SHUTDOWN = /sbin/shutdown
Cmnd_Alias APT = /usr/bin/apt-get, /usr/bin/dpkg
# privileges
ROOT ALL = (ALL) ALL
WEBMASTERS ALL = PASSWD : APACHE, TAIL
admin ALL = NOPASSWD : /etc/init.d/apache
http://www.debianhelp.co.uk/sudo.htm
--------------------------------------------------------------------------------------
usually you can use su instead of sudo:
su root apt-get install sudo
cd /etc
su root
visudo
at least
XOR
should be included
later add users who can use sudo
Last edited by machinebacon (2010-07-16 20:03:29)
Let's all get forked.