1834403 Members
2752 Online
110067 Solutions
New Discussion

No shell

 
SOLVED
Go to solution
Luis Hétor Desachy
Occasional Contributor

No shell

Hi I need you help!!
I've a user in hpux 11.i and when she/he try to access the message appears.
"no shell"
"Connection closed by foreign host"

I verified the permission in /etc/passwd /etc/group /usr/bin/sh /bin/sh, etc.

what append.
7 REPLIES 7
Bill Hassell
Honored Contributor
Solution

Re: No shell

Start by verifying that no one has played around with directory permissions:

drwxr-xr-x 21 root root 8192 Apr 4 08:51 //
dr-xr-xr-x 31 bin bin 8192 Apr 9 18:48 /etc/
dr-xr-xr-x 24 bin bin 8192 Feb 28 08:09 /usr/

Don't change these permissions.

/bin does not exist and hasn't for more than 10 years. It is a transition link so to avoid problems in the future, it should not be used in scripts or in /etc/passwd. The shells are located in /usr/bin.

If the above are OK, use su - username and see what happens. Also check: logins -x -l username


Bill Hassell, sysadmin
lawrenzo
Trusted Contributor

Re: No shell

the line in /etc/password should be something like:

:*:35380:102::/home1/c/:/usr/bin/ksh.

the /usr/bin/ksh or /usr/bin/sh should be present here as this denotes which shell the user should use at login.

if this is missing type:

# usermod -s /usr/bin/sh

HTH
hello
Alex Lavrov.
Honored Contributor

Re: No shell

Also verufy that the shell appears as valid shell in /etc/shells file.
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Deepak Kulkarni
Regular Advisor

Re: No shell

Hi Luis Hétor Desachy

Can you please paste the /etc/passwd. Or See that the shell exists in the /etc/passwd file.

Thanks
D K
Betty Fessler
Frequent Advisor

Re: No shell

I just had this happen also and it was a space at the end of the p/w for the id.
The id had been manually entered into /etc/passwd through vi, not sam.

The entry must end on the last letter of the shell, not one space over.
Sorrel G. Jakins
Valued Contributor

Re: No shell

Luis,

The preceding responses ought to have solved your problem. If you are still having problems, then
grep /etc/passwd
and paste / post the result here.

Betty,
Repeat aloud ten times
"I must never vi /etc/passwd"
If it is not you, then go find who it is and rap them over the fingers with a 2-by-4
Kent Ostby
Honored Contributor

Re: No shell

also you can run pwck and see if there are other problems in (for instance) a previous line of the password file, that need to be fixed.

"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"