LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-10-2005, 08:59 PM   #1
buaku
Member
 
Registered: Sep 2004
Distribution: Slackware 10.2 (2.4.31)
Posts: 119

Rep: Reputation: 15
su - user : /dev/pts/# Operation not permitted problem


The subject about explains it all.

su - user
used to work fine, then it seemed to stop working properly and is now giving me this error:

as root...
su - buaku
/dev/pts/0: Operation not permitted

It changes to the user just fine, but I'm wondering about the error.
The user is using the bash shell, with no .profile or .login or anything

I read somewhere else about adding the user to the wheel group, but that dind't help. Also tried adding the user to the tty group with no luck.

Anyone else have any ideas?
 
Old 08-11-2005, 05:59 AM   #2
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Does this look familiar?
Code:
mingdao@james:~$ pwd
/home/mingdao
mingdao@james:~$ su - anna
Password: 
/dev/pts/2: Operation not permitted
anna@james:~$ pwd
/home/anna
anna@james:~$ $PATH
-su: /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/opt/www/htdig/bin:/usr/lib/java/bin:/usr/lib/java/jre/bin:/usr/lib/java/bin:/usr/lib/java/jre/bin:/opt/kde/bin:/usr/lib/qt/bin:/usr/share/texmf/bin:.: No such file or directory
anna@james:~$ su -
Password: 
root@james:~# su - anna
/dev/pts/2: Operation not permitted
anna@james:~$ pwd
/home/anna
anna@james:~$ $PATH
-su: /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/opt/www/htdig/bin:/usr/lib/java/bin:/usr/lib/java/jre/bin:/usr/lib/java/bin:/usr/lib/java/jre/bin:/opt/kde/bin:/usr/lib/qt/bin:/usr/share/texmf/bin:.: No such file or directory
anna@james:~$ exit
logout
root@james:~# exit
logout
anna@james:~$ exit
logout
mingdao@james:~$
I'm just thinking out loud here, since no one showed up yet
who really knows about this.
Code:
mingdao@james:~$ ls -al /dev/pts/2 
crwx-w----  1 mingdao tty 136, 2 2005-08-11 16:55 /dev/pts/2
I don't know the purpose of that, but users have no perms there.
And the output on my box shows nobody has perms for group tty:
Code:
mingdao@james:~$ less /etc/group
tty::5:
However, as you can see from my output, from both user mingdao
and user root, user anna was allowed to "su - anna" and had her
working environment in both instances.

I'm sorry I'm not much help, just posting what happens on one of
my Slack boxen. Looks like I've changed users to anna and that I
have her environment variables, though.
 
Old 08-11-2005, 07:03 PM   #3
buaku
Member
 
Registered: Sep 2004
Distribution: Slackware 10.2 (2.4.31)
Posts: 119

Original Poster
Rep: Reputation: 15
Yeah that looks about right.
I've read it could have something to do with the tty permissions, like when you su to the new person, it's trying to do something to the tty, but the tty is still owned by the old person.

So in your example when you su to anna, she is trying to do something to the tty, but mingdao still owns it or something.

I've seen stuff like check your login scripts for something to do with 'mesg n' or 'biff y'.

In my case my user doesn't have any login scripts of their own, just the system ones I guess.

I don't remember this always happening, but its possibly I never noticed it till now.
 
Old 08-11-2005, 07:25 PM   #4
buaku
Member
 
Registered: Sep 2004
Distribution: Slackware 10.2 (2.4.31)
Posts: 119

Original Poster
Rep: Reputation: 15
Upon further inspection of my /etc/profile it does have a line in there that runs 'biff y'.
I also tried tcsh as my users shell and still got the same error and looking in the /etc/csh.login it also has a 'biff y' line.

After commenting out that line I redid the 'su - buaku' command and I don't get the /dev/pts error anymore.

So...biff is the culprit.
The biff man page even mentions the fact it doesn't play nice with 'su'.
Quote:
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.
I guess that solves the problem, hehe.
Kind of odd though.
 
Old 10-16-2005, 08:08 PM   #5
scripthead
LQ Newbie
 
Registered: Oct 2005
Posts: 5

Rep: Reputation: 0
/etc/profile contains the following

# 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
biff y
fi

just comment out the like that says "biff y"
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
hdparm -d1 /dev/hda gives me "HDIO_SET_DMA failed: Operation not permitted" elluva Linux - Hardware 7 07-21-2007 03:49 AM
Mount SMB drive as user: Operation Not Permitted paco36 Linux - General 6 09-12-2004 06:07 PM
tar problem "Cannor utime: Operation not Permitted' l32 Linux - Newbie 1 06-28-2004 05:18 PM
/dev/pts/xx operation not permitted deb75 Slackware 0 03-25-2004 05:10 AM
/dev/pts/7: Operation not permitted kiley_rodgers Slackware 2 01-10-2004 10:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration