Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run "dpkg-reconfigure ca-certificates" noninteractively?

I would like default to "accept" new certificate. I have tried the following.

$ dpkg-reconfigure -f noninteractive ca-certificates

It runs, but the CA is not added.

If not possible, is it OK to directly modify /etc/ca-certificates.conf?

Thank you for the help.

like image 244
user180574 Avatar asked Dec 19 '13 20:12

user180574


2 Answers

no this won't work out of the box.

Based on http://blog.sandipb.net/2009/08/08/adding-new-ca-certificates-in-ubuntu-jaunty/, you can do the following sequence that doesn't need interactive selection:

sudo cp my.cert /usr/local/share/ca-certificates/
sudo update-ca-certificates

tested and works on debian 5/6.

like image 117
oDDsKooL Avatar answered Nov 08 '22 21:11

oDDsKooL


Actually, you can specify minimum priority question to show using param -p with valid priorities (low medium high critical). If you set it to critical, should work fine for your scenario.

sudo dpkg-reconfigure -p critical ca-certificates
like image 39
Jonathas Morais Avatar answered Nov 08 '22 20:11

Jonathas Morais