CentOS 8.x Configure password complexity
From Notes_Wiki
<yambe:breadcrumb self="Configure password complexity">CentOS 8.x System Administration|System Administration</yambe:breadcrumb>
CentOS 8.x Configure password complexity
To configure password complexity in CentOS 8 use:
- Install required packages
- dnf -y install authselect-compat
- Create authselect profile based on sssd for configuring password-complexity
- authselect create-profile sssd-prod1 -b sssd
- This creates new authentication profile at '/etc/authselect/custom/sssd-prod1'
- List the profiles with
- authselect list
- See current profile with
- authselect current
- Select the new profile using:
- authselect select custom/sssd-prod1
- Configure password complexity using:
- authconfig --enablereqlower --enablerequpper --enablereqdigit --enablereqother --passminlen=8 --passmaxrepeat=3 --update
- This ensures that various files in /etc/pam.d require use of pam_pwquality.so. This also updates /etc/security/pwquality.conf.d/10-authconfig-pwquality.conf with required password complexity configuration.
Refer: