Skip to content

user-password

Automatically generates and configures a password for the specified user account.

Categories

Uncategorized

If setting the option prompt to true, the user will be prompted to type in their desired password.

Note

This module will set mutableUsers to false, meaning you can not manage user passwords through passwd anymore.

After the system was installed/deployed the following command can be used to display the user-password:

clan secrets get {machine_name}-user-password

See also: Facts / Secrets

To regenerate the password, delete the password files in the clan directory and redeploy the machine.

Usage via Inventory

This module cannot be used via the inventory interface.

Usage via Nix

This module can be also imported directly in your nixos configuration. Although it is recommended to use the inventory interface if available.

Some modules are considered 'low-level' or 'expert modules' and are not available via the inventory interface.

{config, lib, inputs, ...}: {
    imports = [ inputs.clan-core.clanModules.user-password ];
    # ...
}

Module Options

The following options are available for this module.

clan.user-password.prompt

Whether the user should be prompted.

Type: boolean

Default:

true
Example
false

user-password

clan.user-password.user

The user the password should be generated for.

Type: string

Example
"alice"

user-password