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.