Skip to content

Commit

Permalink
docs: Explain how to set password-less logins.
Browse files Browse the repository at this point in the history
This explains the

    # Allow the user to log in as root without a password.
    users.users.root.initialHashedPassword = "";

that the NixOS installer live systems use in
`profiles/installation-device.nix`.
  • Loading branch information
nh2 committed Jul 4, 2020
1 parent 2c33e5d commit 06b8b96
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions nixos/modules/config/users-groups.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ let
hashedPasswordDescription = ''
To generate hashed password install <literal>mkpasswd</literal>
package and run <literal>mkpasswd -m sha-512</literal>.
For password-less logins without password prompt, use
the empty string <literal>""</literal>.
For logins with a fixed password (including the empty-string password with
prompt), use one of the un-hashed password options instead, such as
<option>users.users.<name?>.password</option>.
Such unprotected logins should only be used for e.g. bootable live systems.
'';

userOpts = { name, config, ... }: {
Expand Down

0 comments on commit 06b8b96

Please sign in to comment.