This error appears at logon when the computer account password stored on the workstation no longer matches the one in Active Directory. It typically happens after restoring a virtual machine snapshot or an old backup, after the computer account was reset on the domain controller, or when a machine was offline for a long time. Nobody can log on with domain credentials until the secure channel is repaired.
Fix with PowerShell (preferred)
Log on with a local administrator account, open PowerShell as administrator and reset the machine account password against a domain controller:
Reset-ComputerMachinePassword -Server dc01 -Credential (Get-Credential)
Restart-Computer
Enter the credentials of a domain account allowed to reset computer passwords. The computer does not leave the domain and keeps its SID, group memberships and GPO links.
An equivalent command that also tests the channel first:
Test-ComputerSecureChannel -Repair -Credential (Get-Credential)
Fix with netdom
netdom.exe is included in Windows Server and in the RSAT tools for Windows clients. From an elevated command prompt:
netdom.exe resetpwd /server:dc01 /userD:administrator /passwordD *
Type the password when prompted and reboot the machine.
Last resort: rejoin the domain
If the reset fails, remove the computer from the domain (join a workgroup), reboot and join it again. From PowerShell:
Add-Computer -Credential DOMAIN\administrator -DomainName domain.local
Rejoining creates a new secure channel and keeps the existing computer object when the name is unchanged.
References: Reset-ComputerMachinePassword and Test-ComputerSecureChannel on Microsoft Learn. Related: IT support by GOLINE.