I've installed and configured LDAP, installed and configured kerberos to use LDAP as the backend, as follows:
[dbdefaults]
ldap_kerberos_container_dn = dc=voltage,dc=com
[dbmodules]
openldap_ldapconf = {
db_library = kldap
ldap_kdc_dn = "cn=admin,dc=voltage,dc=com"
# this object needs to have read rights on
# the realm container, principal container and realm sub-trees
ldap_kadmind_dn = "cn=admin,dc=voltage,dc=com"
# this object needs to have read and write rights on
# the realm container, principal container and realm sub-trees
ldap_service_password_file = /etc/krb5kdc/service.keyfile
ldap_servers = ldap://ldap.voltage.com
ldap_conns_per_server = 5
}
However when I go into kadmin.local and try:
addprinc -x dn="uid=sam,ou=ssn,dc=voltage,dc=com" sam
I get
add_principal: Unsupported argument "dn=uid=sam,ou=ssn,dc=voltage,dc=com" for db2 while creating "sam@VOLTAGE.COM".
which means kadmin is trying to add the principal to db2 and not the LDAP backend, right?
I've also done:
sudo kdb5_ldap_util -D cn=admin,dc=example,dc=com create -subtrees \
dc=example,dc=com -r EXAMPLE.COM -s -H ldap://ldap01.example.com
sudo kdb5_ldap_util -D cn=admin,dc=example,dc=com stashsrvpw -f \
/etc/krb5kdc/service.keyfile cn=admin,dc=example,dc=com
after renaming example to voltage of course and both commands ran successfully and showed that the new REALM was created
Any help is appreciated