root password

Scott Doty scott at ponzo.net
Tue Feb 7 06:54:40 UTC 2012


On 02/06/2012 06:47 PM, Boris Epstein wrote:
>
>
> On Mon, Feb 6, 2012 at 9:14 PM, Bruno Wolff III <bruno at wolff.to
> <mailto:bruno at wolff.to>> wrote:
>
>     On Tue, Feb 07, 2012 at 07:43:37 +0530,
>      Amit Rp <amitrp01 at gmail.com <mailto:amitrp01 at gmail.com>> wrote:
>     > I forgot the root password. Please advise whether there is any
>     possibility
>     > of retrieving  it?
>
>     It's normally easier to boot into single user mode and change it
>     to something
>     new than to try to recover it.
>     --
>     users mailing list
>     users at lists.fedoraproject.org <mailto:users at lists.fedoraproject.org>
>     To unsubscribe or change subscription options:
>     https://admin.fedoraproject.org/mailman/listinfo/users
>     Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
>     Have a question? Ask away: http://ask.fedoraproject.org
>
>
> 100%.
>
> Yet another way is to boot off of a CD or USB stick and manually edit
> the /etc/shadow file in the root partition - but that is more cumbersome.
>

Protip:  If you're booting a cd or stick, no need to manually edit the
target system's /etc/shadow.  When you mount the system's / partition,
chroot there, then just run passwd.

And honestly, chroot(1) is perfect for working on systems under
different filesystem hierarchies.  For example, I use it to update
ltsp's nfs root on occasion:

# # on the nfs server:
# setarch i686 chroot /opt/ltsp/i386 /bin/bash

Fun, no? :)

 -Scott
p.s. for even more fun, try wrapping your head around pivot_root(8)... :)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/users/attachments/20120206/8a7a51cd/attachment.html>


More information about the users mailing list