I have a largish problem...

I have a largish problem...

Post by Brett Taylo » Tue, 01 Feb 2000 04:00:00



.... that you may be able to help me with.

One of the junior sys admin guys here has managed to lose the root shell by
specifying an incorrect path in /etc/passwd.  He changed roots shell path to
/sbin/ksh from /bin/ksh.  We cannot now log onto this box as root as we have
no shell, and in having no root permissions I cannot telnet, rlogin or ftp
to the macine to correct the entry.  Help much appreciated on this as it is
one of our mission critical boxes.

Brett

 
 
 

I have a largish problem...

Post by John Doher » Tue, 01 Feb 2000 04:00:00




> .... that you may be able to help me with.

> One of the junior sys admin guys here has managed to lose the root shell by
> specifying an incorrect path in /etc/passwd.  He changed roots shell path to
> /sbin/ksh from /bin/ksh.  We cannot now log onto this box as root as we have
> no shell, and in having no root permissions I cannot telnet, rlogin or ftp
> to the macine to correct the entry.  Help much appreciated on this as it is
> one of our mission critical boxes.

Boot from the CDROM, mount the disk, edit /etc/passwd, reboot.

Then, as penance, make that sysadmin read the damn man pages for
passwd -e and usermod. Regardless of the wisdom of changing root's
shell, changing it by manually editing /etc/passwd is really dumb.

  # passwd -e
  Old shell: /sbin/sh
  New shell: /sbin/ksh
  warning: /sbin/ksh is unavailable on this machine
  # usermod -s /sbin/ksh root
  UX: usermod: ERROR: /sbin/ksh is not a valid shell.  Choose another.
  #

--

 
 
 

I have a largish problem...

Post by Peter Schmi » Tue, 01 Feb 2000 04:00:00


STOP-A
sync
boot cdrom -sw
mount root partition on /a/mnt/
edit /a/mnt/etc/passwd file for appropriate shell.
fire junior admin :).

Or you can search deja.com for 1,000,000 questions similiar
(actually exactly) like this.

HTH,

Pete.


> .... that you may be able to help me with.

> One of the junior sys admin guys here has managed to lose the root shell by
> specifying an incorrect path in /etc/passwd.  He changed roots shell path to
> /sbin/ksh from /bin/ksh.  We cannot now log onto this box as root as we have
> no shell, and in having no root permissions I cannot telnet, rlogin or ftp
> to the macine to correct the entry.  Help much appreciated on this as it is
> one of our mission critical boxes.

> Brett

 
 
 

I have a largish problem...

Post by Joe Durusa » Tue, 01 Feb 2000 04:00:00


    No, you can't do that on Solaris.  The FAW points out that the two
easiest choices are:

1). the CDROM thing
and
2). if you are running NIS, get in through another host.

3). Some folks keep an alter-ego with UID 0 and some password that's locked in the

safe.

If all of the above fails, buy another system, install on it, then take the disk
out of
the broken one, mount on the new one, etc, etc.

Speaking only for myself,

Joe Durusau

PS: It is a good idea to have anyone who does this sort of thing read
the messages about 'root shell disease' and present an elaborate statistical
analysis of the prenomenon.



> > .... that you may be able to help me with.

> > One of the junior sys admin guys here has managed to lose the root shell by
> > specifying an incorrect path in /etc/passwd.  He changed roots shell path to
> > /sbin/ksh from /bin/ksh.  We cannot now log onto this box as root as we have
> > no shell, and in having no root permissions I cannot telnet, rlogin or ftp
> > to the macine to correct the entry.  Help much appreciated on this as it is
> > one of our mission critical boxes.

> If a simple "su" doesn't work, the following *might* work.

> $ su - root -c "exec /sbin/ksh"

> If you can't su either, you'll probably have to boot from a CD-ROM,
> mount the root filesystem (after an fsck) and edit /mnt/etc/passwd
> yourself.

> Regards,

> Nicholas Dronen


 
 
 

I have a largish problem...

Post by Anthony Mandi » Wed, 02 Feb 2000 04:00:00



> One of the junior sys admin guys here has managed to lose the root shell by
> specifying an incorrect path in /etc/passwd.  He changed roots shell path to
> /sbin/ksh from /bin/ksh.

        And who changed it from /sbin/sh?

Quote:> We cannot now log onto this box as root as we have
> no shell, and in having no root permissions I cannot telnet, rlogin or ftp
> to the macine to correct the entry.  Help much appreciated on this as it is
> one of our mission critical boxes.

        Surely your senior sys admin could fix this with one hand tied behind
        his back and wearing a blindfold, nes't pas?

-am

 
 
 

I have a largish problem...

Post by chris bannaya » Fri, 04 Feb 2000 04:00:00


You will have to boot cdrom -s (single user mode) moun tthe hard drive
mount /dev/dsk/c?t?d?s? /a

cd /a/?? and fix the problem

Chris


> .... that you may be able to help me with.

> One of the junior sys admin guys here has managed to lose the root shell by
> specifying an incorrect path in /etc/passwd.  He changed roots shell path to
> /sbin/ksh from /bin/ksh.  We cannot now log onto this box as root as we have
> no shell, and in having no root permissions I cannot telnet, rlogin or ftp
> to the macine to correct the entry.  Help much appreciated on this as it is
> one of our mission critical boxes.

> Brett

--

============================================================


                                Phone:  02 98686367
                                Mobile: 0413 009 343

 
 
 

I have a largish problem...

Post by Joe Gotobe » Mon, 07 Feb 2000 04:00:00


Since you jumpstarted all these machines (right :-) your boot
server knows all about 'em.  Net boot is usually quicker and not
*all* your clients may have a cdrom. The same mount/edit/reboot
procedure then applys.

Quote:> fire junior admin :).

Good people are hard to find. After sweating through this that Jr. Admin
is *much* more experienced :-)....

Joe

 
 
 

1. Grep for Largish Query Files

Hi

Grep gives a "file too large" message when I try to retrieve items in a
search file (approx. 8500 lines) using a query file of approx. 1000 items
(individual words on each line).  Works OK with a subset of about 100
items from the query file.  Basic query (omitting some of switches I
actually use) looks like:

grep -f queryfile  searchfile > outputfile

Any way to increase capacity of grep or any idea of what determines limit?

Thanks
Jim

****************************************************************************
James M. Clark                       (204) 786-9313
Department of Psychology             (204) 786-1824 Fax

Winnipeg, Manitoba  R3B 2E9          4L02A
CANADA
****************************************************************************

2. How do make a Netware login from a Unix machine

3. [PATCH} NatSemi ethernet - largish

4. Need help with PS2 mouse on XFree86

5. largish time lag between successive calls to gettimeofday(), why?

6. PLEEASSE HELP: Undefined _ _fxstat & _ _xstat

7. FreeBSD newbie having ISP connect problems - route problem

8. A graphical tool to create a launch scripts

9. I'm having host problems (null)~# and SLIP problems

10. Having problems mounting atapi zip

11. Still having problems with mgetty

12. Help with Panic: /usr/ having problems

13. Student having a problem booting Linux Red Hat 7.0 Please Help