1846469 Members
4016 Online
110256 Solutions
New Discussion

problems with su -

 
Declan Heerey
Frequent Advisor

problems with su -

When trying to su - oracle or any other user(as root) is get the following error;

su: No shell

I have looked at the /etc/passwd file and the shell appears to be set correctly for the users i am trying to switch to i.e /usr/bin/sh and /usr/bin/ksh

any ideas?
4 REPLIES 4
Chris Wilshaw
Honored Contributor

Re: problems with su -

It could be that the shell has a space at the end of the line, or a hidden control character in there.

run

pwck 2>&1 | more

This will check that your passwd file is valid.
Declan Heerey
Frequent Advisor

Re: problems with su -

I have run pwck 2>&1 | more as suggested and there are no problems found with the users that i am trying to su up as! Appreciate the advice though and pwck is very handy indeed :o)
Chris Wilshaw
Honored Contributor

Re: problems with su -

Do you also get the message "Memory fault"?

If so, your shell could be pointing to a file that no longer exists.
Declan Heerey
Frequent Advisor

Re: problems with su -

No no memory fault! I think i have found the problem now - someone has changed the premissions on all the directories (home / etc / tmp) in the root directory!

Problem solved - thanks for the import guys!!

:o)