Some user accounts (such as service account) are used for third party integrations and often need to the password set to never expire. Setting the user password expiry attribute in vCenter UI is a global parameter, thus it impacts all the users and a specific user can't be set as password never expires.
VMware vCenter Server
If the password of the service account expires and if that is used for any third party integration such as backup, the integration will fail and the third party tools will experience errors such as backup job failure.
/var/log/vmware/sso/websso.log will have similar entries as below.
yyyy-mm-ddThh:mm:ss.mssZ ERROR websso[56:tomcat-http--18] [CorId=29b33506-52fe-42c1-96ad-451a7e609e5a] [com.vmware.identity.idm.server.IdentityManager] Failed to authenticate principal [<user_name>@<SSO_Domain>]. User password expired.
yyyy-mm-ddThh:mm:ss.mssZ INFO websso[56:tomcat-http--18] [CorId=29b33506-52fe-42c1-96ad-451a7e609e5a] [com.vmware.identity.idm.server.IdentityManager] Authentication failed for user [<user_name>@<SSO_Domain>] in tenant [<SSO_Domain>] in [23] milliseconds with provider [<SSO_Domain>] of type [com.vmware.identity.idm.server.provider.vmwdirectory.VMwareDirectoryProvider]
yyyy-mm-ddThh:mm:ss.mssZ ERROR websso[56:tomcat-http--18] [CorId=29b33506-52fe-42c1-96ad-451a7e609e5a] [com.vmware.identity.idm.server.ServerUtils] Exception 'com.vmware.identity.idm.PasswordExpiredException: User account expired: {Name: <user_name>, Domain: <SSO_Domain>}'
com.vmware.identity.idm.PasswordExpiredException: User account expired: {Name: <user_name>, Domain: <SSO_Domain>}
com.vmware.identity.idm.PasswordExpiredException: User account expired: {Name: <user_name>, Domain: <SSO_Domain>}
"dir-cli" , an internal tool can be used to achieve this requirement.
This command line utility dir-cli has many other functions as well. Refer to the dir-cli Command Reference documentation.
Example snippets:
Set the password expiry to "never":
# /usr/lib/vmware-vmafd/bin/dir-cli user modify --account test --password-never-expiresEnter password for [email protected]:Password set to never expire for [<User_Name>].
Validation:
# /usr/lib/vmware-vmafd/bin/dir-cli user find-by-name --account <User_Name> --level 2Enter password for [email protected]:Account: <User_Name>UPN: <User_Name>@<SSO_DOMAIN>Account disabled: FALSEAccount locked: FALSEPassword never expires: TRUEPassword expired: FALSEPassword expiry: N/A