Chroot SSH - Opensuse 10.2

Discussion in 'General' started by alexillsley, Apr 2, 2007.

  1. alexillsley

    alexillsley New Member

    Hi,
    How can i chroot users on opensuse10.2 ? I looked but theres only a how to for debian users:confused: Any ideas on how can i do this on opensuse?

    Thanks,
    Alex
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The steps will be generally the same for opensuse too. As opensuse does not offer a ssh daemon that is able to chroot, you will have to compile one as described in the debian howto.
     
  3. alexillsley

    alexillsley New Member

    When i try to configure it comes up with an error:confused:
    Code:
    checking whether getpgrp requires zero arguments... yes
    configure: error: PAM headers not found
    server1:/tmp/openssh-4.2p1-chroot #
    
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Please check if there is something like a PAM dev or devel package for SuSE and install it with yast.
     
  5. alexillsley

    alexillsley New Member

    Ok, i just found a package pam-devel in yast, hopfully this will make it work:)
     
  6. alexillsley

    alexillsley New Member

    I have installed it all now with no errors, however when ever i log in with an SSH user created with ISPConfig the SSH windows just closes:confused:

    I enabled it on ISPConfig to chroot users and enabled the site to have SSH though it just closes now, except for root:confused:
     
  7. anmsid

    anmsid New Member

    Hi,
    Maybe you should try to modify /root/ispconfig/script/shell/create_chroot_env.sh

    I have modified the script based on this post (http://www.howtoforge.com/forums/showthread.php?p=35575)

    The modified script works fine on my Ubuntu 6.06 server.

    Before that, all chrooted users couldn't login and always get error messages: /bin/bash no such file

    Of course, you must re-run the script for existed users:
    Just type: /root/ispconfig/script/shell/create_chroot_env.sh username

    CMIIW
     
  8. alexillsley

    alexillsley New Member

    Thanks, but the file /etc/terminfo doesnt exist on that script so i commeneted it out. I then created a new user in ISPConfig and tryed logging in however it still did the same, just closes as soon as i log in:confused: Any ideas?
     
  9. mlz

    mlz Member

    Double check your password file. When I first was setting this up, I had the /./ in the wrong spot so it couldn't find anything correctly. Home dir should be something like /var/www/web1/./
     
  10. alexillsley

    alexillsley New Member

    Thanks, but it looks ok to me:confused: Here is the whole line
    Code:
    fphost5_test:x:10114:10005:Test:/var/www/web5/user/fphost5_test/./:/dev/null
     
  11. anmsid

    anmsid New Member

    Are you sure that fphost5_test user have shell access permission? /dev/null looks like not a valid shell. It should be /bin/bash or /bin/sh

    You must checked Shell Access permission for the whole site and each user you want to chroot in ISPCOnfig control panel
     

Share This Page