Guys, We have installed 3rd party Root CA and Enterprise CA cert in keychain via Intune mdm and those are showing as non-trusted. Now I would like to know how to make those cert are trusted using shell script. Kindly help. Thanks.
maybe this will help, random search.. https://stackoverflow.com/questions/35031149/set-imported-certificate-to-always-be-trusted-in-mac-os...
The command to do this on older versions of macOS is below. However Apple removed the ability to force trust a certificate from CLI a few years ago, that would be the -k argument. To install a Certificate and force trust it you need to deploy with a configuration profile. Any other method will prompt a user for credentials.
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain <certificate>
Wednesday - last edited Wednesday
@sk25 Did you install the CA certificates via a Computer or User level profile? If they were installed as a User level profile they should be installed as Computer level.
It's on computer level profile only.
@sk25 Try this:
This is sounds like a plan.. Will check and revert. Thanks.
I'm sorry.. It doesn't work at all..
6 hours ago
we used a similar workaround like @AJPinto mentioned with the script..
this was the only solution which worked silently for us. If you find a better solution let me know