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

Re: "forgot password" workarounds not working



Haines Brown wrote:
I have sarge I installed on a new hard disk, and I can log in OK, but
I decided to see if I could log in without a password. I tried two
methods:
1. I booted knoppix and opened a terminal. In it I tried to do:

   $ mount -t ext3 /dev/sda /mnt/hd

   in order to then run the chroot and the passwd commands, but when I
   tried to mount the disk I got the error "only root can do that". Is
   the only way out of this to know root's password?
Use

$ sudo mount -t ext3 /dev/sda /mnt/hd


2. In grub, I edited the kernel line for the disk I wanted to boot by
   appending to that line the words: "single init=/bin/sh". This
   brought me to a sh2.5-2b# prompt, but when I tried to issue the
   passwd command from there, I only got the "authentication token
   lock busy" error. When I have trouble with lock files I usually
   just delete them, but don't know where this one is or if I can
   delete it.

Any suggestions?
I don't believe you have enough system running to run "passwd"; instead, remount the / partition as read-write (mount -o remount,rw /) and then edit /etc/passwd, taking out the "x" in the line for root (assuming you're using shadow passwords). Now reboot normally and log in as root, sans passwd; from here, you should be able to reset your root password.

--
Kent




Reply to: