1752295 Members
5090 Online
108786 Solutions
New Discussion

Re: su: tty+

 
Laurent Menase
Honored Contributor

Re: su: tty+

it can be because it is a script run through ssh or remsh

ie:
ssh root@127.0.0.1 tty
root@127.0.0.1's password:
not a tty

if you want to avoid that run
ssh -t root@127.0.0.1 tty

root@127.0.0.1's password:
/dev/pts/0
Connection to 127.0.0.1 closed.
Laurent Menase
Honored Contributor

Re: su: tty+

jsut forgot to precise

ssh with a command doesn't use a tty by default
for instance
ssh root@127.0.0.1 sh
tty
not a tty
su johan
id
uid=5(johan) gid=40(yo)