[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Single user mode in GuixSD

From: Tonton
Subject: Re: Single user mode in GuixSD
Date: Sat, 1 Dec 2018 18:13:21 +0100

On Fri, 30 Nov 2018 17:02:41 +0100 (CET)
<address@hidden> wrote:

> Hello, Guix Help! Once I've lost root password and need to restore root
> password in GuixSD.

You can fix this quite quick and easy. I try to have a live disk lying around
for these kinds of quick fixes. :)

So with your live disk, any distro that will give you the passwd utility and
access to your root partition. So guixsd, debian, systemrescuecd, whatever.

1. Boot live disk from usb
2. open terminal and run:
        > passwd $(whoami)
2.1 enter the root passwd you want. Then run:
        > sudo grep $(whoami) /etc/shadow
2.2 You'll get the password as the second field (separated by : the first
        field is the username) e.g.:
2.2 The password, or the password hash is (the password entered here is
        actually "test password"):
3 Mount your guixsd root partition.
3.1 Open the guixsd-root/etc/shadow in a text editor and change field 2 of
        the line starting with root so it has the password hash you created
        in step 2. In my case I would make it look like:
3.2 Save the guixsd-root/etc/shadow file and reboot. You have now set a new
        password for your root account.

For documentation see
man passwd
man 5 shadow

Now for some this is old, but for those who have not seen this before - this
is why physical access means you own the device. Unless ofcourse, it's


reply via email to

[Prev in Thread] Current Thread [Next in Thread]