[nmglug] dude, wheres my password?
Jason Davis
mohadib at openactive.org
Tue Apr 12 20:30:04 PDT 2005
On Tue, 2005-04-12 at 18:20 -0700, Karl Hegbloom wrote:
> On Tue, 2005-04-12 at 18:20 -0600, joe at highmayhem.com wrote:
> > Hello,
> >
> > Yeah, I'm that guy. I thought I knew it, I don't remember changing it,
> > but I can't log in as root with any password thats in my head. What can
> > I do? Can I change it to something new? Can I find out what it is?
> >
> > What would you do?
>
> Reboot the computer. If you use 'lilo' for a bootloader, then press the
> 'Shift' key to get a boot prompt. Type the name of the kernel you want
> to boot with 'init=/bin/bash' appended. eg:
>
> boot: linux init=/bin/bash
>
> If you use the Grub bootloader, then highlight the kernel you want to
> boot, and press 'e' to edit the boot commands. Arrow down to the line
> that begins with 'kernel', and press 'e' again. At the end of the line,
> add a space and 'init=/bin/bash' (minus the quotes), then press Enter.
> Now press 'b' to boot it.
>
> In either case, you will be at a shell prompt logged in as root.
> Nothing will be running, no init.d scripts will have been run, and your
> '/' directory will be mounted read only and will be the only one
> mounted. Type:
>
> mount -o remount,rw /
>
> ... to mount it read/write, then run the 'passwd' command to set your
> root password. Then:
>
> mount -o remount,ro /
> reboot
>
> ... and let it boot normally. You will now have a new root password.
>
nice Karl!
I have always just booted to a live cd and chrooted in and reset the
passwd , but i think i like your way better
More information about the nmglug
mailing list