cancel
Showing results for 
Search instead for 
Did you mean: 

su: No shell

 
한상희_1
Occasional Visitor

su: No shell

#su -
su: No shell
Segmentation fault

#vi /etc/passwd
root:TlhWDUMmhUbG6:0:3::/:/sbin/tcsh
-> not login
lbs:AO21eh5Sbv6MI:2000:101:LBS,,,:/data6/lbs:/usr/bin/tcsh
-> login

#ftp 192.168.0.3
Name (192.168.0.3:lbs): root
530 User root access denied...
Login failed.

#ftp 192.168.0.3
Name (192.168.0.3:lbs): lbs
230 User lbs logged in.

#rcp /tmp/passwd 192.168.0.3:/etc/passwd
remshd: /sbin/tcsh: No such file or directory

remote Server

please help me.
11 REPLIES

Re: su: No shell

>root:TlhWDUMmhUbG6:0:3::/:/sbin/tcsh

You must never ever do this. The only shell for root is /sbin/sh. Except no substitutes!

After you login, you could invoke tcsh.
The above errors indicate that /sbin/tcsh may not exist at all?
한상희_1
Occasional Visitor

Re: su: No shell

#pwck

root:TlhWDUMmhUbG6:0:3::/:/sbin/tcsh
Optional shell file not found
Invalid root shell
Jeeshan
Honored Contributor

Re: su: No shell

change the shell using vipw command. don't use vi to edit /etc/passwd file.

#vipw
a warrior never quits
Venkatesh BL
Honored Contributor

Re: su: No shell

>#vi /etc/passwd
> root:TlhWDUMmhUbG6:0:3::/:/sbin/tcsh
-> not login
>lbs:AO21eh5Sbv6MI:2000:101:LBS,,,:/data6/lbs:/usr/bin/tcsh
>-> login

Looks like '/sbin/tcsh' is not available of the system (try '11 /sbin/tcsh' command). I think its recommended that you use '/sbin/sh' instead (as proposed by Dennis already).


한상희_1
Occasional Visitor

Re: su: No shell

#vipw
lckpwdf: Permission denied
vipw: Cannot obtain lock for /etc/.pwd.lock
Patrick Wallek
Honored Contributor

Re: su: No shell

Check for the /etc/pwd.lock file. If it's there, remove it.
Jeeshan
Honored Contributor

Re: su: No shell

ok then. use command

#usermod -s root /sbin/sh
a warrior never quits
한상희_1
Occasional Visitor

Re: su: No shell

#rm -rf .pwd.lock
rm: .pwd.lock Permission Denied
#usermod -s root /sbin/sh
Permission Denied

Re: su: No shell

>rm: .pwd.lock Permission Denied

Are you root? What does id(1) show?
If you aren't root, you will have to go into single user mode.

>Venkatesh: I think it's recommended that you use '/sbin/sh' instead

This is NOT just a recommendation, this is a hard requirement.
Venkatesh BL
Honored Contributor

Re: su: No shell

Can you post the output of:
1) id
2) echo $SHELL
Venkatesh BL
Honored Contributor

Re: su: No shell

> Dennis: This is NOT just a recommendation, this is a hard requirement.

http://docs.hp.com/en/5992-4607/ch03s01.html?btnNext=next%A0%BB confirms this. "The login shell in field 7 must be /sbin/sh"