Operating System - HP-UX
1833777 Members
2148 Online
110063 Solutions
New Discussion

Re: SU command and the /dev/pts file

 
Don Bentz
Regular Advisor

SU command and the /dev/pts file

Is there a way to cause the /dev/pts file ascribed to a login session to be owned by the "new" user when they 'su' (switch users). I have a script my user needs to run that does a loop with a 'read' that needs also to read within the loop from the 'tty' file (/dev/pts/*).
Insecurity is our friend. It keeps you dependent.
1 REPLY 1
A. Clay Stephenson
Acclaimed Contributor

Re: SU command and the /dev/pts file

What you can do is chown the /dev/pts/nn file before the su command and then do a chown back just before exiting the su'ed shell. Both users are still able to read from and write to /dev/pts/nn so that the chown commands will be functional.
If it ain't broke, I can fix that.