/usr/sbin/chroot: failed to run command `/bin/su': Permission denied

K

kundai

Guest
Hi guys

My platform is Centos 6.4 and I have a user on my system, lets call the user 'faileduser'.
When i run:
sudo /usr/sbin/chroot /var/path/to/myjail /bin/su - faileduser -c "logout"
i get this error:
/usr/sbin/chroot: failed to run command `/bin/su': Permission denied.
In my /etc/sudoers i have:
faileduser ALL= NOPASSWD: /usr/sbin/chroot /var/path/to/myjail /bin/su - faileduser*
In my /etc/passwd i have:
faileduser:x:503:503::/home/faileduser:/bin/jailcell

Where /bin/jailcell is a custom script with contains the line (sudo /usr/sbin/chroot /var/path/to/myjail /bin/su - faileduser -c "logout") failing to run, giving me the error as mentioned above.

What configuration did I miss? Thanks guys.
 


Is the sudoers file in the host system or the jail?
 

Members online


Latest posts

Top