Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

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.