diff options
author | Niklas Hambüchen <mail@nh2.me> | 2020-07-04 02:05:03 +0200 |
---|---|---|
committer | Niklas Hambüchen <mail@nh2.me> | 2020-07-04 02:05:03 +0200 |
commit | 06b8b96500502cb3bbd335242faf787e5d68bb9c (patch) | |
tree | 2d23ef814efcf271f2643bb0e2e26080fcc11013 | |
parent | 2c33e5da9eb9feb82e2b77000e8488fdb8032fbc (diff) |
docs: Explain how to set password-less logins.
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`.
-rw-r--r-- | nixos/modules/config/users-groups.nix | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/nixos/modules/config/users-groups.nix b/nixos/modules/config/users-groups.nix index 8defa86818ab1..e6b9a78f416bb 100644 --- a/nixos/modules/config/users-groups.nix +++ b/nixos/modules/config/users-groups.nix @@ -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, ... }: { |