note: script tested with Lucid and 4.3.1
To add user: run "visudo" (looks for /usr/bin/vi, so link favorite editor)
example:
spot ALL=(ALL) NOPASSWD: ALL
hint: to have terminal always open to user, add to /etc/profile.local
ex: "su spot"
Code: Select all
#!/bin/sh
cd /tmp
mkdir sudo-1.7.4
wget http://www.sudo.ws/sudo/dist/sudo-1.7.4p4.tar.gz
tar -xvzf sudo-1.7.4p4.tar.gz
cd sudo-1.7.4p4
./configure --with-pam=no --with-pam-login=no --disable-pam-session CFLAGS="-mtune=i486 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}" --prefix=/usr --sysconfdir=/etc --localstatedir=/var
make
make DESTDIR=/tmp/sudo-1.7.4 install
cd /tmp/sudo-1.7.4
rm -r usr/share
rm -r var
find . | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
cd ..
tar -cvzf sudo-1.7.4.tar.gz sudo-1.7.4/*
tgz2pet sudo-1.7.4.tar.gz
cp sudo-1.7.4.pet /mnt/home
rm -r sudo*
clear
echo "sudo-1.7.4.pet is now in /mnt/home"
exit