Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

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

share|improve this answer
    
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 '12 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. –  Dmitri Chubarov Apr 29 '12 at 18:45
    
A key logger of some sort might be of help. –  Dmitri Chubarov Apr 29 '12 at 19:25
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.