On Sun, 15 Aug 1999, Ken Wilson <[EMAIL PROTECTED]> wrote:

> I was using the KDE utility for removing users and groups to remove postgres
> references.  It appears when the utility closed it also clobbered the entry
> for root.  There was an /etc/passwd.bak file created that appeared to
> contain the old entries.
> 
> However, because I couldn't log in as root I couldn't use mv to rename the
> backup file.  I attempted to do this by booting in runlevel 1. I was
> successful in moving this file back.  However, my old root password no
> longer works when I try to let it do a normal boot at runlevel 3.
> 
> I have attempted to change the password from runlevel 1 and although it
> appears that the password is being changed no change is resulting.
> 
> Has anyone had this happen to them before? Is there a way of fixing it short
> of a complete reinstall?

Yes. 

Boot your machine up from a floppy rescue disk. If you don't have one
you can make one using the stuff in /images/rescue on the installation
CD-ROM. (You can do this under DOS or Linux.)

Then mount your root disk under /mnt. If your root partition is /dev/hda2,
for example:

   mount -t ext2 /dev/hda2 /mnt

Then edit the passwd file, which you will find at /mnt/etc/passwd 

Then umount /mnt, take the floppy out and reboot.

Incidentally, complete reinstalls are hardly ever needed under Linux.
There is nearly always a less drastic way of fixing a problem.


--

Richard Lamont
[EMAIL PROTECTED]
http://www.stonix.demon.co.uk/

Reply via email to