From 06b8b96500502cb3bbd335242faf787e5d68bb9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Sat, 4 Jul 2020 02:05:03 +0200 Subject: [PATCH] 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`. --- nixos/modules/config/users-groups.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nixos/modules/config/users-groups.nix b/nixos/modules/config/users-groups.nix index 8defa86818ab..e6b9a78f416b 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 mkpasswd package and run mkpasswd -m sha-512. + + For password-less logins without password prompt, use + the empty string "". + + For logins with a fixed password (including the empty-string password with + prompt), use one of the un-hashed password options instead, such as + . + + Such unprotected logins should only be used for e.g. bootable live systems. ''; userOpts = { name, config, ... }: {