Open Sarrouna opened 2 years ago
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:
I have a docker compose that contain 3 services: jupyterhub, jupyterlab and traefic. When I connect on jupyterlab console I have the user by default jovyan, I would like to change it by the userid. I tried many solutions (configurations I mean), I searched a forums, I tried to do the same according my use, but still I have jovyan user in jupyterlab console.
I did an ldapsearch request to display all groups LDAP of users, it works well:
ldapsearch -x -D "cn=proxyagent" -H ldaps://annuaire_ldap -b 'ou=1111,o=2222' '(&(cn=333*)(memberuid=my_login))' -w password
I tried to add these configuratins in jupyterhub_config.py, but still in vein. I tried also to add the real parameters in c.Spawner.environment, when I add the real values I got my login as user connected in jupyterlab instead of jovyan, but I don’t know hpw can I generalize it the command line bellow.
c.Spawner.environment = {'GRANT_SUDO': 'yes', "NB_USER": "{login}", "NB_UID" :"88888","NB_GID" : 9999}
My configurations in jupyterhub_config.py is the following: c.JupyterHub.authenticator_class = 'ldapauthenticator.LDAPAuthenticator' c.LDAPAuthenticator.server_address = 'ldaps://server:port' c.LDAPAuthenticator.server_port = port_number c.LDAPAuthenticator.lookup_dn = True c.LDAPAuthenticator.lookup_dn_search_filter = '({login_attr}={login})' c.LDAPAuthenticator.lookup_dn_search_user = 'cn=proxyagent' c.LDAPAuthenticator.lookup_dn_search_password = 'password' c.LDAPAuthenticator.bind_user_dn = "uid={username},ou=Nominatifs,ou=company,ou=People,o=company" c.LDAPAuthenticator.user_search_base = "ou=Nominatifs,ou=company,ou=People,o=company" c.LDAPAuthenticator.user_attribute = 'uid' c.LDAPAuthenticator.lookup_dn_user_dn_attribute = 'cn' c.LDAPAuthenticator.escape_userdn = False c.LDAPAuthenticator.search_filter = '(&(cn=gdx*)(memberuid={username})) ==> doesn't work fro me also' c.LDAPAuthenticator.auth_state_attributes = ['uid', 'uidNumber', 'memberuid'] c.LDAPAuthenticator.create_user_home_dir = True c.LDAPAuthenticator.create_user_home_dir_cmd = ['mkhomedir_helper'] c.LDAPAuthenticator.use_lookup_dn_username=False
I got these errors:
Config option
bind_user_dnnot recognized by
LDAPAuthenticator. Did you mean
admin_users? Config option
create_user_home_dirnot recognized by
LDAPAuthenticator. Config option
create_user_home_dir_cmdnot recognized by
LDAPAuthenticator``Really I need your help and expertise. How can I modify the configuration to return the userid in jupyterlab console instead of jovyan ? Links that I tried there solutions: https://github.com/hansohn/jupyterhub-ldap-authenticator https://pypi.org/project/jupyterhub-ldap-authenticator/
Thanks in advance