1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

chroot jail FreeBSD "su: who are you?"

Discussion in 'General' started by Dr_Death_UAE, May 27, 2009.

  1. Dr_Death_UAE

    Dr_Death_UAE New Member

    Messages:
    22
    Likes Received:
    0
    Hello, i create chroot jail every thing fine but when i try to login with the jailed user with su i got:
    from the logs:

    from visudo:
    from "/home/jail/etc/passwd":
    from "/etc/passwd":
    the "chroot-shell" include:
    i use the same methods with linux systems it work fine, i use pwd_mkdb to update the master.passwd on the jail:
    but still the same. i read that i need to use rssh as the shell instead of bash shell.
     
  2. vivek

    vivek New Member

    Messages:
    809
    Likes Received:
    0
    You can login to jail using jexec if openssh not installed in a jail:
    Code:
    jls -v
    jexec jailid csh
    
    If openssh installed and normal user account created make sure that account is a part of wheel group. Again login using jexec and create user account using pw. Once done start openssh so that user can login into the account and use su -
     
  3. SirDice

    SirDice Moderator Staff Member Moderator

    Messages:
    17,427
    Likes Received:
    15
    chroot != jail

    So which one is it? A chrooted or a jailed environment?

    Please see jail(8) and chroot(8) for the differences.
     
  4. vivek

    vivek New Member

    Messages:
    809
    Likes Received:
    0
    OP: yes this is confusing as pointed out by SirDice. Please clarify... on freebsd there is no need to use chroot call. chroot(2) can be escaped easily; use jails.
     
  5. Dr_Death_UAE

    Dr_Death_UAE New Member

    Messages:
    22
    Likes Received:
    0
    Hello, it is chroot.