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:
Quote:
May 27 15:33:28 h4x0r sudo: r0x : TTY=ttyp0 ; PWD=/ ; USER=root ; COMMAND=/usr/sbin/chroot /home/jail /usr/bin/su - r0x
|
from visudo:
Quote:
r0x ALL=NOPASSWD: /usr/sbin/chroot, /usr/bin/su - r0x
|
from "/home/jail/etc/passwd":
Quote:
r0x:*:1003:1003:User &:/home/r0x:/usr/local/bin/bash
|
from "/etc/passwd":
Quote:
r0x:*:1003:1003:User &:/home/jail/home/r0x:/bin/chroot-shell
|
the "chroot-shell" include:
Quote:
#!/usr/bin/env sh
/usr/local/bin/sudo /usr/sbin/chroot /home/jail /usr/bin/su - $USER "$@"
|
i use the same methods with linux systems it work fine, i use pwd_mkdb to update the master.passwd on the jail:
Quote:
pwd_mkdb -d /home/jail/etc/ /home/jail/etc/master.passwd
|
but still the same. i read that i need to use rssh as the shell instead of bash shell.