Solved security/heimdal: hdb_open: failed initialize database /var/heimdal/heimdal

rigoletto@

Developer
Hello,

I am trying to run security/heimdal (Master/Slave) in jail but it fail to initialize the database with error:

Code:
kadmin: hdb_open: hdb_open: failed initialize database /var/heimdal/heimdal

Thought, the database is there but it have .db at the end: /var/heimdal/heimdal.db


I found a old PR 154711 about the exactly same problem. Is it prossible to be the same thing? Or there is something wrong with my configuration?

cat /usr/local/etc/krb5.conf
Code:
[libdefaults]
       default_realm = MYDOMAIN.CH
[realms]
        MYDOMAIN.CH = {
               kdc = krb1.mydomain.ch
               kdc = krb2.mydomain.ch
               admin_server = krb1.mydomain.ch
   }
[domain_realm]
       .mydomain.ch = MYDOMAIN.CH

cat /etc/rc.conf
Code:
(...)
hostname="krb1.mydomain.ch"
kdc_enable="YES"
kadmind_enable="YES"
kdc_program="/usr/local/libexec/kdc"
kadmind5_server="/usr/local/libexec/kadmind"
kpasswdd_server="/usr/local/libexec/kpasswdd"
(...)

Options:
Code:
_OPTIONS_READ=heimdal-1.5.3_5
_FILE_COMPLETE_OPTIONS_LIST=BDB CRACKLIB DIGEST IPV6 KX509 LDAP PKINIT SQLITE X11
OPTIONS_FILE_SET+=BDB
OPTIONS_FILE_UNSET+=CRACKLIB
OPTIONS_FILE_SET+=DIGEST
OPTIONS_FILE_UNSET+=IPV6
OPTIONS_FILE_SET+=KX509
OPTIONS_FILE_SET+=LDAP
OPTIONS_FILE_SET+=PKINIT
OPTIONS_FILE_UNSET+=SQLITE
OPTIONS_FILE_UNSET+=X11

Thank you!
 
Run heimdal with truss kdc 2>&1 | fgrep open to find out where it expects to find its database.

Return:
Code:
Ambiguous output redirect.

EDIT: Ok, I was trying it on csh, instead of sh. My fault.

Thank you!
 
# truss kadmin -l 2>&1 | fgrep open
Code:
openat(AT_FDCWD,"/etc/libmap.conf",O_CLOEXEC,00) = 3 (0x3) 
openat(AT_FDCWD,"/usr/local/lib/heimdal/libkadm5clnt.so.7",O_CLOEXEC|O_VERIFY,00) = 3 (0x3) 
openat(AT_FDCWD,"/usr/local/lib/heimdal/libkadm5srv.so.8",O_CLOEXEC|O_VERIFY,00) = 3 (0x3) 
openat(AT_FDCWD,"/usr/local/lib/heimdal/libhdb.so.9",O_CLOEXEC|O_VERIFY,00) = 3 (0x3) 
openat(AT_FDCWD,"/usr/local/lib/heimdal/libsl.so.0",O_CLOEXEC|O_VERIFY,00) = 3 (0x3) 
openat(AT_FDCWD,"/usr/local/lib/heimdal/libheimedit.so.0",O_CLOEXEC|O_VERIFY,00) = 3 (0x3) 
openat(AT_FDCWD,"/usr/local/lib/heimdal/libkrb5.so.26",O_CLOEXEC|O_VERIFY,00) = 3 (0x3) 
openat(AT_FDCWD,"/usr/local/lib/libldap-2.4.so.2",O_CLOEXEC|O_VERIFY,00) = 3 (0x3) 
openat(AT_FDCWD,"/usr/local/lib/liblber-2.4.so.2",O_CLOEXEC|O_VERIFY,00) = 3 (0x3) 
openat(AT_FDCWD,"/usr/local/lib/heimdal/libheimbase.so.1",O_CLOEXEC|O_VERIFY,00) = 3 (0x3) 
openat(AT_FDCWD,"/usr/local/lib/heimdal/libhx509.so.5",O_CLOEXEC|O_VERIFY,00) = 3 (0x3) 
openat(AT_FDCWD,"/usr/local/lib/heimdal/libasn1.so.8",O_CLOEXEC|O_VERIFY,00) = 3 (0x3) 
openat(AT_FDCWD,"/usr/local/lib/heimdal/libwind.so.0",O_CLOEXEC|O_VERIFY,00) = 3 (0x3) 
openat(AT_FDCWD,"/usr/local/lib/heimdal/libheimsqlite.so.0",O_CLOEXEC|O_VERIFY,00) = 3 (0x3) 
openat(AT_FDCWD,"/usr/local/lib/heimdal/libcom_err.so.1",O_CLOEXEC|O_VERIFY,00) = 3 (0x3) 
openat(AT_FDCWD,"/usr/local/lib/heimdal/libroken.so.18",O_CLOEXEC|O_VERIFY,00) = 3 (0x3) 
openat(AT_FDCWD,"/var/run/ld-elf.so.hints",O_CLOEXEC,00) = 3 (0x3) 
openat(AT_FDCWD,"/lib/libncurses.so.8",O_CLOEXEC|O_VERIFY,00) = 3 (0x3) 
openat(AT_FDCWD,"/usr/local/lib/libcrypto.so.38",O_CLOEXEC|O_VERIFY,00) = 3 (0x3) 
openat(AT_FDCWD,"/usr/local/lib/libintl.so.8",O_CLOEXEC|O_VERIFY,00) = 3 (0x3) 
openat(AT_FDCWD,"/lib/libcrypt.so.5",O_CLOEXEC|O_VERIFY,00) = 3 (0x3) 
openat(AT_FDCWD,"/lib/libthr.so.3",O_CLOEXEC|O_VERIFY,00) = 3 (0x3) 
openat(AT_FDCWD,"/lib/libc.so.7",O_CLOEXEC|O_VERIFY,00) = 3 (0x3) 
openat(AT_FDCWD,"/usr/local/lib/libsasl2.so.3",O_CLOEXEC|O_VERIFY,00) = 3 (0x3) 
openat(AT_FDCWD,"/usr/local/lib/libssl.so.39",O_CLOEXEC|O_VERIFY,00) = 3 (0x3) 
open("/usr/local/etc/krb5.conf",O_RDONLY,0666)   = 3 (0x3) 
open("/etc/krb5.conf",O_RDONLY,0666)             ERR#2 'No such file or directory' 
open("/usr/local/lib/heimdal/plugin/krb5",O_NONBLOCK|O_DIRECTORY|O_CLOEXEC,020040100200) ERR#2 'No such file or directory' 
open("/usr/local/lib/heimdal/plugin/krb5",O_NONBLOCK|O_DIRECTORY|O_CLOEXEC,011) ERR#2 'No such file or directory' 
open("/var/heimdal/kdc.conf",O_RDONLY,0666)      ERR#2 'No such file or directory' 
open("/usr/local/etc/krb5.conf",O_RDONLY,0666)   = 3 (0x3) 
open("/etc/krb5.conf",O_RDONLY,0666)             ERR#2 'No such file or directory' 
open("/var/heimdal/m-key",O_RDONLY,0666)         = 3 (0x3) 
openat(AT_FDCWD,"/var/heimdal/m-key",O_CLOEXEC,00) = 3 (0x3) 
open("/root/.termcap.db",O_CLOEXEC,00)           ERR#2 'No such file or directory' 
open("/root/.termcap",O_CLOEXEC,00)              ERR#2 'No such file or directory' 
open("/usr/share/misc/termcap.db",O_CLOEXEC,00)  = 4 (0x4) 
open("/root/.editrc",O_RDONLY,0666)              ERR#2 'No such file or directory' 
init MYDOMAIN.CH 
open("/var/heimdal/heimdal.db",O_RDWR|O_CREAT|O_CLOEXEC,0600) = 4 (0x4) 
openat(AT_FDCWD,"/var/heimdal/heimdal.lock",O_RDWR|O_CREAT,0600) = 5 (0x5) 
hdb_open: hdb_open: failed initialize database /var/heimdal/heimdalwrite(2,"hdb_open: hdb_open: failed initi"...,67) = 67 (0x43) 
quit
 
Back
Top