No Shell

Hi,

I have an issue that i have never come across before. I have 1 user on a server who cannot login. When they connect using Putty and put in the login id and password the session is terminated. It is as if they had /usr/bin/false in /etc/passwd but they dont. This is the password entry;

wrops:p3ixIRQI1gw4.:8101:154:Ops,,,:/home/wrops:/usr/bin/sh

Also, if i try to su to this user i get a reply

su: No shell
Memory fault

This is only happening with this one user and i wonder if anyone has come across this before and might have some ideas on where to look??

To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags

```text
 and 
```

by hand.)

Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.

Thank You.

The UNIX and Linux Forums

No solution, alas, from my side, but a bunch of ideas:

Have you checked /usr/bin/sh to be what it should be: an executable containing a shell?

Maybe in your system there is a list of allowed login shells maintained. Is /usr/bin/sh among them? (I had this once when a user changed his login shell to bash on an AIX system and then couldn't log in.)

Are the rights for /usr/bin/sh (and its parent directories) set correctly so that the user can execute it?

Anyways, i hope you post the solution once you find it. This sounds interesting.

bakunin

Or maybe you are using NIS. Look at your /etc/nssswitch.conf.

Have you run the password file syntax checker "pwck" ?

In my browser display of you post the 6th character of the password line is a smiley face not a colon. I can't see a proper colon separator between field 1 (username) and field 2 (encrypted password). Maybe you have a bad character in the password file. If so, remember to use "vipw" not "vi".

I can confirm the passwd file is correct. This is how it should of been displayed previously.

wrops:p3ixIRQI1gw4.:8101:154:Ops,,,:/home/wrops:/usr/bin/sh

I have looked at /usr/bin/sh and it looks okay.

We do use NIS (of which i have no experience having only joined this company last week) so i dont know if that makes any difference. It just seems odd that it only effects this one user....

I will do some more looking around but if anyone has any other ideas on where to look please let me know.

Thankyou.

What OS? (AiX?)

Hi,

we have similar issues when the homedir doesnt exist or is owned by the wrong / another user or has unsufficient permissions or when the .profile in the homedir is pointing to another shell that doesn't exist on the box - eg bash. Did you check this?

Rgds
zxmaus

This can be caused by an adjacent line in /etc/passwd which is corrupt.
Did you run "pwck" ?

I have found the problem.

Someone yesterday had changed the ownerships of /home from root:root to uedna:ukcs.

Luckily 95% of users on this box are in the same group, hence no problems reported.

So changed it back and it all works now. Thanks to all help and suggestions offered.