Operating System - HP-UX
1826501 Members
1873 Online
109692 Solutions
New Discussion

No shell message during login

 
SOLVED
Go to solution
so_2
Regular Advisor

No shell message during login

Hi All,

I am trying to connect to my hp-ux server but it is not allowing to login and exit wit "no shell " error.

It seems either the /usr/bin/sh is not available or /usr permission got changed. Is there any way for me to login to the server?
Pls advice.

thanks
S.O
9 REPLIES 9
Steven E. Protter
Exalted Contributor

Re: No shell message during login

Shalom SO

Check the shell in /etc/passwd and make sure it exists with appropriate permissions. It must be read execute.

You should still be able to log into the server from the console as root. Then you can get the appopriate files from another server and restore normal login.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Peter Godron
Honored Contributor

Re: No shell message during login

First check that the login shell in /etc/password is correct.

Then check existance adn permissions on the shell defined in /etc/passwd.

To get into the server, either su via another userid or go to the console.
rariasn
Honored Contributor

Re: No shell message during login

Hi so,

#ll /usr/bin/ksh /usr/bin/sh /usr/bin/csh
-r-xr-xr-x 1 bin bin 155648 Jun 21 2004 /usr/bin/csh
-r-xr-xr-x 2 bin bin 159744 Jul 14 2004 /usr/bin/ksh
-r-xr-xr-x 2 bin bin 204800 Oct 21 2003 /usr/bin/sh

#ll -d /bin
lr-xr-xr-t 1 root sys 8 Sep 3 2003 /bin -> /usr/bin

#ll /etc/passwd
-r--r--r-- 1 root sys 3517 Feb 2 17:53 /etc/passwd

#grep $user_name /etc/passwd

rgs,

ran


Mancboy
Valued Contributor

Re: No shell message during login

It looks like no :-(

I've just tried a few hacks that I use whenever the process table fills, but sadly they still want the shell to exist.

All I can say, is if your account is in LDAP or NIS, then you can change it remotely.
Otherwise, log on as root (/sbin/sh HAS to be there!) and check the shell out that way.

sorry :-(
so_2
Regular Advisor

Re: No shell message during login

Hi all

There are no ways for me to check all this... the minimum requirement is I should login right!!!1. but if it is no allowing to login ...

Thanks
S.O
rariasn
Honored Contributor

Re: No shell message during login

Hi so,

# man login
...
No shell
The user shell (/usr/bin/sh if shell name is null in /etc/passwd) could not be started with the exec command. Consult system
administrator.

If no root "shell":

* Reset server and boot "single user"

sorry,

ran
Patrick Wallek
Honored Contributor
Solution

Re: No shell message during login

Do you have a web console, LAN console access, or a direct attached console? If so, you should use that to login as root directly.

Then from there you can troubleshoot your other login issues.
roots default shell is /sbin/sh, so you should be able to login. If you get the same thing for root then your only choice may be single-user mode.
so_2
Regular Advisor

Re: No shell message during login

Hi patrik,

Thanks for your solution.
But i took a different one.
I am the remote adm and i can ftp to the system using root.(direct root login is not possible for me.).

I ftp ed to the system and used chmod to change the permission of directories under /.

I could login after that.
Thanks everybody.
S.O
Steven E. Protter
Exalted Contributor

Re: No shell message during login

I hope you made sure the permission changes you made were consistent with a working system or you could be back here again looking for assistance with an unbootable system.

good luck though.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com