root "no shell" boo-boo

root "no shell" boo-boo

Post by David Harp » Sat, 19 Nov 1994 10:16:20



Subject: root "no shell" boo-boo

The scenario:

A friend has a brand new Sparc Station 5.  After a few hours of
installing Solaris from the CD-ROM, the first action while logged
in as root was to edit /etc/passwd and change root's shell from
/sbin/sh to /sbin/csh.  Oops.

Now, on login as root, the error message, "no shell" appears and
returns to the login prompt.

The problem, of course, is that csh is not in the /sbin directory.
No other logins were created.  Bummer.  What can they do to
fix this, besides installing the entire Solaris CD-ROM from
scratch?


 
 
 

root "no shell" boo-boo

Post by Eric S. Hop » Sat, 19 Nov 1994 23:44:26


Your best bet is to boot CDROM & mount normal boot partition to "/a"
provided in the MINIUNIX kernel, "cd" to /a/etc & edit the passwd file to
correct this problem.

Good Luck!

Eric S. Hope

 
 
 

root "no shell" boo-boo

Post by System Manag » Sun, 20 Nov 1994 00:12:59


: The scenario:

: A friend has a brand new Sparc Station 5.  After a few hours of
: installing Solaris from the CD-ROM, the first action while logged
: in as root was to edit /etc/passwd and change root's shell from
: /sbin/sh to /sbin/csh.  Oops.

: Now, on login as root, the error message, "no shell" appears and
: returns to the login prompt.

: The problem, of course, is that csh is not in the /sbin directory.
: No other logins were created.  Bummer.  What can they do to
: fix this, besides installing the entire Solaris CD-ROM from
: scratch?

Ok,  

1:      Boot from the CDROM, load the mini-root, and boot from it.

2:      When the system comes up, instead of starting the suninstall proceedure
        create a directory (I'll call it a), mount the / partition onto "a".  
        Mount is in /usr/etc

3:      'cd /a/etc'
        'vi passwd' change the shell back

4:      reboot

Mike Butsch

 
 
 

root "no shell" boo-boo

Post by Robe » Mon, 21 Nov 1994 23:57:27




>Subject: root "no shell" boo-boo

>The scenario:

>A friend has a brand new Sparc Station 5.  After a few hours of
>installing Solaris from the CD-ROM, the first action while logged
>in as root was to edit /etc/passwd and change root's shell from
>/sbin/sh to /sbin/csh.  Oops.

>Now, on login as root, the error message, "no shell" appears and
>returns to the login prompt.

>The problem, of course, is that csh is not in the /sbin directory.
>No other logins were created.  Bummer.  What can they do to
>fix this, besides installing the entire Solaris CD-ROM from
>scratch?



Pull the disk.  Mount it in another machine, remembering to check the
SCSI id.  Mount the root partition on /a and fix the passwd file.

David Pipes

 
 
 

root "no shell" boo-boo

Post by Antonio Vasconcel » Tue, 22 Nov 1994 04:36:21


: 1:    Boot from the CDROM, load the mini-root, and boot from it.
:
: 2:    When the system comes up, instead of starting the suninstall proceedure
:       create a directory (I'll call it a), mount the / partition onto "a".  
:       Mount is in /usr/etc
:
: 3:    'cd /a/etc'
:       'vi passwd' change the shell back
:
: 4:    reboot

Wouldn't a 'boot -s cdrom' do all the job ??? Do you really need to
mount the miniroot and so on ?
--
regards,


<<< If you can write it, we can debug (hack) it... >>>

 
 
 

root "no shell" boo-boo

Post by Paul Southwor » Tue, 22 Nov 1994 04:51:03




>Wouldn't a 'boot -s cdrom' do all the job ??? Do you really need to
>mount the miniroot and so on ?

I believe the miniroot lacks the "mount" command.

--Paul

 
 
 

root "no shell" boo-boo

Post by Don Turrenti » Wed, 23 Nov 1994 22:30:23



: Your best bet is to boot CDROM & mount normal boot partition to "/a"
: provided in the MINIUNIX kernel, "cd" to /a/etc & edit the passwd file to
: correct this problem.

: Good Luck!

: Eric S. Hope

I'm not for sure what the original posting stated but I to made
a "no shell" boo-boo. I had changed roots default shell to the csh
but did not change the path and had /sbin/csh which did not exist.
To overcome the problem I compiled "sudo" as a regular user and then
did a "sudo cp /bin/csh /sbin/csh". This worked, kinda of scary
though!

--

 
 
 

root "no shell" boo-boo

Post by Don Turrenti » Thu, 24 Nov 1994 02:21:05


ERROR!!! ERROR!!!

I made an error in my earlier posting. When I compiled sudo I did so as
root from another machine to set the setuid-root bit. You must have the
same UID # for root on both machines which is normally the case, you might
want to consider changing or limiting the powers of UID 0 as root for
security reasons. To clarify another thing I copied /bin/csh to /sbin/csh
I did not link them which really would not matter since they are both
on the root partition.

--