# Ensure pam_pwhistory Includes use_authtok Option

- Source: https://support.icompaas.com/support/solutions/articles/62000235462-ensure-pam-pwhistory-includes-use-authtok-option
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [CIS Amazon Linux 2 Benchmark v3.0.0](https://support.icompaas.com/support/solutions/62000112696) › [CIS Amazon Linux 2 Benchmarks](https://support.icompaas.com/support/solutions/folders/62000169265)
- Last updated: 2026-05-29
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

**Profile Applicability:** • Level 1

**Description:**  
 The use\_authtok option in the pam\_pwhistory module ensures that the module uses the password token obtained from a previous module in the stack rather than prompting for a password again. Including this option prevents users from bypassing password history checks during password changes.

**Rationale:** Using use\_authtok enforces consistent password history validation during password changes, enhancing security by preventing circumvention of password reuse restrictions.

**Impact:** Pros:

-   Ensures password history checks are effectively enforced.  
    
-   Prevents users from reusing recent passwords.  
    

Cons:

-   Requires proper PAM stack configuration to function correctly.  
    

**Default Value:** use\_authtok may not be included by default and must be explicitly configured.

**Pre-requisites:**

-   Root or sudo privileges to modify PAM configuration files.  
    

**Remediation:**

### **Test Plan:**

**Using Linux command line:**

1.  Check PAM password configuration for pam\_pwhistory usage with use\_authtok:
2.  grep pam\_pwhistory /etc/pam.d/system-auth  
    grep pam\_pwhistory /etc/pam.d/common-password
    
3.  Verify that the line includes use\_authtok.  
    

### **Implementation Plan:**

**Using Linux command line:**

1\. Edit the PAM password configuration file:  

vi /etc/pam.d/system-auth

2\. Ensure the pam\_pwhistory module line includes use\_authtok, for example:  

password required pam\_pwhistory.so use\_authtok remember=5 enforce\_for\_root

3\. Save the file.  

### **Backout Plan:**

**Using Linux command line:**

1.  Remove the use\_authtok option if necessary.
    
2.  Test password changes to confirm behavior.  
    

**References:**

-   CIS Amazon Linux 2 Benchmark v3.0.0  
    
-   pam\_pwhistory Documentation  
    
-   [NIST SP 800-63B - Digital Identity Guidelines  
    ](https://pages.nist.gov/800-63-3/sp800-63b.html)

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
