Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

Appendix C. Anaconda UI specific commands

C.1. Commands used in Anaconda

The "pwpolicy" command is an Anaconda UI specific command that can be used only in the %anaconda section of the kickstart file.
pwpolicy (optional)
This command can be used to enforce a custom password policy, which specifies requirements for passwords created during installation, based on factors such as password length and strength.
pwpolicy name [--minlen=length] [--minquality=quality] [--strict|--nostrict] [--emptyok|--noempty] [--changesok|--nochanges]
Replace name with either root, user or luks to enforce the policy for the root password, user passwords, or LUKS passphrase, respectively.
The libpwquality library is used to check minimum password requirements (length and quality). You can use the pwscore and pwmake commands provided by the libpwquality package to check the quality score of a password, or to create a random password with a given score. See the pwscore(1) and pwmake(1) man page for details about these commands.

Important

This command can only be used inside the %anaconda section.
  • --minlen= - Sets the minimum allowed password length, in characters. The default is 6.
  • --minquality= - Sets the minimum allowed password quality as defined by the libpwquality library. The default value is 1.
  • --strict - Enables strict password enforcement. Passwords which do not meet the requirements specified in --minquality= and --minlen= will not be accepted. This option is disabled by default.
  • --notstrict - Passwords which do not meet the minimum quality requirements specified by the --minquality= and -minlen= options will be allowed, after Done is clicked twice.
  • --emptyok - Allows the use of empty passwords. Enabled by default for user passwords.
  • --notempty - Disallows the use of empty passwords. Enabled by default for the root password and the LUKS passphrase.
  • --changesok - Allows changing the password in the user interface, even if the Kickstart file already specifies a password. Disabled by default.
  • --nochanges - Disallows changing passwords which are already set in the Kickstart file. Enabled by default.