How to stop this redirection?

How to stop redirection to /dev/pts/x

  • 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?

  • Answer:

    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 ;-)

linud at Super User Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.