View previous topic :: View next topic |
Author |
Message |
yszhang n00b
Joined: 05 Feb 2005 Posts: 11
|
Posted: Mon Oct 01, 2007 9:03 pm Post subject: screen in chrooted jail |
|
|
I am trying to setup jail env allow user to run screen, who will snoop regular user screen sessions. I followed http://gentoo-wiki.com/HOWTO_Jail and http://gentoo-wiki.com/HOWTO_Snoop_terminal_session#Screen, besides that I jailadduser each regular users, addjailsw screen, chmod ug+s /var/chroot/usr/bin/screen, then created dir /var/chroot/var/run/screen, and did soft link of each S-users from /var/run/screen.
but still got error message "Must be connected to a terminal." dev are mounted BTW
/dev on /var/chroot/dev type none (rw,bind)
none on /var/chroot/dev/pts type devpts (rw)
Can anyone have same setup help me? |
|
Back to top |
|
|
embobo Guru
Joined: 19 May 2003 Posts: 311
|
Posted: Mon Oct 01, 2007 10:53 pm Post subject: |
|
|
You need /proc mounted as well:
Code: |
freddy ~ # linux32 chroot /nfsroot/fantastico /bin/bash
freddy / # screen
Must be connected to a terminal.
freddy / # exit
freddy ~ # mount --bind /proc /nfsroot/fantastico/proc
freddy ~ # linux32 chroot /nfsroot/fantastico /bin/bash
freddy / # screen
[screen is terminating]
freddy / #
|
|
|
Back to top |
|
|
yszhang n00b
Joined: 05 Feb 2005 Posts: 11
|
Posted: Tue Oct 02, 2007 1:46 am Post subject: |
|
|
Thanks, that fix the device problem, but I still can't get everything works. the setup is to allow chrooted user snoop regular user. when regular user start screen, socket is under /var/run/screen. I cant manage chrooted user to see that socket. it doesnt like link.
screen -r foo/
Cannot access /var/run/screen/S-foo: Too many levels of symbolic links
Can you share your setup, or if you know some good resource that I can reference. Thanks alot. |
|
Back to top |
|
|
|