RHEL5 - how to restrict cannot use previous password for 'root'

Posted on 2012-08-16
Last Modified: 2012-08-17
I tried to use the followings at '/etc/pam.d/system-auth' to restrict the account cannot reuse previous password.

password    sufficient md5 shadow nullok try_first_pass use_authtok remember=5

It works ok at the user account, but not for the 'root' account. Is it possible to restrict on 'root' as well ?
Question by:francis_lai
    1 Comment
    LVL 76

    Accepted Solution

    Usually password policy does not apply to root since it does not go through the same process as user password changes.
    root running passwd is not prompted for the current password.

    There are fewer people who have access to root (with sudo access to passwd should be restricted.)

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
    Join Greg Farro and Ethan Banks from Packet Pushers ( and Greg Ross from Paessler ( for a discussion about smart network …
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now