This is a discussion on /dev/pts/1: Operation not permitted within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Whenever I su to a user and provide the environment tag: 'su - <user>' I get this message: /dev/pts/1: ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Whenever I su to a user and provide the environment tag: 'su - <user>' I get this message: /dev/pts/1: Operation not permitted Without the tag (-) the message does not appear. I just set up a new user with all the defaults and this keeps happening. Is there any way around this? I'm using 10.2. |
| |||
| Peter wrote : > > 'su - <user>' > > I get this message: > > /dev/pts/1: Operation not permitted > From 'man biff': "su(1), and biff don't seem to get on too well. This is probably due to the tty still being owned by the person using su. This can result in ``Permission denied'' messages when attempting to change the biff status of your session. > > Is there any way around this? I'm using 10.2. > You can cqomment out these tree lines in /etc/profile: if [ -x /usr/bin/biff ]; then biff n fi -- Thomas O. This area is designed to become quite warm during normal operation. |
| |||
| Thank you very much. That did it. As people may have noticed, I am sending in numerous posts. This machine has been doing everything well I haven't had to interact with it much. Now that I am beginning to interact with it again, I am noticing a pile of warts that need cleaning. Thanks to everyone who helped (although I'm still working on the man latency issue). -- Peter |
| |||
| On Thu, 16 Feb 2006 13:16:40 -0800, Peter wrote: > Thank you very much. That did it. However 'biff n' disables mail notification for any login shell... A test for the current tty/pty owner should workaround that though: TTY=`tty` if [ `ls -l $TTY |cut -d' ' -f4` != $USER ]; then biff n else biff y fi ( Or just bitbucket the stderr filehandle instead, like: 2>/dev/null .) -- -Menno. |
| |||
| Menno Duursma wrote : > > However 'biff n' disables mail notification for any login shell... Thats the default setting for Slackware, and thats what effect the error message when using 'su - user', and changing it to "biff y" wont help. -- Thomas O. This area is designed to become quite warm during normal operation. |
| |||
| On Fri, 17 Feb 2006 23:26:41 +0100, Thomas Overgaard wrote: > Menno Duursma wrote : >> >> However 'biff n' disables mail notification for any login shell... > > Thats the default setting for Slackware, and thats what effect the error > message when using 'su - user', and changing it to "biff y" wont help. How about the code i posted though? -- -Menno. |
| |||
| Menno Duursma wrote : > How about the code i posted though? Doesn't change anything. Its a bug in either biff or su, they don't cope very well. -- Thomas O. This area is designed to become quite warm during normal operation. |
| |||
| On Sat, 18 Feb 2006 10:33:56 +0100, Thomas Overgaard wrote: > Menno Duursma wrote : > >> How about the code i posted though? > > Doesn't change anything. It should! (Problem could be your $LANG setting before executeing the 'ls -l' there). > Its a bug in either biff or su, they don't cope very well. Nonsense. There is no "bug" with either. It's just that after a 'su' the parent shell still owns our tty (look at the output of 'pstree -p -u'), which implys one still gets the mail notification of the initial login rather then for the id changed to. -- -Menno. |
| |||
| On Sat, 18 Feb 2006 10:56:37 +0100, Menno Duursma wrote: > On Sat, 18 Feb 2006 10:33:56 +0100, Thomas Overgaard wrote: >> Menno Duursma wrote : >> >>> How about the code i posted though? >> >> Doesn't change anything. > > It should! Maybe you like this snipped better then: # Notify user of incoming mail. This can be overridden in the user's # local startup file (~/.bash.login or whatever, depending on the shell) if [ -x /usr/bin/biff ]; then if [ -x /usr/bin/tty ]; then TTY=`/usr/bin/tty` fi if [ "`ls -l $TTY |cut -d' ' -f4`" == "$USER" ]; then echo "Enabling mail notification for user $USER: /usr/bin/biff y" /usr/bin/biff y fi fi -- -Menno. |