Operating System - HP-UX
1748255 Members
3902 Online
108760 Solutions
New Discussion юеВ

Re: Can not login as root remotely and in the console/server

 
monster00
Advisor

Can not login as root remotely and in the console/server

I can't login as root remotely and on server. when i try to login as a different user, it is successful but when i tried root and key in the passwd - (su - root) it says su: no shell

what to do? please help!
31 REPLIES 31
Suraj K Sankari
Honored Contributor

Re: Can not login as root remotely and in the console/server

Hi,

Do you have any root equivalents user on your system? If yes then login with that user

Suraj
monster00
Advisor

Re: Can not login as root remotely and in the console/server

nothing
Kapil Jha
Honored Contributor

Re: Can not login as root remotely and in the console/server

Just check is you have correct entried in /etc/securetty
and if in root passwd if you have special character use "\" before it.
eg if passwd is abc!@#
enter abc\!\@\#
WOuld help I suppose.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
Bart Paulusse
Respected Contributor

Re: Can not login as root remotely and in the console/server

when you do a cat /etc/passwd is the default shell for user root still valid?
The su: No shell message means that su can't find the default shell mentioned in the passwd file.

If the default shell for user root points to a non existing file, try to create a link there that points to an existing shell.
The fix the passwd file and remove the link.
If /sbin/sh (usualy root's default shell) is gone, you may be getting more issues. That shouln;t "dissapear"

regards,

Bart
monster00
Advisor

Re: Can not login as root remotely and in the console/server

i have not /etc/securetty file.
monster00
Advisor

Re: Can not login as root remotely and in the console/server

root:F/RO/8Au5Hd16:0:3::/:/sbin/sh
Bart Paulusse
Respected Contributor

Re: Can not login as root remotely and in the console/server

What does "ls -l /sbin/sh" return?
monster00
Advisor

Re: Can not login as root remotely and in the console/server

-r-xr-xr-x 1 bin bin 1402088 Feb 16 2007 /sbin/sh
monster00
Advisor

Re: Can not login as root remotely and in the console/server

this is what it display


$ su - root
Password:
su: No shell
$