Changing Root Passwords without a Live CD

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Tue Feb 9 19:17:27 UTC 2010


On Tue, Feb 09, 2010 at 01:22:55PM -0500, Scott Sullivan wrote:
> Re: default root password on Fedora 12
>
> This Process work on all linux systems, and only requires physical  
> access to the machine.
>
> 1. While the machine is booting hit any key to stop grub from booting  
> automatically.
>     (On Fedore 11 and 12 this is a very narrow window between the bios  
> and the pretty boot.)
>
> 2. type the character 'a' to append to the boot line and add the word  
> 'single' to the boot line.
>     (This is a temporary addition and will only last for this boot.)
>
> 3. The machine with now boot into runlevel 1, which is a network less  
> Root terminal. From here you can run the 'passwd' command to change the  
> root password.
>
> 4. Reboot the box, either 'reboot' or 'init 6'

On many systems single user still asks for a password.

If you instead append: init=/bin/bash

Then you get a root shell no matter what with no access to anything else.
You can then remount / as rw if needed (mount -o remount,rw /) and run
passwd to set a new password.

-- 
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list