Unix Technical Forum

/dev/pts/1: Operation not permitted

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: ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-20-2008, 02:39 PM
Peter
 
Posts: n/a
Default /dev/pts/1: Operation not permitted

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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-20-2008, 02:39 PM
Thomas Overgaard
 
Posts: n/a
Default Re: /dev/pts/1: Operation not permitted


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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 02:39 PM
Peter
 
Posts: n/a
Default Re: /dev/pts/1: Operation not permitted

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-20-2008, 02:40 PM
Menno Duursma
 
Posts: n/a
Default Re: /dev/pts/1: Operation not permitted

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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-20-2008, 02:40 PM
Thomas Overgaard
 
Posts: n/a
Default Re: /dev/pts/1: Operation not permitted


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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-20-2008, 02:40 PM
Menno Duursma
 
Posts: n/a
Default Re: /dev/pts/1: Operation not permitted

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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-20-2008, 02:41 PM
Thomas Overgaard
 
Posts: n/a
Default Re: /dev/pts/1: Operation not permitted


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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-20-2008, 02:41 PM
Menno Duursma
 
Posts: n/a
Default Re: /dev/pts/1: Operation not permitted

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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-20-2008, 02:41 PM
Menno Duursma
 
Posts: n/a
Default Re: /dev/pts/1: Operation not permitted

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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-20-2008, 02:41 PM
Thomas Overgaard
 
Posts: n/a
Default Re: /dev/pts/1: Operation not permitted


Menno Duursma wrote :

> Maybe you like this snipped better then:


Hell yeah, that did the trick.
--
Thomas O.

This area is designed to become quite warm during normal operation.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:02 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com