Trouble with sudo in chroot
John Oliver
joliver at john-oliver.net
Thu Dec 19 21:24:27 EST 2002
Red Hat 7.2, sudo-1.6.3p7-2
I have a user I've trapped in a chroot. I want them to be able to run
one command as root, so I created a script. I have in the real
/etc/sudoers:
blist ALL=NOPASSWD: /usr/sbin/chroot /home/blist /bin/su - blist*
#blist ALL=NOPASSWD: /home/blist/bin/makevirt
blist ALL=NOPASSWD: /usr/sbin/makemap
blist ALL=NOPASSWD: /usr/sbin/makemap hash /etc/mail/virtusertable <
/etc/mail/virtusertable
And in the /etc/sudoers inside the chroot jail:
#blist ALL=NOPASSWD: /bin/makevirt
blist ALL=NOPASSWD: /usr/sbin/makemap hash /etc/mail/virtusertable <
/etc/mail/virtusertable
[joliver at ns joliver]$ su - blist
Password:
bash-2.05$ makevirt
Password:
Sorry, try again.
Password:
sudo: 1 incorrect password attempt
--
John Oliver, CCNA http://www.john-oliver.net/
Linux/UNIX/network consulting http://www.john-oliver.net/resume/
*** sendmail, Apache, ftp, DNS, spam filtering ***
**** Colocation, T1s, web/email/ftp hosting ****
More information about the sudo-users
mailing list