Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is an examination senario. We have mulitple users logging into a RHEL-4 server using putty. These people are part of a same group. They are giving UNIX shell script exam.

They are helping each other copy the code by using redirection to /dev/pts/x. Is there any way I can stop this redirection?

share|improve this question

I'm not sure whether this would have unintended consequences, but what about chmod a-w /dev/pts/*? I ran a little test on my computer and it seemed to have the desired effect of preventing writes to the device, without disabling the terminal window. Your mileage may vary.

Alternatively, assuming each user is logged in under a different username, chmod go-w /dev/pts/* should do it and that's probably safer. (Or equivalently, chmod 0600 /dev/pts/*)

P.S. At first I was tempted to suggest cat /dev/urandom > /dev/pts/x but that'd just make a mess ;-)

share|improve this answer

You must log in to answer this question.

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