SOLVED Locked out of GUI because of inappropriate TLS certificate

Christian K

Dabbler
Joined
Sep 22, 2021
Messages
17
I had created a CA cert and signed a new cert with it in the GUI. Imported the CA cert into my web browser.
However it turns out I set the wrong use cases in the certificate, because now Chromium reports

ERR_SSL_KEY_USAGE_INCOMPATIBLE

when attempting to open the GUI.

What would be the way to replace the new cert with the default cert in TrueNAS?
I have SSH access enabled but su or sudo don't work.
I suppose I'll have to use the local console on my server.
 

Christian K

Dabbler
Joined
Sep 22, 2021
Messages
17
It took me some time, but I solved this issue.
For those running into the same trap:

Get a root shell. Either by SSH access or via local keyboard and screen.

1. Look at the certificates
ll /etc/certificates
there should be the default freenas_default.crt and freenas_default.key

2. Edit /etc/local/nginx/nginx.conf
3. Find the lines with the ssl_certificate and ssl_certificate_key statements
4. Replace the files with /etc/certificates/freenas_default.crt and
/etc/certificates/freenas_default.key , respectively
5. restart nginx
service nginx restart
 
Top