Home » Blog » Active Directory » Audit Password Changes in Active Directory & Get the Last Date

Audit Password Changes in Active Directory & Get the Last Date

author
Published By siddharth
Anuraag Singh
Approved By Anuraag Singh
Published On November 27th, 2024
Reading Time 8 Minutes Reading
Category Active Directory

AD Password Audit Methods

Admins need to audit password changes in Active Directory from time to time to maintain its security. So to assist admins we came up with this write-up on tracking AD password changes.

Here we will teach you about all possible techniques that provide a complete overview of all the changes that happened in the lifetime. This is important if you are going to reset user passwords in Active Directory anytime soon. So let’s start with the command line queries and slowly make our way from there.

Use Code to Audit Password Changes in Active Directory

Open the command line and paste the following

dsquery * -filter "(&(objectClass=user)(objectCategory=person)(!(samAccountName=HealthMailbox*|SystemMailbox*)))" -limit 15 -attr displayName, pwdLastSet

Moreover, you can generate the human-readable results by putting the large integer results into the inbuilt command line query

w32tm.exe /ntte [time in Windows NT time format]Audit Password Changes in Active Directory with dsquery

Unfortunately, this is labor-intensive as you have to copy-paste each result one at a time. Moreover, this also brings in changes of error or getting duplicate results. Admins would find it quite problematic to keep track of every result.

So here is an alternative

First up get a list of all available users with the help of

net user /domain

Then

net user %username% /domain | findstr "Password last set"

Audit Password Changes in Active Directory With Command line Net User

Both command-line queries have an element of manual effort. So relying solely on them is not the best idea if you want to bulk audit password changes in Active Directory. Here is a PowerShell alternative you can use instead.

Get-ADUser -Filter * -Properties pwdLastSet | Select-Object @{Name="User Name";Expression={($_.name)}}, @{Name="Last Password Set";Expression={[DateTime]::FromFileTime($_.pwdLastSet)}} | Sort-Object Name | Format-Table

Audit Password Changes in Active Directory with PowerShell

A few tweaks to this go a long way in identifying the AD computer account password expiration date too. If code makes you quiver AD has its own components that can be used to audit the password data.

Get the Last Date of the AD User Password Change Using Native Components

There are three primary ways of using the AD itself to get the latest password change data.

First up we have the Event Viewer you have to set it up if you have not made an Active Directory audit checklist before.

Stage 1: Install Group Policy Management Editor (GPME)

  • Install Group Policy Management Editor for ad password audit
  • Open Server Manager.
  • Go to Roles and Features > Features.
  • Enable advanced features and select GPME.
  • Follow the installation wizard.

Stage 2: Configure GPME to Audit Password Changes in Active Directory

  • Step 1: Enable Password Change Auditing
    • Launch GPME.msc
      Open GPME
    • Select Policy Object
      Select Policy
    • Go to Computer Configuration > Policies > Windows Settings > Security Settings > Local Policies > Audit Policy
      View Policy Property
    • Enable “Audit account management” and select Success and Failure
      Define Policy Settings
  • Step 2: Configure Event Viewer
    • Follow Step 1 till Security Settings
    • Select Event Log and set the maximum security log size to 1 GB
      Expand Event Viewer Log Size
  • Step 3: Check Security Logs
    • Open Event Viewer
    • Look for: Event ID 4724: Admin password reset
      View AD Password Audit message on Event Viewer

The alternative would be to use Active Directory Users and Computers

  • Launch ADUC instance.
  • Check the View to ensure that the Advanced Features are enabled before you proceed.
    Enable Advanced Features to Audit Password Changes in Active Directory
  • Pick any user from the list to audit their password.
    Open Properties
  • Then Right-click > Select Properties > Go to Attribute Editor > scroll till pwdLastSet.
    View Attribute to perform an AD Password Audit

Using the Administrative Center can also help during Active Directory password audits

  • Inside ADAC > open Global Filter > toggle LDAP > type:
    (&(objectClass=user)(objectCategory=person))
  • Pick a User from the list > open Extensions> go to Attribute Editor > see the pwdLastSet.
    use ADAC to Audit Password Changes in Active Directory

It could be difficult for admins to choose, so we have a special section dedicated to covering the pros and cons of the various methods discussed so far. This section will help admins select a method that is most suitable for their use case.

Comparison Chart of All Native Methods to Conduct AD Password Audit

Here are tabular constructions that can give you a clear idea about the effectiveness of the traditional AD user password auditing methods.

Comparison Metric Command Line PowerShell Active Directory GUI
Ease of Use Moderate – Requires knowledge of specific commands. High – Requires scripting knowledge but is powerful. Easy – User-friendly interface but less flexible.
Efficiency Time-consuming for large-scale tasks. Highly efficient for large-scale automation. Suitable for small, one-off tasks.
Customization Limited options for customization. Highly customizable through scripts and filters. Limited to GUI options.
Automation Manual process; difficult to automate. Easy to automate with scripts or scheduled tasks. No built-in automation features.
Data Granularity Basic information; limited filtering options to audit password changes in Active Directory Detailed reports with specific attributes. Limited to what the GUI displays.
Real-Time Monitoring Requires manual refresh or running commands again. Can be automated for near real-time monitoring. No real-time monitoring; manual refresh needed.
Export Capabilities Limited – manual copy-paste or redirection to file. Can export to various formats like CSV, TXT No direct export options, manual reporting required.
Scalability Poor scalability for large AD environments. Highly scalable with automated scripts. Not scalable for large or complex environments.
Learning Curve Steeper for beginners; knowledge of commands needed. Moderate – Knowledge of PowerShell required. Low – Easy to learn with point-and-click interface.
Audit Depth Basic audit capabilities. Deep audit capabilities with filters and custom scripts. Limited to predefined fields visible in the GUI.

Automate Password History Auditing in Active Directory Environments

The SysTools Active Directory Reporting tool is your helping hand to complete all monitoring activity inside an AD. So uses it to pull out detailed reports on exactly when a particular user had their password updated.

Download Now Purchase Now

You can register multiple domains and calculate the time passed since the last password update. Moreover, the tool allows you to

To use the advanced utility for auditing user-level password changes follow these steps

Step 1. Install a copy of the software on your machine, launch it let the administrator credentials fill in on their own, and press login.

Type administrator and Start to Audit Password Changes in Active Directory

Step 2. Take your cursor on the REGISTER DOMAIN CONTROLLER, to add a new domain, you can also click the small building icon in the top left corner to open the dialog box.

Register Domain Controller button to Audit Password Changes in Active Directory

Step 3. Inside the box put in a custom easy to recognize Domain Friendly Name, and Type in the corresponding IP address. Press Save to register the Domain.

Save and Continue

Step 4. Then you are taken to the Domain Details page where you have to put in the admin credentials and Validate the results.

permission validation for AD Password Audits

Step 5. After that tap the Reports button, and a Screen with all the various options appears to begin the audit click on Password Changed Users

Select User Category that allows you to Audit Password Changes in Active Directory

Step 6. Then, on the Report creation page is where you can apply a date picker, Preview the user list whose password history is under audit, and generate the CSV in that order.

Preview before you Audit Password Changes in Active Directory

Step 7. Once you have the list with you save it in an appropriate location and use any text editor or spreadsheet program to perform further analysis.

successfull download message of Audit Password Changes in Active Directory

Conclusion

So now we believe there shouldn’t be any problems whenever the admin tries to audit password changes in Active Directory. The complete overview of all the various methods, such as PowerShell, ADUC, ADAC, Event Viewer, and Command line, was laid out in an easy-to-understand language. Moreover, to fast-track the process and introduce automation in auditing admins can rely on the utility.

Frequently Asked Questions

How often do I need to perform AD password audit in my organization?

Password change tracking should be part of regular AD health checks. Schedule a run on a weekly or monthly basis. Sometimes a schedule may have to be preponed if a user demand arises or something goes wrong in the Active Directory.

Can password audit for Active Directory be done at the user level?

The only sort of semi-audit that users can do is look at how long their current password is valid. Other than that password length, last update date,  etc comes under admin responsibilities. Admins may delegate special permissions to some users that make a user the de-facto password admin. However, this also means that the user is no longer a regular user.

What is the default password policy in Active Directory?

There is no native password inside any Active Directory, it is all subject to what an organization decides it to be. Moreover, at the time of new user creation admins get the option to make a one-time password, a never-expiring password, or even create users with no password at all. The last option is possible by enabling the PASSWD_NOTREQD option.

Connect With Us

+9111-28084986