Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
screen in chrooted jail
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
yszhang
n00b
n00b


Joined: 05 Feb 2005
Posts: 11

PostPosted: Mon Oct 01, 2007 9:03 pm    Post subject: screen in chrooted jail Reply with quote

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
View user's profile Send private message
embobo
Guru
Guru


Joined: 19 May 2003
Posts: 311

PostPosted: Mon Oct 01, 2007 10:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
yszhang
n00b
n00b


Joined: 05 Feb 2005
Posts: 11

PostPosted: Tue Oct 02, 2007 1:46 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum