ldapauthenticator icon indicating copy to clipboard operation
ldapauthenticator copied to clipboard

specifiy admin user via ldap

Open seal61 opened this issue 5 years ago • 8 comments

Hey,

I have not found a way to grant administrator rights to a user who has logged in via LDAP. Is this possibility available, if so, where?

Currently I cannot use the local administrator account, because the login mask only refers to LDAP accounts. For this I would first have to deactivate the plugin again.

I would be glad about any information - thanks in advance!

seal61 avatar Feb 03 '20 15:02 seal61

Does setting admin_users work?

manics avatar Feb 04 '20 21:02 manics

No, it did not. I had to explicitly disable it because LDAP and Admin_users would not merge....

dmpe avatar Feb 05 '20 23:02 dmpe

I was looking for a way to set the admin group for LDAP/Active Directory authentication. Since switching to LDAP disabled my previous created admin user.

jeanparker avatar Mar 20 '20 10:03 jeanparker

This shouldn't be too hard to do based on LDAP group. But until then, just add the following line in your jupyterhub_config.py file.

c.Authenticator.admin_users = {'MY_LDAP_ADMIN_ACCOUNT'}

GlennHD avatar Apr 24 '20 07:04 GlennHD

c.LDAPAuthenticator.admin_users = {'username'}

great - this worked for me! can you also tell me on how to put multiple users there? Separating usernames via comma doesn't work:

c.LDAPAuthenticator.admin_users = {'username,anotheruser,anotheruser'}

This not a big issue, because I'm now able to access the admin GUI again and set more admins there if necessary. I just wonder where the permissions are set / saved - If I change something via GUI nothing seems to change in the jupyterhub_config.py

seal61 avatar Apr 24 '20 17:04 seal61

@seal61 so close!!! Try this.

c.Authenticator.admin_users = {'user1', 'user2', 'user3'}

GlennHD avatar Apr 24 '20 18:04 GlennHD

Previous comment worked for me... but...

How do we specify admin using an LDAP group?

...I suspect we need an equivalent to

c.PAMAuthenticator.admin_groups = {'wheel'}

Aethylred avatar Sep 16 '20 02:09 Aethylred

c.LDAPAuthenticator.admin_users = {'username'}

great - this worked for me! can you also tell me on how to put multiple users there? Separating usernames via comma doesn't work:

c.LDAPAuthenticator.admin_users = {'username,anotheruser,anotheruser'}

This not a big issue, because I'm now able to access the admin GUI again and set more admins there if necessary. I just wonder where the permissions are set / saved - If I change something via GUI nothing seems to change in the jupyterhub_config.py

How can I define admin users list in config.yaml (or helm values) file for helm deployment? I used following configuration and hub and all other pods are in running states but still can not see Admin pannel in Control pannel....

I am using latest version of jupyterhub... Is there any workaround for that? tnx in advance

javad87 avatar Dec 13 '21 13:12 javad87