[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Messed up root



Gary Roach wrote at 2012-11-26 18:43 -0600:
> I've done the unthinkable. I accidentally changed root to qroot in
> my /etc/passwd file and then proceeded to log out of root. All of
> the files in /etc were changed to owner qroot and the root password
> doesn't work any more. I have a new Knoppix CD and a new Debian
> network install CD. Can I use either of these to edit the passwd
> file and correct the problem. If so, how.

Probably either Knoppix or the Debian CD will work.  With Knoppix, just boot 
from the CD, mount the partition on which is /etc, and edit the file.

Commands used will be approximately (you will need to use the correct block 
device):
# fdisk -l
# mkdir /mnt/tmp
# mount /dev/sda1 /mnt/tmp
# nano /mnt/tmp/etc/passwd
# umount /mnt/tmp
# reboot

Attachment: signature.asc
Description: Digital signature


Reply to: