Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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
like image 858
danielpcox Avatar asked Feb 20 '12 18:02

danielpcox


1 Answers

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.

like image 187
Ben Butler-Cole Avatar answered Sep 28 '22 05:09

Ben Butler-Cole