3

When I logged in a server and issue a 'screen -list' commands it gives the following result -

31917.pts-5.office      (Detached)
31844.pts-0.office      (Detached) 

But it is sometimes important to know who has start the screen session - eg.- as system admin may want to kill some specific screen session and when it's important to know who start the session. Is there any way to know who is initiator/owner of the screen session?

Thanks

Razib
  • 175
  • 6

1 Answers1

3

The screen -ls | screen -list commands only show you your own screen sessions even for root. As far as I know that's as good as it gets for screen itself.

If you want to see which screen sessions have been started by which users look in each users directory in /var/run/screen/

ls -lR /var/run/screen
/var/run/screen:
total 0
drwx------ 2 iain iain 80 Feb 20 18:14 S-iain
drwx------ 2 root root 60 Feb 20 18:19 S-root

/var/run/screen/S-iain:
total 0
prw------- 1 iain iain 0 Feb 20 18:13 4093.pts-0.host1
prw------- 1 iain iain 0 Feb 20 18:14 4105.pts-0.host1

/var/run/screen/S-root:
total 0
prw------- 1 root root 0 Feb 20 18:19 4128.pts-0.host1
user9517
  • 115,471
  • 20
  • 215
  • 297