1

How can I watch another user's shell session? I'd like to evaluate another user's behavior. I'm looking into using screen, but I don't know how to force his terminal to start a screen session.

Is there a way?

2 Answers 2

3

You can set screen as the login shell for the user with

  usermod -s /usr/bin/screen guest

Logging can be set in /etc/screenrc

3
  • Will that only take effect when he logs in? Because he's already logged in, and I don't want to log him out thus disrupt his work, I just want to make sure he's not being naughty.
    – Rob
    Apr 29, 2012 at 18:39
  • If a user has logged in, monitoring possibilities would vary even if everything she is doing is legitimate. You might look at shell history after she logs off, but if she runs a different shell or midnight commander, you would have to trace relevant history files as well. Apr 29, 2012 at 18:45
  • A key logger of some sort might be of help. Apr 29, 2012 at 19:25
2

You can try tailing the users bash history if you don't want to make them log off.

Log in, and run tail -f /home/<username>/.bash_history.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .