1844820 Members
2038 Online
110233 Solutions
New Discussion

su - is not working

 
Toscanini Montaño
Occasional Advisor

su - is not working

Hi all,

I have a Trusted Mode system with HP-UX 11.00 and when I try to switch root with the command su - the system show this message:

unknown id:root and return the prompt

What is happening in my system??

thanks, Toscanini
9 REPLIES 9
IT_2007
Honored Contributor

Re: su - is not working

your password file might have got corrupted, you may need to fix it.
DCE
Honored Contributor

Re: su - is not working


run the command
grep root /etc/passwd
and see if root has been accidently deleted.

Do you have sudo installed? If so, you will at least be able to switch to root and correct the problem
Toscanini Montaño
Occasional Advisor

Re: su - is not working

I can do a telnet or ssh session without problem.

Just when I run the su command the connection is rejected.

Toscanini
Kevin Wright
Honored Contributor

Re: su - is not working

does su - root work?
IT_2007
Honored Contributor

Re: su - is not working

so when you telnet or ssh, are you able to login as root?

what it shows the path and size for su?

$ ll /usr/bin/su
-r-sr-xr-x 1 root bin 28672 Oct 4 2002 /usr/bin/su
Toscanini Montaño
Occasional Advisor

Re: su - is not working

I don´t have sudo installed on my system but the telnet service is open to connect with root user.

The su - root is not working and this is the permision for su path.

-r-xr-xr-x 1 root bin 24576 Aug 6 1998 /usr/bin/su

I can see only a excution permission for su command.
A. Clay Stephenson
Acclaimed Contributor

Re: su - is not working

This is wrong, su can't possibly work without the setuid bit being set:

-r-xr-xr-x 1 root bin 24576 Aug 6 1998 /usr/bin/su

The mode should be:
-r-sr-xr-x

So chmod 4555 /usr/bin/su and make sure that the ownership remains root:bin.
If it ain't broke, I can fix that.
DCE
Honored Contributor

Re: su - is not working


try a chmod u +s /usr/bin/su

to change the sticky bit
A. Clay Stephenson
Acclaimed Contributor

Re: su - is not working

It's not the sticky bit (octal 1000); it's the setuid bit (octal 4000). chmod 4755 avoids the symbolic "improvements".
If it ain't broke, I can fix that.