1833043 Members
2417 Online
110049 Solutions
New Discussion

su: No shell

 
SOLVED
Go to solution
-error
Occasional Contributor

su: No shell

hi.
after this weekend we've found one of our itanium servers unaccessible. only root user can login to it.
'su' complains:
[cut]
(svback2)/>su - sergey
su: No shell
[cut]
/etc/passwd entry looks quite ok to me:
[cut]
(svback2)/>grep sergey /etc/passwd
sergey:xxxxxxxxxxx:108:20::/home/sergey:/usr/local/bin/bash
[cut]
i have truss output. there's couple of strange things in it.
1. chdir() syscal failed with EACCES, while
[cut]
(svback2)/>ll -d /home
dr-xr-xr-x 42 bin bin 8192 Aug 16 11:02 /home
(svback2)/>ll -d /home/sergey
drwxr-xr-x 12 sergey users 8192 Aug 17 11:40 /home/sergey
[cut]
and same strange thing with execve syscall.
(svback2)/>ll /usr/local/bin/bash
-rwxr-xr-x 1 root sys 1552184 Aug 9 2006 /usr/local/bin/bash
(svback2)/>ll -d /usr/local/bin
dr-xr-xr-x 2 bin bin 8192 Apr 27 15:39 /usr/local/bin
(svback2)/>ll -d /usr/local
dr-xr-xr-x 17 bin bin 8192 Apr 27 15:29 /usr/local
(svback2)/>ll -d /usr
dr-xr-xr-x 22 bin bin 8192 Jan 31 2007 /usr
[cut]
we've tried to reboot this server. it doesn't helped. but in /var/adm/rc.log one strange thing appeared, which wasn't there before:
[cut]
Clean UUCP
Output from "/sbin/rc2.d/S202clean_uucp start":
----------------------------
cleaning up uucp
/usr/lib/hpux32/uld.so: Unable to open '/usr/lib/hpux32/dld.so'.
/sbin/rc2.d/S202clean_uucp[42]: 721 Abort
ERROR CODE 134
"/sbin/rc2.d/S202clean_uucp start" FAILED
[cut]
uld.so and dld.so are OK and accessible (compared to alive system), their MD5 hashes matches.
i have no clue what heppend there. pls help.
5 REPLIES 5
AwadheshPandey
Honored Contributor
Solution

Re: su: No shell

check the permissions it should be 755
drwxr-xr-x 45 root root 8192 Aug 20 08:40 /
It's kind of fun to do the impossible
Luk Vandenbussche
Honored Contributor

Re: su: No shell

What is the version of your OS.

Check the permissions of /usr/lib/hpux32/dld.so
whiteknight
Honored Contributor

Re: su: No shell

hi -error,

su no shell message:-

The problem could be because of incorrect permissions and / or ownerships on the
root directory. It should be:

# ll -d /
drwxr-xr-x 31 root root 5120 Mar 29 04:19 /



WK
Problem never ends, you must know how to fix it
-error
Occasional Contributor

Re: su: No shell

thnks guys.
Awadhesh and whiteknight both were right. prmissions on / was 700. i changed 'em to 755 and and everything began to work again.
thanks a lot.
Dennis Handly
Acclaimed Contributor

Re: su: No shell

>permissions on / was 700.

Do you need to ask the meta question how it got that way?
I think "swverify \*" would catch other bad system directories.