Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 6 down vote accepted

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.

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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