Re: Issues getting Kerberos to work with realmd and Active Directory
William MacAllister <[email protected]>
| Newsgroups | gmane.comp.encryption.kerberos.general |
|---|---|
| Message-ID | <CAH2H+SWg8yNrrw53rFqgRQfB7tTgxeCt6-2iddHR+=_424_gPQ@mail.gmail.com> |
On Thu, Jul 30, 2020 at 10:07 AM Wesley Taylor <[email protected]> wrote: > Hi All, > > I am trying to get HTCondor with Kerberos authentication ( > https://htcondor.readthedocs.io/en/stable/admin-manual/security.html?highlight=Kerberos#kerberos-authentication) > to work on some linux machines I have which I joined to Windows Active > Directory with realmd. Working with AD as a KDC can be challenging. Problems that I frequently have to deal are caused by the fact that AD does not use the principal name to identify the LDAP entries that define the principal. We use Russ Allbery's wallet to create keytabs which uses msktutil and LDAP to interact with AD. Wallet creates a unique 20 character string that is used as the CN for the distinguished name for the entry holding the principal name entry. The actual principal name is stored in the LDAP attributes userPrincipalName and servicePrincipalName. When I encounter problems with the CN-to-principal name mapping I examine the KDC entry using ldapsearch. For example: $ ldapsearch -Q -LLL -h ad-server -b ou=keytabs,dc=domain,dc=com cn="*keddie*" userPrincipalName servicePrincipalName dNSHostName dn: CN=keddie.domain.co000,OU=keytabs,OU=DROPBOX,DC=dropbox,DC=internal dNSHostName: keddie.domain.com userPrincipalName: host/[email protected] servicePrincipalName: host/keddie.domain.com If you can access AD with ldapsearch you should be able to determine the correct principal name to use. A very common command phrasing we use in bash scripts on linux systems is: k5start -f /etc/krb5.keytab host/`hostname -f` -- <some command> A specific example is: k5start -f /etc/krb5.keytab host/`hostname -f` -- ldapwhoami -h openldap-server Bill -- Bill MacAllister Corp SRE, Dropbox ________________________________________________ Kerberos mailing list [email protected] https://mailman.mit.edu/mailman/listinfo/kerberos