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?
> >
> Knoppix makes you an unprivileged user by default. However, you can use
> sudo without a password:
Thanks, Roberto. Didn't know that.
> > 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.
I've seen the directions for editing /etc/shadow, but also the warning
that this is dangerous and need not be done. Therefore my second
approach, which has the advantage of not depending on a cd drive or
live CD (not too sure what that is). It is supposed to work, but it
didn't for me.
--
Haines Brown
KB1GRM
ET1(SS) U.S.S. Irex SS-482
Reply to: