Configure a Password Complexity Policy

30 minutes
  • 2 Learning Objectives

About this Hands-on Lab

In this lab, we will create a password complexity policy that will require users to enter a password that meets our defined password requirements when creating a new password. Password policies help us guarantee passwords used on our systems are secure passwords.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Configure a Password Complexity Policy
  1. To create the password requirements in the policy, we need to edit the /etc/security/pwquality.conf file and include the following:

    minlen = 12  
    maxrepeat = 2  
    minclass = 4  
    ucredit = -3  
    dcredit = -3  
    badword = password, pass, word  
Put the Password Complexity Policy into Effect
  1. In order to put the new policy into effect, we need to add the following line to the /etc/pam.d/passwd file:

    password    required retry=3
    • This line should be inserted as the first line with the word "password", the third uncommented line in the default configuration of the file.

Additional Resources

In order to increase security on a new server, your supervisor has asked you to set up a password complexity policy on a new Red Hat server with the following requirements:

  • The password must be 12 characters in length.
  • The password must not repeat the same character more than two times.
  • The password must contain characters from four classes
  • The password must contain 3 upper case letters
  • The password must contain 3 digits
  • Forbid words “password, pass, word”

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Get Started
Who’s going to be learning?

How many seats do you need?

  • $499 USD per seat per year
  • Billed Annually
  • Renews in 12 months

Ready to accelerate learning?

For over 25 licenses, a member of our sales team will walk you through a custom tailored solution for your business.


Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!