The sudo package allows a system administrator to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while logging the commands and arguments.
Download (HTTP): http://www.courtesan.com/sudo/dist/sudo-1.6.8p12.tar.gz
Download MD5 sum: b29893c06192df6230dd5f340f3badf5
Download size: 576 KB
Estimated disk space required: 3.6 MB
Estimated build time: less than 0.1 SBU
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/sudo
Install sudo by running the following commands:
patch -Np1 -i ../sudo-1.6.8p12-envvar_fix-1.patch && ./configure --prefix=/usr --libexecdir=/usr/lib \ --enable-noargs-shell --with-ignore-dot --with-all-insults \ --enable-shell-sets-home && make
Now, as the root user:
make install
--enable-noargs-shell: This switch allows sudo to run a shell if invoked with no arguments.
--with-ignore-dot: This switch causes sudo to ignore '.' in the PATH.
--with-all-insults: This switch includes all the sudo insult sets.
--enable-shell-sets-home: This switch sets HOME to the target user in shell mode.
There are many options to sudo's configure command. Check the configure --help output for a complete list.
The sudoers file can be quite complicated. It is composed of two types of entries: aliases (basically variables) and user specifications (which specify who may run what). The installation installs a default configuration that has no privileges installed for any user.
One example usage is to allow the system administrator to execute any program without typing a password each time root privileges are needed. This can be configured as:
# User alias specification User_Alias ADMIN = YourLoginId # Allow people in group ADMIN to run all commands without a password ADMIN ALL = NOPASSWD: ALL
For details, see man sudoers.
The Sudo developers highly recommend using the visudo program to edit the sudoers file. This will provide basic sanity checking like syntax parsing and file permission to avoid some possible mistakes that could lead to a vulnerable configuration.
Last updated on 2007-02-14 11:57:11 -0600