git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/users-groups: clearly document special hash values

This explanation was contained in the description of security.initialRootPassword but got lost when it was deprecated a long ago (f496c3c) and removed.

commit900ae9756902e4a3c53f32d4dee9ba1d995722df authorrnhmjoj <rnhmjoj@inventati.org> dateSun 21 Jun 2020, 16:55 (6 years ago) parenta6ed7d4
1 file changed+10−8
nixos/modules/config/users-groups.nix+10−8
nixos/modules/config/users-groups.nix+10−8
@@ -25,17 +25,19 @@ let
2525 '';
2626
2727 hashedPasswordDescription = ''
28− To generate hashed password install <literal>mkpasswd</literal>
28+ To generate a hashed password install the <literal>mkpasswd</literal>
2929 package and run <literal>mkpasswd -m sha-512</literal>.
3030
31− For password-less logins without password prompt, use
32− the empty string <literal>""</literal>.
31+ If set to an empty string (<literal>""</literal>), this user will
32+ be able to log in without being asked for a password (but not via remote
33+ services such as SSH, or indirectly via <command>su</command> or
34+ <command>sudo</command>). This should only be used for e.g. bootable
35+ live systems. Note: this is different from setting an empty password,
36+ which ca be achieved using <option>users.users.&lt;name?&gt;.password</option>.
3337
34− For logins with a fixed password (including the empty-string password with
35− prompt), use one of the un-hashed password options instead, such as
36− <option>users.users.&lt;name?&gt;.password</option>.
37−
38− Such unprotected logins should only be used for e.g. bootable live systems.
38+ If set to <literal>null</literal> (default) this user will not
39+ be able to log in using a password (i.e. via <command>login</command>
40+ command).
3941 '';
4042
4143 userOpts = { name, config, ... }: {