Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

1 Answer 1

up vote 4 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

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.