I'm doing some automation for a local machine in Vagrant using Puppet.

I need to add a CA certificate to the trusted list in Ubuntu Trusty 14.04 LTS. I simply add the file to the right place:

file { 'godaddy-ca-cert':
    path   => '/usr/share/ca-certificates/godaddy-ca.crt',
    owner  => 'root',
    group  => 'root',
    mode   => '0644',
    source => "puppet:///modules/certificates/godaddy-ca.pem"

What I can do to manually add the certificate? Typically I've done the following manually to update certificates:

sudo dpkg-reconfigure ca-certificates

However, this doesn't work as it requires manual input. How can I automate adding root CA authorities without any manual input?


I believe you're looking for the update-ca-certificates command. That should not require any user input.

However, you're installing the certificate in the wrong place; you want to put it in /usr/local/share/ca-certificates/; that is the directory for locally-added certificates and any added there are automatically trusted.

If you really want to put it in /usr/share/ca-certificates/, you'll have to add it to /etc/ca-certificates.conf (to make it trusted) before calling update-ca-certificates.

  • just a little warning, if your root type update-ca-certificates --refresh it will remove local added CAs – confiq Aug 2 '15 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.