ANAVEM
Languagefr
Windows domain controller displaying security audit events in Event Viewer
Event ID 4780InformationMicrosoft-Windows-Security-AuditingWindows

Windows Event ID 4780 – Microsoft-Windows-Security-Auditing: Computer Account Password Changed

Event ID 4780 logs when a computer account password is changed in Active Directory. This security audit event tracks machine account password updates for domain-joined computers.

Emanuel DE ALMEIDAEmanuel DE ALMEIDA
18 March 20269 min read 0
Event ID 4780Microsoft-Windows-Security-Auditing 5 methods 9 min
Event Reference

What This Event Means

Event ID 4780 represents a fundamental security audit event in Windows Active Directory environments. When a computer account password changes, either through automatic renewal or administrative action, domain controllers log this event to maintain an audit trail of machine account modifications.

Computer accounts in Active Directory maintain trust relationships with the domain through shared secrets (passwords). These passwords automatically rotate every 30 days by default, controlled by the MaximumPasswordAge registry value. The password change process involves the client computer initiating a secure channel with the domain controller and requesting a new password.

The event contains structured data including the Security ID (SID) of the computer account, the account name, domain information, and details about who or what initiated the change. When automatic password changes occur, the computer account itself appears as the subject performing the action. Administrative password resets show the administrator's account as the subject.

This event plays a crucial role in security monitoring and compliance. Organizations use 4780 events to detect anomalous computer account activity, validate automated password rotation schedules, and investigate potential security breaches involving compromised machine accounts. The event also helps troubleshoot domain trust issues when computers lose their secure channel relationships.

Applies to

Windows 10Windows 11Windows Server 2019/2022/2025
Analysis

Possible Causes

  • Automatic computer account password renewal (default every 30 days)
  • Administrative reset of computer account password using Active Directory Users and Computers
  • PowerShell cmdlets like Reset-ComputerMachinePassword executed on domain-joined computers
  • Computer rejoining the domain after being removed or experiencing trust relationship issues
  • Third-party tools or scripts modifying computer account passwords
  • Group Policy settings forcing computer account password changes
  • Domain controller replication events synchronizing password changes
Resolution Methods

Troubleshooting Steps

01

Review Event Details in Event Viewer

Start by examining the specific details of the 4780 event to understand the context and scope of the password change.

  1. Open Event Viewer on the domain controller
  2. Navigate to Windows LogsSecurity
  3. Filter for Event ID 4780 using the filter option
  4. Double-click the event to view detailed information
  5. Review the Subject section to identify who initiated the change
  6. Check the Target Account section for the affected computer
  7. Note the timestamp and correlation with other security events

Key fields to examine:

  • Subject Account Name: Shows who made the change
  • Target Account Name: The computer account that was modified
  • Target Domain: Domain where the account resides
  • Privileges: Security privileges used for the operation
Pro tip: Correlate 4780 events with 4624 (logon) and 4634 (logoff) events to build a complete picture of computer account activity.
02

Query Events with PowerShell

Use PowerShell to efficiently query and analyze 4780 events across multiple domain controllers or time periods.

  1. Open PowerShell as Administrator
  2. Query recent 4780 events:
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4780} -MaxEvents 50 | Select-Object TimeCreated, Id, LevelDisplayName, Message
  1. Filter events for specific computer accounts:
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4780} | Where-Object {$_.Message -like "*COMPUTERNAME*"}
  1. Export events to CSV for analysis:
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4780; StartTime=(Get-Date).AddDays(-7)} | Select-Object TimeCreated, Id, @{Name='ComputerAccount';Expression={($_.Message -split '\n' | Where-Object {$_ -like '*Account Name:*'})[1] -replace '.*Account Name:\s*',''}}, @{Name='Subject';Expression={($_.Message -split '\n' | Where-Object {$_ -like '*Subject:*' -and $_ -like '*Account Name:*'})[0] -replace '.*Account Name:\s*',''}} | Export-Csv -Path "C:\Temp\Event4780_Analysis.csv" -NoTypeInformation
  1. Check for unusual patterns or frequency of password changes
Warning: Large queries against the Security log can impact domain controller performance. Use time filters and limit results appropriately.
03

Verify Computer Account Password Age Settings

Investigate the domain password policy settings that control automatic computer account password changes.

  1. Check the current domain password policy:
Get-ADDefaultDomainPasswordPolicy
  1. Examine computer account password age registry settings on client computers:
Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters" -Name "MaximumPasswordAge"
  1. Check if password changes are disabled:
Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters" -Name "DisablePasswordChange"
  1. Review Group Policy settings affecting computer account passwords:
  2. Open Group Policy Management Console
  3. Navigate to Computer ConfigurationPoliciesWindows SettingsSecurity SettingsLocal PoliciesSecurity Options
  4. Check Domain member: Maximum machine account password age
  5. Verify Domain member: Disable machine account password changes is not enabled

Default values:

  • MaximumPasswordAge: 30 days (2592000 seconds)
  • DisablePasswordChange: Should be 0 (disabled) or not present
Pro tip: Setting MaximumPasswordAge to 0 disables automatic password changes, which can create security risks but may be necessary for some legacy applications.
04

Investigate Trust Relationship Issues

When 4780 events appear frequently or unexpectedly, investigate potential secure channel or trust relationship problems.

  1. Test the secure channel from the affected computer:
Test-ComputerSecureChannel -Verbose
  1. If the test fails, repair the secure channel:
Test-ComputerSecureChannel -Repair -Credential (Get-Credential)
  1. Check domain controller replication status:
repadmin /replsummary
  1. Verify computer account status in Active Directory:
Get-ADComputer -Identity "COMPUTERNAME" -Properties PasswordLastSet, LastLogonDate, Enabled
  1. Review DNS resolution for domain controllers:
nslookup -type=SRV _ldap._tcp.dc._msdcs.yourdomain.com
  1. Check time synchronization between client and domain controllers:
w32tm /query /status
Warning: Time skew greater than 5 minutes can cause authentication failures and trigger frequent password change attempts.
05

Advanced Security Analysis and Monitoring

Implement comprehensive monitoring and analysis of 4780 events for security and compliance purposes.

  1. Create a custom PowerShell script for continuous monitoring:
# Monitor 4780 events and alert on anomalies
$Events = Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4780; StartTime=(Get-Date).AddHours(-1)}
foreach ($Event in $Events) {
    $XML = [xml]$Event.ToXml()
    $SubjectAccount = $XML.Event.EventData.Data | Where-Object {$_.Name -eq 'SubjectUserName'} | Select-Object -ExpandProperty '#text'
    $TargetAccount = $XML.Event.EventData.Data | Where-Object {$_.Name -eq 'TargetUserName'} | Select-Object -ExpandProperty '#text'
    
    # Alert if password change initiated by non-system account
    if ($SubjectAccount -ne $TargetAccount -and $SubjectAccount -ne 'SYSTEM') {
        Write-Warning "Manual password change detected: $TargetAccount by $SubjectAccount at $($Event.TimeCreated)"
    }
}
  1. Configure Windows Event Forwarding to centralize 4780 events:
  2. On the collector server, enable the Windows Event Collector service:
wecutil qc
  1. Create a subscription for 4780 events:
<Subscription xmlns="http://schemas.microsoft.com/2006/03/windows/events/subscription">
    <SubscriptionId>ComputerPasswordChanges</SubscriptionId>
    <SubscriptionType>SourceInitiated</SubscriptionType>
    <Query>
        <![CDATA[
        <QueryList>
            <Query Id="0">
                <Select Path="Security">*[System[EventID=4780]]</Select>
            </Query>
        </QueryList>
        ]]>
    </Query>
</Subscription>
  1. Set up SIEM integration for automated analysis:
  2. Configure log forwarding to your SIEM solution
  3. Create correlation rules to detect:
  • Excessive password changes from single computers
  • Password changes outside maintenance windows
  • Changes initiated by unexpected user accounts
  • Patterns indicating potential compromise
Pro tip: Baseline normal computer account password change patterns in your environment to effectively identify anomalies and potential security incidents.

Overview

Event ID 4780 fires when a computer account password changes in Active Directory. This security audit event appears in the Security log on domain controllers and provides detailed information about machine account password modifications. Computer accounts automatically change their passwords every 30 days by default, making this a routine but important security event to monitor.

The event captures critical details including the target computer account, the account that initiated the change, and timestamp information. Domain controllers generate this event as part of Windows security auditing when Advanced Audit Policy Configuration enables Computer Account Management auditing.

This event differs from user account password changes and specifically tracks machine trust relationships. Monitoring 4780 events helps administrators track computer account maintenance, detect unauthorized password changes, and troubleshoot domain trust issues. The event provides forensic value for security investigations involving compromised computer accounts or suspicious domain activity.

Frequently Asked Questions

What does Event ID 4780 mean and when should I be concerned?+
Event ID 4780 indicates that a computer account password was changed in Active Directory. This is typically a normal, automated process that occurs every 30 days by default. You should be concerned if you see excessive frequency of these events from the same computer, password changes initiated by unexpected user accounts rather than the computer itself, or if these events correlate with authentication failures or trust relationship issues. Manual password changes by administrators outside of maintenance windows may also warrant investigation.
How can I distinguish between automatic and manual computer account password changes?+
In Event ID 4780, examine the Subject section of the event details. Automatic password changes show the computer account itself (ending with $) as both the subject and target. Manual changes initiated by administrators will show the administrator's user account in the Subject section while the Target Account shows the computer account. Additionally, automatic changes typically occur at regular 30-day intervals, while manual changes happen at irregular times and often correlate with administrative activities or troubleshooting efforts.
Why am I seeing frequent 4780 events from the same computer?+
Frequent 4780 events from the same computer usually indicate trust relationship problems between the computer and domain controller. Common causes include time synchronization issues (time skew greater than 5 minutes), DNS resolution problems preventing the computer from contacting domain controllers, network connectivity issues, or corruption in the local security database. Run Test-ComputerSecureChannel to diagnose the issue, check time synchronization with w32tm /query /status, and verify DNS resolution for domain controllers.
Can I disable automatic computer account password changes, and should I?+
Yes, you can disable automatic password changes by setting the registry value DisablePasswordChange to 1 in HKLM\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters or by configuring the Group Policy setting 'Domain member: Disable machine account password changes'. However, this is generally not recommended as it reduces security by maintaining static passwords indefinitely. Only disable this feature if you have legacy applications that break when computer passwords change, and ensure you have compensating security controls in place.
How do I troubleshoot authentication failures related to computer account password issues?+
Start by running Test-ComputerSecureChannel -Verbose to check the trust relationship status. If it fails, use Test-ComputerSecureChannel -Repair with domain administrator credentials. Check Event Viewer for related events like 3210 (secure channel failure) or 5722 (trust relationship failure). Verify time synchronization between the computer and domain controllers using w32tm /query /status. Ensure DNS is properly configured and the computer can resolve domain controller names. If problems persist, you may need to remove and rejoin the computer to the domain, which will generate new 4780 events as the trust relationship is reestablished.
Documentation

References (2)

Emanuel DE ALMEIDA
Written by

Emanuel DE ALMEIDA

Senior IT Journalist & Cloud Architect

Microsoft MCSA-certified Cloud Architect | Fortinet-focused. I modernize cloud, hybrid & on-prem infrastructure for reliability, security, performance and cost control - sharing field-tested ops & troubleshooting.

Discussion

Share your thoughts and insights

You must be logged in to comment.

Loading comments...