LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Problems with chroot & SSH (https://www.linuxquestions.org/questions/linux-software-2/problems-with-chroot-and-ssh-304429/)

magoot 03-21-2005 04:41 PM

Problems with chroot & SSH
 
Hello, im trying to set up an chrooted ssh-account, so that the user only will be able to browse his homedir when logging in using ssh.
I followed this tutorial http://www.tjw.org/chroot-login-HOWTO/, but when i try to ssh i get this
Code:

maggot@~: ssh -l testuser localhost
testuser@localhost's password:
Last login: Tue Mar 22 00:27:29 2005
Linux 2.6.10.
Password:
Sorry, user testuser is not allowed to execute '/usr/sbin/chroot /home/pwnd /bin/su testuser' as root on maggot.
Connection to localhost closed.
maggot@~:

I followed the tutorial step by step, i even tried it twice, still can't get it to work :\ i end up with the same error.

acid_kewpie 03-21-2005 04:45 PM

i would strongly think that your sudoers file hasn't been setup correctly. can you manually run chroot via sudo as that user?

magoot 03-21-2005 04:56 PM

Ehm how do you mean run it manually? :)
I have added this line in /etc/sudoers

testuser* ALL= NOPASSWD: /usr/sbin/chroot /home/testuser /bin/su - testuser*


All times are GMT -5. The time now is 03:44 AM.