If for some reason your ds.keytab has been corrupted, for example through time drift in the hardware clocks of your multi-master infrastructure, you'll find yourself with a non-working or very slow krb5kdc. However, this can be fixed fairly fast but you'll have to check your replicas for errors and maybe even replicate the whole infrastructure from a known good replica.
Let's get to fixing the corrupted ds.keytab first. All these steps will be done with your authentication services offline, so it's probably the safest to do all of the steps as root. Start by stopping the ipa services on the host:
[archy@ipa02 ~]$ sudo su -
[root@ipa02 ~]# ipactl stop
Next up move the not-working keytab:
[root@ipa02 ~]# mv /etc/dirsrv/ds.keytab /etc/dirsrv/ds.keytab-$(date +%Y-%m-%d)
In order to fix the keytab, a few services are required to run:
[root@ipa02 ~]# start-dirsrv
[root@ipa02 ~]# systemctl start krb5kdc.service
Next login to the krb5kdc and export the dirsrv principal
[root@ipa02 ~]# kadmin.local
kadmin.local: ktadd -k /etc/dirsrv/ds.keytab ldap/ipa02.archyslife.lan@ARCHYSLIFE.LAN
kadmin.local: quit
Now, change the permissions to pass the permission checks:
[root@ipa02 ~]# chmod 600 /etc/dirsrv/ds.keytab
[root@ipa02 ~]# chown dirsrv.dirsrv
Verify the kvno version numbers from atleast 2 hosts. These must be the same on all hosts for the principal:
[root@ipa02 ~]# kinit admin
Password for admin@ARCHYSLIFE.LAN:
[root@ipa02 ~]# kvno ldap/ipa02.archyslife.lan@ARCHYSLIFE.LAN
ldap/ipa02.archyslife.lan@ARCHYSLIFE.LAN: kvno = 8
---------- check from another host ----------
[root@ipa01 ~]# kinit admin
Password for admin@ARCHYSLIFE.LAN:
[root@ipa01 ~]# kvno ldap/ipa02.archyslife.lan@ARCHYSLIFE.LAN
ldap/ipa02.archyslife.lan@ARCHYSLIFE.LAN: kvno = 8
With everything looking good so far, verify that the ipa services start and stop as expected (optional, recommended):
[root@ipa02 ~]# ipactl start
[root@ipa02 ~]# ipactl stop
If everything works and no errors are thrown, start the services for good.
[root@ipa02 ~]# ipactl start
I've noticed this error appearing after patching the Hosts and having a time drift of the hardware clocks on the physical hosts even though they were synced with ntp and peering.
Feel free to comment and / or suggest a topic.
Comments
Post a Comment