Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kerberos service started with Error: Cannot open DB2 database on Ubuntu 18

I installed kerberos on Ubuntu 18 with sudo apt install krb5-kdc krb5-admin-server

But, When I ran systemctl status krb5-kdc.service, it turns out:

Feb 17 21:25:23 device2 krb5kdc[8675]: Cannot open DB2 database '/var/lib/krb5kdc/principal': No such file or directory - while initializing database for realm DENNIS.COM
Feb 17 21:25:23 device2 krb5kdc[8675]: krb5kdc: cannot initialize realm DENNIS.COM - see log file for details
Feb 17 21:25:23 device2 systemd[1]: krb5-kdc.service: Control process exited, code=exited status=1
Feb 17 21:25:23 device2 systemd[1]: krb5-kdc.service: Failed with result 'exit-code'.
Feb 17 21:25:23 device2 systemd[1]: Failed to start Kerberos 5 Key Distribution Center.

I have set the realm with kdb5_util create -r DENNIS.COM -s

[realms]
    DENNIS.COM = { 
        kdc = device2
        admin_server = device2
    }   
like image 474
DennisLi Avatar asked Feb 18 '20 03:02

DennisLi


1 Answers

solved the problem with the following steps:

1. sudo kdb5_util create -r DENNIS.COM -s
2. set a password.
3. check if there is /var/lib/krb5kdc/principal existed.
4. Then sudo service krb5-kdc restart.
like image 106
DennisLi Avatar answered Oct 13 '22 10:10

DennisLi