Remove certificates from the TRUSTED_ROOTS store in a streamlined way
Symptoms:
chsh -s /bin/bash root as per above link./tmp folderchmod +x removeroot.sh to make the file executable. ./removeroot.sh# service-control --stop --allKB reference: Stopping, Starting or Restarting VMware vCenter Server Appliance services
# service-control --start --all
https://knowledge.broadcom.com/external/article/385107/vcert-scripted-vcenter-expired-certific.html
For removal from vmdir:
3. Manage Certificates
3. CA Certificates in VMware Directory
For removal from VECS:
3. Manage Certificates
4. CA Certificates in VECs Directory
Removing a vCenter root CA using the removeroot.sh script fails with the following errors:
dir-cli failed. Error 87: Operation failed with error ERROR_INVALID_PARAMETER (87)
--> Unpublish certificate from VMDIR
dir-cli failed. Error 1168: Operation failed with error ERROR_NOT_FOUND (1168)
The SubjectKey value is blank in the output of the script:
7:alias:<alias>
SubjectKey:
Subject: CN=CA, CN=<FQDN>, dc=vsphere,dc=local, C=US
Issuer: CN=CA, CN=<FQDN>, dc=vsphere,dc=local, C=US
Cause: The removeroot.sh script relies on the subject key to be valid. It will fail with INVALID parameter if no subject key is present.
Resolution: To resolve this issue remove the root CA manually with the steps in Verify and remove CA Certificates from the TRUSTED_ROOTS store in the VMware Endpoint Certificate Store(VECS).
/usr/lib/vmware-vmafd/bin/vecs-cli entry list --store TRUSTED_ROOTS --text
/usr/lib/vmware-vmafd/bin/vecs-cli entry list --store MACHINE_SSL_CERT --text
Mandatory precaution: