err vmdird t@140245530842880: Bind Request Failed (x.x.x.x) error 49: Protocol version: 3, Bind DN: "cn=vcsa,ou=Domain Controllers,dc=example,dc=com", Method: SASL
err vmdird t@140245530842880: SASLSessionStep: sasl error (-13)(SASL(-13): authentication failure: client evidence does not match what we calculated. Probably a password error)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.vmware.cis.core.authz.accesscontrol.impl.LotusInitializer]: Constructor threw exception; nested exception is java.lang.RuntimeException: com.vmware.identity.interop.ldap.InvalidCredentialsLdapException: Invalid credentials
LDAP error [code: 49]
VMware vCenter Server Appliance 6.5.x
VMware vCenter Server Appliance 6.7.x
VMware vCenter Server Appliance 7.0.x
VMware vCenter Server Appliance 8.0.x
This issue occurs when the machine account password stored in the VMDIRD database does not match the password used by the services to authenticate with the VMware Directory Service.
NOTE: Take offline (powered off) snapshots of all the vCenter Server Instance in the same vSphere Single Sign On Domain (ELM) before attempting . This is standard best practice before making any manual changes to the VMDIRD database.
Pre-requisites
Procedure to Identify and Reset Expired Machine Account Password for vCenter Server in Enhanced Linked Mode (ELM)
ldapsearch -h localhost -p 389 -x \ -D "$(/opt/likewise/bin/lwregshell list_values '[HKEY_THIS_MACHINE\services\vmdir\]' | grep dcAccountDN | cut -d '"' -f4)" \ -w "$(/opt/likewise/bin/lwregshell list_values '[HKEY_THIS_MACHINE\services\vmdir\]' | grep dcAccountPassword | cut -d '"' -f4)" \ -b "" -s base dn
ldap_bind: Invalid credentials (49)
# extended LDIF
# LDAPv3
dn: cn=DSE Root
# search result
search: 2
result: 0 Success
# numResponses: 2
# numEntries: 1
/usr/lib/vmware-vmafd/bin/dir-cli state get
Directory Server State: Normal (3)
/usr/lib/vmware-vmafd/bin/dir-cli state set --state NORMAL
chmod +x reset_machine_pw.sh
/usr/lib/vmware-vmdir/bin/vdcrepadmin -f showpartners -h localhost -u administrator -w <Administrator_Password>
Sample output
Partner: psc01.example.com
Partner: psc02.example.com
./reset_machine_pw.sh
When prompted Enter the administrator@<vsphere.local> password.
When prompted Enter the FQDN(s) of replication partners (comma-separated if more than one).
bash: ./reset_machine_pw.sh: /bin/bash^M: bad interpreter: No such file or directory
Run the command
sed -i -e 's/\r$//' reset_machine_pw.sh
service-control --stop --all && service-control --start --all
Important: Repeat Steps 8–10 on VMDIR replication partner nodes if replication is broken in both directions due to expired Machine Account credentials.
Sample Script Execution Output
Machine account password reset for vCenterext.example.com started on [YYYY-MM-DDTHH:MM:SS]
Detected this node is a vCenter server with embedded PSC.
Detected DN: cn=vCenterext.example.com,ou=Computers,dc=vsphere,dc=local
Detected PNID: vCenterext.example.com
Detected PSC: psc.example.com
Detected SSO domain name: vsphere.local
Enter password for [email protected]:
updating registry with password.
updating local PSC with password.
modifying entry "cn=vCenterext.example.com,ou=Computers,dc=vsphere,dc=local"
Since there were no replication partners specified, we're done here.
Finished on [YYYY-MM-DDTHH:MM:SS]