Is running GNU Screen suid root the only way to make multiuser mode work? [closed]
Asked Answered
P

1

8

I'm running Ubuntu 11.10 and GNU Screen version "4.00.03jw4", and I'm trying to use multiuser mode.

The following process works for me:

as user "first_user"
> sudo chmod u+s /usr/bin/screen
> sudo chmod 755 /var/run/screen

and only after that can you do
> screen -S session_name
or if you've already created a screen session,
> screen -r session_name

and inside of screen:
>^A:multiuser on
>^A:acladd second_user "#?"

and if you want second_user to only be an observer
>^A:aclchg second_user -w "#?"

now you can, as user "second_user", do
> screen -x first_user/
to connect 

when you're all done, do 
> sudo chmod u-s /usr/bin/screen
> sudo chmod 775 /var/run/screen

because running screen suid root is a security risk

This is depressing. I've been searching diligently, but I can't find a better way. Is there one?

Update:

  • There is a bug in screen 4.06. Users can connect to a shared session, but can't send a command over it like: screen -S shared_session_name -X stuff "comands\n".
  • In the screen 4.09 it is fixed
Pronator answered 20/2, 2012 at 18:50 Comment(1)
An update on this: I just got a little more information from "twb" on freenode #screen: "On debian/ubuntu, /usr/share/doc/screen/README.Debian, last para" Still says I'll need suid root, though. He also recommended tmux.Pronator
A
2

You are right. This is the only way to get multiuser screen running.

However, unless your box is very exposed, I don't think that leaving the suid bit on is a huge security risk.

Anathema answered 22/3, 2012 at 10:5 Comment(2)
Thanks Ben. For other reasons I've switched to tmux, and I wrote a blog post on how to do something similar with it that I find satisfying. danielpcox.org/remote-tmux-observationPronator
@Pronator your link is dead, is there another place for it? or a different solution after all this time?Shluh

© 2022 - 2024 — McMap. All rights reserved.