ldapsearch or ldapwhoami results in
# ldapwhoami
SASL/GSSAPI authentication started
ldap_sasl_interactive_bind: Other (e.g., implementation specific) error (80)
additional info: SASL(-1): generic failure: GSSAPI Error: No credentials were supplied, or the credentials were unavailable or inaccessible. (unknown mech-code 0 for mech unknown)
Setup:
OpenLdap with SASL GSSAPI
Kerberos KDC server (with the openLdap as the DB backend)
I have a ticket cache created for
user1to use for GSSAPI authentication.I have my krb5.keytab configured and set for the openLdap to use to authenticate with the KDC, as
ldap/[email protected]
ticket cache:
# klist
Ticket cache: FILE:/tmp/krb5cc_0
Default principal: [email protected]
Valid starting Expires Service principal
03/24/24 03:38:17 03/24/24 15:38:17 krbtgt/[email protected]
renew until 03/31/24 03:38:12
03/24/24 03:39:05 03/24/24 15:38:17 ldap/[email protected]
renew until 03/31/24 03:38:12
keytab:
klist -k /etc/krb5.keytab
Keytab name: FILE:/etc/krb5.keytab
KVNO Principal
---- --------------------------------------------------------------------------
2 ldap/[email protected]
2 ldap/[email protected]
What am I missing?
In my case the issue ended up being the file permissions on the
krb5.keytabfor openLdap to use.My
slapdwas running using theldapuser. But theldapuser did not have read access to thekrb5.keytabfile, only therootuser did.Before:
After:
After updating the file permission to give the
ldapuser read access, everything worked as expected! (777 probably wasn't necessary, I believe only read permission was needed.)Successful GSSAPI authentication after: