chroot access problem

Discussion in 'Server Operation' started by adrenalinic, Aug 12, 2006.

  1. adrenalinic

    adrenalinic Member

    Hi.
    I have followed this tutorial setting chroot enviroment.
    http://howtoforge.com/chrooted_ssh_howto_debian_p2

    Now, when try to login with chroot username, the shell access close automaticaly!

    The error is: /bin/bash: No such file or directory
    Connection to 111.111.111.111 closed.

    but the file /bin/bash exist and folders and files have the correct permission.
    Permission: user=root
    group=group

    Any idea?

    Thanks josef
     
    Last edited: Aug 12, 2006
  2. falko

    falko Super Moderator Howtoforge Staff

    What's the username? What's the user's entry from /etc/passwd?
    Which distribution do you use?
     
  3. themachine

    themachine New Member HowtoForge Supporter

    Well, if you are creating SSH in a chroot environment then you need to have all binaries and libraries necessary within the chroot "root" directory. So, if you are chrooting to the user's home directory such as '/home/user' then you must have '/home/user/bin/bash' since '/bin/bash' is from the chroot env '/home/user'.

    Maybe that helps.
     
  4. Mr Blek

    Mr Blek New Member

    Sorry to bump this old thread, but I'm getting the same problem.

    ISPConfig with chroot off:

    web4_admin:x:10004:10004:admin:/srv/www/web4:/bin/bash

    ISPConfig with chroot on:

    web4_admin:x:10004:10004:admin:/srv/www/web4/./:/bin/bash

    When on, the connection simply closes. Any ideas?
     
  5. falko

    falko Super Moderator Howtoforge Staff

    Any errors in your logs?
     

Share This Page