Skip to navigation Skip to main content

Utilities

  • Subscriptions
  • Downloads
  • Red Hat Console
  • Get Support
Red Hat Customer Portal
  • Subscriptions
  • Downloads
  • Red Hat Console
  • Get Support
  • Products

    Top Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    All Products

    Downloads and Containers

    • Downloads
    • Packages
    • Containers

    Top Resources

    • Product Documentation
    • Product Life Cycles
    • Product Compliance
    • Errata
  • Knowledge

    Red Hat Knowledge Center

    • Knowledgebase Solutions
    • Knowledgebase Articles
    • Customer Portal Labs
    • Errata

    Top Product Docs

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    All Product Docs

    Training and Certification

    • About
    • Course Index
    • Certification Index
    • Skill Assessment
  • Security

    Red Hat Product Security Center

    • Security Updates
    • Security Advisories
    • Red Hat CVE Database
    • Errata

    References

    • Security Bulletins
    • Security Classifications
    • Severety Ratings
    • Security Data

    Top Resources

    • Security Labs
    • Backporting Policies
    • Security Blog
  • Support

    Red Hat Support

    • Support Cases
    • Troubleshoot
    • Get Support
    • Contact Red Hat Support

    Red Hat Community Support

    • Customer Portal Community
    • Community Discussions
    • Red Hat Accelerator Program

    Top Resources

    • Product Life Cycles
    • Customer Portal Labs
    • Red Hat JBoss Supported Configurations
    • Red Hat Insights
Or troubleshoot an issue.

Select Your Language

  • English
  • Français
  • 한국어
  • 日本語
  • 中文 (中国)

Set a password policy in Red Hat Enterprise Linux 7

Solution Verified - Updated 2024-06-14T19:29:59+00:00 -
English
  • English
  • Japanese
  • Chinese

Issue

  • Set the following Password Policy & Complexity requirements in Red Hat Enterprise Linux 7:
    • Lock an account after X consecutive failed login attempts.
    • Keep a history of used passwords.
    • Password size (Minimum acceptable length for the new password).
    • Set a limit to the number of digits in the password.
    • Set a limit to the number of Upper Case characters in the password.
    • Set a limit to the number of Lower Case characters in the password.
    • Set a limit to the number of Other characters in the password.
    • Set a minimum number of required classes in the password (digits, uppercase, lowercase, others).
    • Set a maximum number of allowed consecutive same characters in the password.
    • Set a 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.
    • Enforce password complexity for root.

Environment

  • Red Hat Enterprise Linux 7
  • pam_faillock.so
  • pam_pwhistory.so
  • pam_pwquality.so
  • /etc/security/pwquality.conf

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content

Red Hat X (formerly Twitter)

Quick Links

  • Downloads
  • Subscriptions
  • Support Cases
  • Customer Service
  • Product Documentation

Help

  • Contact Customer Portal
  • Customer Portal FAQ
  • Log-in Assistance

Site Info

  • Trust Red Hat
  • Browser Support Policy
  • Accessibility
  • Awards and Recognition
  • Colophon

Related Sites

  • redhat.com
  • developers.redhat.com
  • connect.redhat.com
  • cloud.redhat.com

Systems Status

About

  • Red Hat Subscription Value
  • About Red Hat
  • Red Hat Jobs

Red Hat legal and privacy links

  • About Red Hat
  • Jobs
  • Events
  • Locations
  • Contact Red Hat
  • Red Hat Blog
  • Diversity, equity, and inclusion
  • Cool Stuff Store
  • Red Hat Summit
Copyright © 2025 Red Hat, Inc.

Red Hat legal and privacy links

  • Privacy statement
  • Terms of use
  • All policies and guidelines
  • Digital accessibility

Formatting Tips

Here are the common uses of Markdown.

Code blocks
~~~
Code surrounded in tildes is easier to read
~~~
Links/URLs
[Red Hat Customer Portal](https://access.redhat.com)
Learn more

Request a English Translation

Are you sure you want to update a translation?

It seems an existing English Translation exists already.

We appreciate your interest in having Red Hat content localized to your language. Please note that excessive use of this feature could cause delays in getting specific content you are interested in translated.
Request Japanese Translation Request Chinese Translation Request Korean Translation

Generating Machine Translation

Loading…
We are generating a machine translation for this content. Depending on the length of the content, this process could take a while.