On Sun, 2004-08-15 at 06:14, Pete Clarke wrote: > Hi there, > > <dumb mode>I managed to delete the root entry in /etc/passwd whilst playing > on a test box</dumb mode> > Is there an easy way of re-inserting, or copying the backup passwd file I > have without physical access to the box? > > I can ssh into it, but only as a regular user - obviously I can't su to root > as it doesn't exist anymore :-)
I presume it's still possible to boot into "single user mode" with a broken /etc/passwd. Here are instructions I found by googling for "linux boot single user mode": http://www.redhat.com/docs/manuals/linux/RHL-7.3-Manual/ custom-guide/s1-rescuemode-booting-single.html It should then be possible to edit the /etc/passwd file. Alternatively, boot using a rescue disk, mount the filesystem containing the /etc/passwd file, then edit it to reinsert a root entry. I think the Debian install CD will function as a "rescue disk" for this purpose. Or Knoppix/Gnoppix/etc will do the job. Regards, Simon -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]