Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

root can not logon any more - Invalid Shell error

0 views
Skip to first unread message

Logo Palanisamy

unread,
Oct 7, 1998, 3:00:00 AM10/7/98
to
Hello All,

root can not logon any more on the Sun Solaris 2.6 system. It errors out
with 'Invalid Shell. Logon denied'.

Here is what I did.

I changed the default shell for root to /bin/ksh instead of /bin/sh and
then rebooted the system. Now it doesn't allow me root to login.

We do have some other login-ids whose default shell is /bin/ksh. It
worked fine when I did 'su - login-id' as root. It didn't complain about
/bin/ksh not existing or anything then. Only after verifying that, I
changed it to /bin/ksh for root in /etc/passwd.

Now I am stuck. What is the remedy? How do I change it back to /bin/sh.

Would doubly appreciate if you could CC: me also (Lo...@SabariSoft.com)
besides posting.

Thanks in advance,
Logo Palanisamy.
Lo...@SabariSoft.com

root

unread,
Oct 8, 1998, 3:00:00 AM10/8/98
to
In article <361C46...@SabariSoft.com>, Logo Palanisamy wrote:
>Hello All,
>
>root can not logon any more on the Sun Solaris 2.6 system. It errors out
>with 'Invalid Shell. Logon denied'.
>
>Here is what I did.
>
>I changed the default shell for root to /bin/ksh instead of /bin/sh and
>then rebooted the system. Now it doesn't allow me root to login.
>
>We do have some other login-ids whose default shell is /bin/ksh. It
>worked fine when I did 'su - login-id' as root. It didn't complain about
>/bin/ksh not existing or anything then. Only after verifying that, I
>changed it to /bin/ksh for root in /etc/passwd.
>
>Now I am stuck. What is the remedy? How do I change it back to /bin/sh.
>


try login in as a user, and su without the `-' then change your shell back.
Is /bin/ksh in the /etc/shells file?

Joe Durusau

unread,
Oct 8, 1998, 3:00:00 AM10/8/98
to
Unfortunately, as Casper pointed out to me, su always uses the root shell.
If you have nis, you may be able to get in from another host. Otherwise,
the best bet is to boot from cdrom and fix the passwd file.

Speaking only for myself,

Joe Durusau

Andrew Smallshaw

unread,
Oct 8, 1998, 3:00:00 AM10/8/98
to Lo...@sabarisoft.com
Logo Palanisamy wrote:
>
> Hello All,
>
> root can not logon any more on the Sun Solaris 2.6 system. It errors out
> with 'Invalid Shell. Logon denied'.
>
> I changed the default shell for root to /bin/ksh instead of /bin/sh and
> then rebooted the system. Now it doesn't allow me root to login.
>
> Now I am stuck. What is the remedy? How do I change it back to /bin/sh.

One possible way around this that doesn't involve the boot disks is to
use FTP. Copy /etc/passwd to a normal user, edit it, delete the old one
(in FTP), and send the new one back. Never had to try this though.

--
Andrew Smallshaw
smal...@cs.man.ac.uk

Dhar...@yahoo.com

unread,
Oct 8, 1998, 3:00:00 AM10/8/98
to

> One possible way around this that doesn't involve the boot disks is to
> use FTP. Copy /etc/passwd to a normal user, edit it, delete the old one
> (in FTP), and send the new one back. Never had to try this though.

This won't work if you try to FTP in as root since it will die on your lack of
a valid shell. And chances are most other users won't have the permissions
to edit files in /etc much less overwrite /etc/password.

There are two ways to get around this. One is to boot into single user mode
and edit /etc/password. Failing this, log in as a user that can su to root
and change /etc/passwd.

Noal McDonald
Unix Sys Admin
Olde Discount Brokers

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

David Figueroa

unread,
Oct 8, 1998, 3:00:00 AM10/8/98
to
This should be pretty straightforward -

Boot from your Solaris 2.6 CD.

This should boot you into Single-User mode.

Mount the file system

Edit the /etc/passwd file and change the shell entry for root there.

unmount the file system, and init 0 to reboot.

That should do it.

David Figueroa
Logo Palanisamy wrote in message <361C46...@SabariSoft.com>...


>Hello All,
>
>root can not logon any more on the Sun Solaris 2.6 system. It errors out
>with 'Invalid Shell. Logon denied'.
>

>Here is what I did.
>

>I changed the default shell for root to /bin/ksh instead of /bin/sh and
>then rebooted the system. Now it doesn't allow me root to login.
>

>We do have some other login-ids whose default shell is /bin/ksh. It
>worked fine when I did 'su - login-id' as root. It didn't complain about
>/bin/ksh not existing or anything then. Only after verifying that, I
>changed it to /bin/ksh for root in /etc/passwd.
>

>Now I am stuck. What is the remedy? How do I change it back to /bin/sh.
>

Steven Lembark

unread,
Oct 9, 1998, 3:00:00 AM10/9/98
to Lo...@sabarisoft.com
Logo Palanisamy wrote:
>
> Hello All,
>
> root can not logon any more on the Sun Solaris 2.6 system. It errors out
> with 'Invalid Shell. Logon denied'.
>
> Here is what I did.
>
> I changed the default shell for root to /bin/ksh instead of /bin/sh and
> then rebooted the system. Now it doesn't allow me root to login.
>
> We do have some other login-ids whose default shell is /bin/ksh. It
> worked fine when I did 'su - login-id' as root. It didn't complain about
> /bin/ksh not existing or anything then. Only after verifying that, I
> changed it to /bin/ksh for root in /etc/passwd.
>
> Now I am stuck. What is the remedy? How do I change it back to /bin/sh.
>
> Would doubly appreciate if you could CC: me also (Lo...@SabariSoft.com)
> besides posting.
>
> Thanks in advance,
> Logo Palanisamy.
> Lo...@SabariSoft.com

(1) ksh normally lives in /usr/bin.
(2) check that ksh is in /etc/shells.

--
Steven Lembark 2930 W. Palmer St.
Workhorse Computing Chicago, IL 60647
lem...@wrkhors.com 800-762-1582
---------------------------------------------------------------------
The opinions expressed here are those of this company.
I am the company.
---------------------------------------------------------------------

Logo Palanisamy

unread,
Oct 10, 1998, 3:00:00 AM10/10/98
to David Figueroa
How do I boot the system from CD?

The system doesn't boot from CD even though Solaris OS CD is there on
the CD-ROM drive.

Since root can't login in, I can not issue 'boot cdrom -s'; I can login
as some other user, but that user doesn't have the privilege to 'reboot'
or boot the system. The only way I currently reboot the system is to
power off and power ON the system.

When the system is rebooting, after power OFF/ON, how do I interrupt it
to go to single user mode and boot it from CD-ROM.

Would really appreciate any help.

Thanks in advance,
Logo Palanisamy
Lo...@SabariSoft.com

Jim Conner

unread,
Oct 11, 1998, 3:00:00 AM10/11/98
to Logo Palanisamy


On sun you want to boot from the CD in the PROM state. In other
words...you're not gonna boot from the CDROM while in singe user mode.
When powering off your machine and turning it back on you should get a
prompt that looks like or similar to this:

>>>


When you see that many times all you have to type is

>>>boot cdrom [enter]

That should boot the cdrom (as long as the cdrom has bootable media.)

Jim

ps-the solaris cd is bootable media :)

pss-If you can keep from cold booting the machine without a proper
shutdown that is much better than powering the machine down hard. But
if you have no other choice then shutting it down will get you to the
desired PROM so that you can boot the CD.


On Sat, 10 Oct 1998, Logo
Palanisamy wrote:

|Date: Sat, 10 Oct 1998 18:51:56 -0700
|From: Logo Palanisamy <Lo...@SabariSoft.com>
|To: David Figueroa <dfig...@texas.net>
|Cc: Lo...@SabariSoft.com
|Newsgroups: comp.unix.admin, comp.unix.programmer, comp.unix.shell,
| comp.unix.solaris
|Subject: Re: root can not logon any more - Invalid Shell error

----------------------------------------------
Jim Conner
irca...@pseudonet.org
IRC SERVERS ARE LOCATED AT:

LosAngeles.CA.US.PSeudoNet.Org
LosAngeles-1.CA.US.PSeudoNet.Org


Gavin Kerr

unread,
Oct 11, 1998, 3:00:00 AM10/11/98
to
On Sun, 11 Oct 1998 00:50:20 -0700, Jim Conner
<notj...@pseudonet.org> wrote:

>pss-If you can keep from cold booting the machine without a proper
>shutdown that is much better than powering the machine down hard. But
>if you have no other choice then shutting it down will get you to the
>desired PROM so that you can boot the CD.

You should be able to sync tho.

If you have to reboot without shutting down - type sync a few times
just before you power off the box, that way your system will be in
something resembling a stable state when it comes back up...

>----------------------------------------------
>Jim Conner
>irca...@pseudonet.org
>IRC SERVERS ARE LOCATED AT:
>
>LosAngeles.CA.US.PSeudoNet.Org
>LosAngeles-1.CA.US.PSeudoNet.Org

Gav
Gavin Kerr <g...@tritium.co.uk>
UNIX and Networking consultant

Current Job: HP-UX admin for Digital @ GlaxoWellcome

Michael P. Reilly

unread,
Oct 11, 1998, 3:00:00 AM10/11/98
to
In comp.unix.shell Jim Conner <notj...@pseudonet.org> wrote:
: On sun you want to boot from the CD in the PROM state. In other

: words...you're not gonna boot from the CDROM while in singe user mode.
: When powering off your machine and turning it back on you should get a
: prompt that looks like or similar to this:

:>>>

If you don't get a prompt, then at the beginning of the boot process
type Stop-A (two keys, Stop is also called L1). You will get a prompt
at this point, if you do not get the above prompt enter the command "n".
To get to the ">>>" prompt.

Note: the prompt system is only built into SparcStations; Solaris on
Intel is handled differently.

-Arcege

Rev. Don Kool

unread,
Oct 11, 1998, 3:00:00 AM10/11/98
to
Logo Palanisamy wrote:

> How do I boot the system from CD?
>
> The system doesn't boot from CD even though Solaris OS CD is there on
> the CD-ROM drive.
>
> Since root can't login in, I can not issue 'boot cdrom -s'; I can login
> as some other user, but that user doesn't have the privilege to 'reboot'
> or boot the system. The only way I currently reboot the system is to
> power off and power ON the system.
>
> When the system is rebooting, after power OFF/ON, how do I interrupt it
> to go to single user mode and boot it from CD-ROM.
>
> Would really appreciate any help.

You need to do what is referred to in the SUN world variously as a
"Stop A" or an "L1 A". You press one of those retarded keys on the
left of the SUN-style keyboard that is labelled "Stop" and also
press "A". The machine will halt to the boot prompt (Generally
something resembling >>>). At that point you can boot from the
CDROM by typing "boot cdrom".

Hope this helps,
Don


--
********************** You a bounty hunter?
* Rev. Don McDonald * Man's gotta earn a living.
* Baltimore, MD * Dying ain't much of a living, boy.
********************** "Outlaw Josey Wales"
http://members.home.net/oldno7

Arran Price

unread,
Oct 12, 1998, 3:00:00 AM10/12/98
to Lo...@sabarisoft.com
Logo Palanisamy wrote:
>
> How do I boot the system from CD?
>
> The system doesn't boot from CD even though Solaris OS CD is there on
> the CD-ROM drive.
>
> Since root can't login in, I can not issue 'boot cdrom -s'; I can login
> as some other user, but that user doesn't have the privilege to 'reboot'
> or boot the system. The only way I currently reboot the system is to
> power off and power ON the system.
>
> When the system is rebooting, after power OFF/ON, how do I interrupt it
> to go to single user mode and boot it from CD-ROM.
>
> Would really appreciate any help.
>
> Thanks in advance,
> Logo Palanisamy
> Lo...@SabariSoft.com

you should be able to su (not su -) to root from one of the other users
to prevent you having to reboot.

Hope that helps

Arran
My opinions are my own and do not reflect those of my employer.

William Roeder

unread,
Oct 12, 1998, 3:00:00 AM10/12/98
to
Logo Palanisamy wrote:
<snip>

> Here is what I did.
>
<snip>

> We do have some other login-ids whose default shell is /bin/ksh. It
> worked fine when I did 'su - login-id' as root. It didn't complain about
> /bin/ksh not existing or anything then. Only after verifying that, I
> changed it to /bin/ksh for root in /etc/passwd.
Since you changed the /etc/passwd file AFTER the su, the su did nothing.

Tom K

unread,
Oct 13, 1998, 3:00:00 AM10/13/98
to Jim Conner
Actually to boot the cd in single user mode is the following command...

boot cdrom -s

Jim Conner wrote:

> On sun you want to boot from the CD in the PROM state. In other
> words...you're not gonna boot from the CDROM while in singe user mode.
> When powering off your machine and turning it back on you should get a
> prompt that looks like or similar to this:
>
> >>>
>

> When you see that many times all you have to type is
>
> >>>boot cdrom [enter]
>
> That should boot the cdrom (as long as the cdrom has bootable media.)
>
> Jim
>
> ps-the solaris cd is bootable media :)
>

> pss-If you can keep from cold booting the machine without a proper
> shutdown that is much better than powering the machine down hard. But
> if you have no other choice then shutting it down will get you to the
> desired PROM so that you can boot the CD.
>

> On Sat, 10 Oct 1998, Logo
> Palanisamy wrote:
>
> |Date: Sat, 10 Oct 1998 18:51:56 -0700
> |From: Logo Palanisamy <Lo...@SabariSoft.com>
> |To: David Figueroa <dfig...@texas.net>
> |Cc: Lo...@SabariSoft.com
> |Newsgroups: comp.unix.admin, comp.unix.programmer, comp.unix.shell,
> | comp.unix.solaris
> |Subject: Re: root can not logon any more - Invalid Shell error
> |

> |How do I boot the system from CD?
> |
> |The system doesn't boot from CD even though Solaris OS CD is there on
> |the CD-ROM drive.
> |
> |Since root can't login in, I can not issue 'boot cdrom -s'; I can login
> |as some other user, but that user doesn't have the privilege to 'reboot'
> |or boot the system. The only way I currently reboot the system is to
> |power off and power ON the system.
> |
> |When the system is rebooting, after power OFF/ON, how do I interrupt it
> |to go to single user mode and boot it from CD-ROM.
> |
> |Would really appreciate any help.
> |
> |Thanks in advance,
> |Logo Palanisamy
> |Lo...@SabariSoft.com
> |
> |
>

Ralf Winkel

unread,
Oct 15, 1998, 3:00:00 AM10/15/98
to
Hi,

if you have exported a filesystem to an other system or you mount a
filesystem from an other system, you can copy a shell or vi to this
filesystem as root and set the suid bit. Now, an normal user can use
this program (with root rights) and can correct /etc/passwd.

Ralf


----------------------------------------------------------
Ralf Winkel |
TUI InfoTec | Fon.: +49 511 567 5075
Karl-Wiechert-Allee 23 | Fax.: +49 511 567 1301
D 30625 Hannover / Germany | Mail: Ralf....@tui.de

0 new messages