On Thu, Feb 18, 1999 at 11:52:26PM -0600, Gabe Harriman wrote:

| Okay, somehow (I think xuser did it) my root account's shell entry
| in the passwd file was changed from :/root:/bin/tcsh to
| ::/root:/bin/tcsh ..  so now, whenever i try and login as root it
| can't find my shell (which is now /root:/bin/tcsh).  I cannot get into
| the root account via su and every other method i could think of has
| failed.  Does anyone know a way to change the password file as root
| without actually logging in as root?  Or to temporarily login as root
| using a shell other than the one specified in the passwd file?  Thanks
| for your help.

1) hit return once in a while :)

2) boot your box from a rescue floppy, mount your root partition, then
   use vi to edit your /etc/passwd file (probably mounted as
   /mnt/etc/passwd) to fix it, then umount and reboot.

You might (but I doubt it) be able to do something like :

   su root -c /bin/sh

(I expect that su will invoke root's shell and tell that to invoke
 /bin/sh, which won't work.  But it might not work that way ...)

Also, if it's Redhat, you might find this `su' option useful :

       -s, --shell shell
              Run SHELL instead of USER's shell from /etc/passwd,
              unless the user running su is not the superuser and
              USER's shell is restricted.

[ but I've never tried it ]

The booting off a floppy is the standard way of fixing things.

-- 
Doug McLaren, [EMAIL PROTECTED]
---------------------------------------------------------------------------
Send administrative requests to [EMAIL PROTECTED]

Reply via email to