ldapauthenticator
ldapauthenticator copied to clipboard
Is there a way to change which attribute jupyterhub user name is selected from?
Hi,
This question may seem a little vague so here is a little explanation:
My config goes as:
c.LDAPAuthenticator.bind_dn_template = "cn={username},ou=people,dc=company,dc=com"
c.LDAPAuthenticator.lookup_dn = True
c.LDAPAuthenticator.server_address = host
c.JupyterHub.authenticator_class = 'ldapauthenticator.LDAPAuthenticator'
c.LDAPAuthenticator.user_attribute = 'uid'
c.LDAPAuthenticator.lookup_dn_search_user = 'cn=admin,dc=company,dc=com'
c.LDAPAuthenticator.user_search_base = 'ou=people,dc=company,dc=com'
c.LDAPAuthenticator.lookup_dn_search_filter = '({login_attr}={login})'
This binds and gets the user correctly but my LDAP objects have dn's as such :
cn=FirstName LastName, ou=people,dc=company,dc=com
As you can see cn attribute has space or spaces inside it and when i want to auto create these users, i get errors because spaces and also some cn's might have special Turkish letters inside them such as "ö,çi,ş" :( I want the 'uid' attribute of the LDAP object to be my Jupyterhub username. Is there a way to do this or am i doing something wrong?
Hello,
Try this: c.LDAPAuthenticator.use_lookup_dn_username = False