re-issuing the server certificate with the full host name seems to be the easiest option in my view. Does the server actually have an FQDN at the moment? Meaning⊠whatâs the output of hostname -f? Additionally, whatâs the output of ucr get domainname and ucr get ldap/base? Depending on that information I might actually change my mind and recommend reinstallation.
I used the same domain name, but not the same server name:
root@ucs01:~# ucr get domainname
domain.tld
root@ucs01:~# ucr get ldap/base
dc=domain,dc=tld
root@ucs01:~# hostname -f
ucs01.domain.tld
The clients expect the name mdc01. The name and the IP were taken over during the AD takeover:
root@ucs01:~# dig mdc01.domain.tld
; <<>> DiG 9.9.5-9+deb8u13A~4.2.1.201708081700-Univention <<>> mdc01.domain.tld
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 33109
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;mdc01.domain.tld. IN A
;; ANSWER SECTION:
mdc01.domain.tld. 900 IN CNAME ucs01.domain.tld.
ucs01.domain.tld. 900 IN A 192.168.5.101
;; AUTHORITY SECTION:
domain.tld. 900 IN NS ucs01.domain.tld.
;; Query time: 3 msec
;; SERVER: 192.168.5.101#53(192.168.5.101)
;; WHEN: Sat Feb 03 22:50:20 CET 2018
;; MSG SIZE rcvd: 96
Edit: Are there any recommended univention tools to re-issue the certificate or âjustâ using the openssl command to change the certificates in /etc/univention/ssl/?
My idea was to adjust the openssl.cnf containing the host name to add two more subjects as SANs, but:
root@ucs01:/etc/univention/ssl# grep DNS ucs01.domain.tld/openssl.cnf
subjectAltName = DNS:ucs01.domain.tld, DNS:ucs01, DNS:mdc01.domain.tld, DNS:mdc01
root@ucs01:/etc/univention/ssl# for i in *.$domainname; do univention-certificate renew -name $i -days 730; done
Renew certificate: ucs01.domain.tld
Using configuration from /etc/univention/ssl/openssl.cnf
Revoking Certificate 05.
Data Base Updated
Using configuration from /etc/univention/ssl/openssl.cnf
Using configuration from /etc/univention/ssl/openssl.cnf
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
countryName :PRINTABLE:'DE'
stateOrProvinceName :PRINTABLE:'DE'
localityName :PRINTABLE:'DE'
organizationName :PRINTABLE:'domain.tld'
organizationalUnitName:PRINTABLE:'Univention Corporate Server'
commonName :PRINTABLE:'ucs01.domain.tld'
emailAddress :IA5STRING:'ssl@domain.tld'
Certificate is to be certified until Feb 4 00:03:39 2020 GMT (730 days)
root@ucs01:/etc/univention/ssl# openssl x509 -text -noout -in ucs01.domain.tld/cert.pem | grep DNS
DNS:ucs01.domain.tld, DNS:ucs01
univention-certificate renew do not respect this file and the other (more global one) ssl conf file do not contain the SAN part Does someone now, where this programm gets the SANs from?
Ugh, thatâs an ugly situation. All UCS services and servers expect to use and see the host name as it is now. Meaning that if you re-issue the certificate for the host ucs01 with host name mdc01, youâll end up with not a lot working afterwards anymore because now all UCS services will fail to connect.
Yeah, thatâs exactly what you should do. That way both the old and the new name are part of the certificate. It should satisfy both UCS services and your other clients. The common name field isnât all that important nowadays.
I seem to remember that the renew process re-uses the existing CSR (certificate signing request), and that one only includes the subjectAltName properties from the configuration as they were when the CSR was generated. Therefore youâll have to re-generate the CSR (the req.pem file) from your config now. Maybe something like this:
Ah, ok, makes sense. But it seems that some env variables are missing:
root@ucs01:/etc/univention/ssl/ucs01# openssl req -batch -config openssl.cnf -new -key private.key -out req.pem
error on line 31 of openssl.cnf
139778132506256:error:0E065068:configuration file routines:STR_COPY:variable has no value:conf_def.c:584:line 31