Unverified Commit 4c1d5381 authored by misuzu's avatar misuzu Committed by GitHub
Browse files

nixos/doc: update `Installing` section (#341995)

Mention how to set a user password right after installation.
Also don't suggest to use `useradd` to add users.
parent d33b5534
Loading
Loading
Loading
Loading
+12 −8
Original line number Diff line number Diff line
@@ -496,6 +496,12 @@ Use the following commands:
    Retype new password: ***
    ```

    If you have a user account declared in your `configuration.nix` and plan to log in using this user, set a password before rebooting, e.g. for the `alice` user:

    ```ShellSession
    # nixos-enter --root /mnt -c 'passwd alice'
    ```

    ::: {.note}
    For unattended installations, it is possible to use
    `nixos-install --no-root-passwd` in order to disable the password
@@ -515,15 +521,13 @@ Use the following commands:
    menu. This allows you to easily roll back to a previous
    configuration if something goes wrong.

    You should log in and change the `root` password with `passwd`.

    You'll probably want to create some user accounts as well, which can
    be done with `useradd`:
    Use your declared user account to log in.
    If you didn’t declare one, you should still be able to log in using the `root` user.

    ```ShellSession
    $ useradd -c 'Eelco Dolstra' -m eelco
    $ passwd eelco
    ```
    ::: {.note}
    Some graphical display managers such as SDDM do not allow `root` login by default, so you might need to switch to TTY.
    Refer to [](#sec-user-management) for details on declaring user accounts.
    :::

    You may also want to install some software. This will be covered in
    [](#sec-package-management).