On This Page
TufinOS 4.x Password Policies
Overview
For TufinOS 4.x, implementing a password policy lets you harden your operating system by enforcing strong passwords for all operating system logins. Password policies are enforced using the pam_passwdqc.so
RPM.
This applies to all versions of TufinOS 4.x and RHEL 8.
This topic describes RHEL 8 default configuration file for password complexity. Some of these requirements are based on a credit-based system, which is used by the system to evaluate the complexity of the password.
Use these instructions to implement password policies for TufinOS 4.20 and later.
Prerequisites
TufinOS 4.x Users
-
Verify that you are running version 4.20 or later.
Rocky/Linux/RHEL 8 Users
-
Verify that you are running either version 8.6 or version 8.8.
-
To ensure that the server has full functionality and access to the options described in this topic, use the following command to update
pam
topam-1.3.1-25
,authselect
toauthselect-1.2.6-1
, andlibpwquality
tolibpwquality-1.4.4-6
or later:
Before you Begin Password Policy Implementation
Before you begin implementing password policies, you must configure system security services daemon and create/deploy a custom authselect profile.
Configure System Security Services Daemon (SSSD)
-
Configure the SSSD configuration file
/etc/sssd/sssd.conf
as follows:[sssd]
domains =
config_file_version = 2
services = nss, pam
enable_files_domain = true
[domain/local]
id_provider=filesThis step sets the value ofenable_files_domain
totrue
for the SSSD in TufinOS 4. If you have different security measures that are not covered in this document, refer to the Rocky LInux /RHEL 8 documentation. -
Change the owner and permission for the SSSD configuration file:
-
Restart the SSSD service and check the service status:
Create/Deploy a Custom "authselect" Profile
-
Create a custom profile
tufin-password-policy
based on the ready-madesssd
profile: -
To override the current profile, use this command:
-
Check the custom profile with
custom/tufin-password-policy
:
Set a Password Policy to Keep a History of Used Passwords
Enable Password History
-
Enable the
pam_pwhistory
module and update the PAM stack using the command: -
Confirm that the changes have been applied to the global PAM files:
Configure Password History Using pwhistory.conf
-
Set the number of passwords to remember in the configuration file
/etc/security/pwhistory.conf
.Locate the
remember =
setting in the configuration file to set the number of passwords to remember. (Uncomment the setting if it is commented out.). You can set any required number in this procedure we set: -
In this directory -
/etc/authselect/custom/tufin-password-policy/
- edit these files-
password-auth
-
system-auth
and remove the
remember=5
from both of them:The options on thepam_pwhistory.so
line in the global PAM files/etc/pam.d/*-auth
, override the settings in/etc/security/pwhistory.conf
. To use the settings inpwhistory.conf
, modify the global PAM configuration files as follows (the procedure uses the custom profiletufin-password-policy
).Before:
After:
-
-
Once the changes are made to the global PAM configuration files, use this command to apply the changes:
-
Confirm that the changes have been applied to the global PAM files:
grep "pam_pwhistory" /etc/pam.d/{password,system}-auth
grep "pam_pwhistory" /etc/pam.d/{password,system}-authThe output should be without the
remember=
in thepam_pwhistory.so
line:
Set Password Complexity/Policy with pam_pwquality
The pam_pwquality
module is enabled by default in all SSSD profiles. See man pam_pwquality for full details.
Set the appropriate options in the file /etc/security/pwquality.conf
. See man pwquality.conf
for more options.
Insert the following options in /etc/security/pwquality.conf
:
-
Enforce password complexity for root:
-
Password size (minimum acceptable length for the new password):
-
Maximum credit for having digits in the password:
-
Maximum credit for having uppercase characters in the password:
-
Maximum credit for having lowercase characters in the password:
-
Maximum credit for having other characters in the password:
Note on credits: The credit values configured fordcredit
,ucredit
,lcredit
andocredit
are only for illustrative purposes. The credit values can be configured in different ways according to requirements. The credit values can be set as follows:Credit Value > 0: Maximum credit for having respective characters in the new password.
Credit Value < 0: Minimum mandatory credit required for having respective characters in the new password.
Credit Value = 0: No mandatory requirement for having the respective character class in the new password.
-
Minimum number of required character classes in the password:
-
Maximum number of allowed consecutive same characters in the password:
-
Maximum number of allowed consecutive characters of the same class in the password:
-
Set the number of characters from the old password that must not be present in the new password:
This option will not work for root as root is not asked for an old password; the checks that compare the old and new password are not performed.
Working with faillock
Enable/Disable faillock
-
To enable
faillock
: -
To check/verify current settings:
-
To disable
faillock
:
Configure faillock
faillock
options should be stored in /etc/security/faillock.conf
:
Using the faillock
Command
To reset/view authentication failure records, use commands like the following:
-
Display authentication failure records for username:
-
Reset authentication failure records for username:
Lock out the Root User
To lock out the root user, add even_deny_root
to /etc/security/faillock.conf
.
Exclude Specific Users from the Account Lock
To disable a regular user from being locked out even after multiple failed logins, add the user to a user group (for example: no_faillock_group
), and then add the following line to faillock.conf
:
Handle Persistent Account Lockouts
The default directory that pam_faillock
uses is usually cleared on system boot so the access will be also reenabled after the system reboot. If that is undesirable, set the dir=
option in faillock.conf
:
Ensure the directory is created:
Rollback Configurations
Was this helpful?
Thank you!
We’d love your feedback
We really appreciate your feedback
Send this page to a colleague