[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
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?

Knoppix makes you an unprivileged user by default. However, you can use sudo without a password:

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

That should get you what you want.

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?

If you want to reset a user password (or even root), then boot with a live CD, mount the partition and edit /etc/passwd or /etc/shadow (depending on which type of passwords were used on the system) and then remove the password from the file. After you reboot the system, then you can log in as whatever user without a password.


Roberto C. Sanchez

Reply to: