1837971 Members
3536 Online
110124 Solutions
New Discussion

Re: No shell

 
SOLVED
Go to solution
yc_2
Regular Advisor

No shell

Hi,

My system suddenly unable to login as a normal user with a "no shell" message.

Appreciate any help.


YC
6 REPLIES 6
Antonio Valle_1
Honored Contributor

Re: No shell

You should check that the last field at the /etc/passwd file for that user has the correct shell and that this executable file exists.

May be the user used the /usr/bin/chsh SUID command to change the shell badly.

Antonio
James R. Ferguson
Acclaimed Contributor
Solution

Re: No shell

Hi:

Causes of 'no shell':

1. A corrupted entry in /etc/passwd for the user receiving the error.

2. Too restrictive $HOME directory permissions -- the directory into which they login must be 75x. If this is OK, check backwards to the root directory which should be 755.

3. The shell not defined in /etc/shells.

4. Improper permissions on the shell executable itself.

...JRF...
Antonio Valle_1
Honored Contributor

Re: No shell

You should check that the last field at the /etc/passwd file for that user has the correct shell and that this executable file exists.

May be the user used the /usr/bin/chsh SUID command to change the shell badly.

Antonio
MARTINACHE
Respected Contributor

Re: No shell

Check the shell which is used for your normal user in /etc/passwd file. (/usr/bin/sh or /usr/bin/ksh, ...)

Look at the shell permissions (555)
Patrice MARTINACHE
Elizabeth_2
Valued Contributor

Re: No shell


Hi Leong!

If no users except the root user can log in, check their access on the shell or on the directories. The files/directories, permissions, owner/group, and chmod parameter are the following:

File/directory Correct Access Correct owner/group Chmod parameters

/bin/sh -r-xr-xr-t bin/bin 4555
/ drwxr-xr-x root/root 755
/bin drwxr-xr-x root/other 755
user home dir. rwx for user user's login name 7xx

The user's home directory only needs rwx for the user. Group and access permissions are not relevant.

If certain users cannot log in, /etc/passwd may be corrupted or the entry in /etc/passwd may be incorrect.

If you log in under the C shell or the Korn shell, the shell file will be /bin/csh or /bin/ksh.

Alan Riggs
Honored Contributor

Re: No shell

Check permissions on the / directory, /usr, /usr/bin, and /etc