1753403 Members
7303 Online
108793 Solutions
New Discussion юеВ

Re: No Shell

 
Acxiom Unix Team
Frequent Advisor

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??

FYI, We are using NIS so i dont know if that makes any difference.
Where is my beer...??
5 REPLIES 5
Tingli
Esteemed Contributor

Re: No Shell

Does this user have a home directory?

Re: No Shell

1. Check that passwd file doesn't have any strange chars on that line by using:

cat -v /etc/passwd

2. Check permissions on / are 755

3. Check that permissions on /usr and /usr/bin are 555

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Mark S Meadows
Valued Contributor

Re: No Shell

Hi Andrew,

What are the permissions of the /usr/bin/sh :

/home/markme/bin# ll /usr/bin/sh
-r-xr-xr-x 2 bin bin 681016 Jun 18 2008 /usr/bin/sh

If the shell appears to be ok, validate the passwd file with 'pwck' in case there is something on toward - is this user the last entry in the file ?

Regards,

Mark

Administrating HP-UX systems for more years than I care to admit, but still enjoying it (most of the time!).
OldSchool
Honored Contributor

Re: No Shell

you didn't happen to mention if that user is the only one using /usr/bin/sh.

also, what do the following return:

1) ls -l /usr/bin/sh
2) ls -l /etc/shells
3) if (2) finds a file, then
cat /etc/shells

Can you set that user to something like ksh, and if so, does that work?
Acxiom Unix Team
Frequent Advisor

Re: No Shell

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.
Where is my beer...??