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.
This commit is contained in:
parent
d33b553400
commit
4c1d53818b
@ -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`.
|
||||
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.
|
||||
|
||||
You'll probably want to create some user accounts as well, which can
|
||||
be done with `useradd`:
|
||||
|
||||
```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).
|
||||
|
Loading…
Reference in New Issue
Block a user