# sudo 1.6.8p12
# =============
cd
test -f installed/sudo-1.6.8p12.tar.gz &&
mv installed/sudo-1.6.8p12.tar.gz .
test ! -f sudo-1.6.8p12.tar.gz &&
wget http://www.courtesan.com/sudo/dist/sudo-1.6.8p12.tar.gz
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "sudo-*" -exec rm -r {} \;
tar xzvf ~/sudo-1.6.8p12.tar.gz
cd sudo-1.6.8p12
test $UID = 0 && chown -R root:root .
# See README.LDAP in the source directory if you use LDAP
# If you use PAM, pass --with-pam to configure. If you don't already have a
# /etc/pam.d/sudo, you can get an example from sample.pam in the source
# /directory.
./configure --prefix=/usr
make
# Become root to install it
su
# Backup your sudoers file, if you have one
test -s /etc/sudoers &&
( mkdir -p -m 0700 ~/backup ; cp -a /etc/sudoers ~/backup/ )
test -x /sbin/removepkg && /sbin/removepkg sudo
make install
# If you ever want to uninstall sudo, this should do it:
cd
su
/etc/sudoers /usr/sbin/visudo /usr/libexec/sudo_noexec.* \
/usr/man/man5/sudoers.5
( cd /usr/bin ; rm -f sudo sudoedit )
( cd /usr/man/man8 ; rm -f sudoedit.8 visudo.8 )
exit
find ~/src -maxdepth 1 -type d -name "sudo-*" -exec rm -r {} \;
rm -f ~/installed/sudo-*.tar.*