-
Notifications
You must be signed in to change notification settings - Fork 3
/
unifi-pfx-install.sh
30 lines (26 loc) · 1007 Bytes
/
unifi-pfx-install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
##
# Place a .pfx version of your certificate in ./tmp -- /tmp/certificate.pfx
# Password in this example: aircontrolenterprise
##
# Navigate to UniFi install folder
sudo su -
cd /var/lib/unifi/
# .pfx information
sudo keytool -list -keystore /tmp/certificate.pfx -storetype pkcs12
# Provide the password used when exporting the certificate.
aircontrolenterprise
# Note the Alias shown
# eg. le-d88c06cd-7919-04f4-bfd1-51eebd0ea8ba
# Backup UniFi keystore to /var/lib/unifi/keystore.orig
sudo mv /var/lib/unifi/keystore /var/lib/unifi/keystore.orig
# Create a new keystore
sudo keytool -importkeystore -srcstoretype pkcs12 -srcalias le-d88c06cd-7919-04f4-bfd1-51eebd0ea8ba -srckeystore /tmp/certificate.pfx -keystore keystore -destalias unifi
# use -srcalias from above
# use -srckeystore from above
# Password to open .pfx
aircontrolenterprise
# Set password to open keystore
aircontrolenterprise
aircontrolenterprise
# Restart UniFi service for changes to take effect
sudo service unifi restart