Skip to content

Instantly share code, notes, and snippets.

@Jarrioja
Created August 9, 2018 15:48
Show Gist options
  • Select an option

  • Save Jarrioja/946cd833494f84a03fbd1b02704158b5 to your computer and use it in GitHub Desktop.

Select an option

Save Jarrioja/946cd833494f84a03fbd1b02704158b5 to your computer and use it in GitHub Desktop.
FOR Jupyterhub-LAB
#------------------------------------------------------------------------------
# Configuration file for jupyterhub.
#------------------------------------------------------------------------------
# set of users who can administer the Hub itself
c.Authenticator.admin_users = {'adminhub'}
## The public facing port of the proxy.
c.JupyterHub.port = 80
# Supports Linux and BSD variants only.
c.LocalAuthenticator.create_system_users = True
## The command to use for creating users as a list of strings
c.Authenticator.add_user_cmd = ['adduser', '--force-badname', '-q', '--gecos', '""', '--disabled-password']
#Use Google Authenticator
# from oauthenticator.google import GoogleOAuthenticator
# c.JupyterHub.authenticator_class = GoogleOAuthenticator
# c.GoogleOAuthenticator.oauth_callback_url = 'http://example.com/hub/oauth_callback'
# c.GoogleOAuthenticator.client_id = '635823090211-nhef5sl5sqdbq469k4t0l5d14ur7jc8j.apps.googleusercontent.com'
# c.GoogleOAuthenticator.client_secret = 'HA0PdjijSSVog4FUd6nbG9bT'
#Start Jupyterhub as JupyterLAB
c.Spawner.default_url = '/lab'
@mannevijayakrishna
Copy link

can you please help with the AD config I am having an issue.

`
#------------------------------------------------------------------------------

Active Directory Integration

#------------------------------------------------------------------------------

c.JupyterHub.authenticator_class = 'ldapauthenticator.LDAPAuthenticator'

c.LDAPAuthenticator.server_address = 'IP_ADDRESS'
c.LDAPAuthenticator.server_port = 389

c.MyAuthenticator.bind_dn_template = 'sAMAccountName={vijay},ou=example User,dc=example,dc=local'
c.LDAPAuthenticator.lookup_dn = True
c.LDAPAuthenticator.lookup_dn_search_filter = '({login_attr}={login})'
c.LDAPAuthenticator.user_attribute = 'sAMAccountName'

c.LDAPAuthenticator.lookup_dn_search_user = 'LDAP@example.local'
c.LDAPAuthenticator.lookup_dn_search_password = '******************'

c.LDAPAuthenticator.use_ssl = False
c.LDAPAuthenticator.user_search_base = "dc=example,dc=local"
c.LDAPAuthenticator.lookup_dn_user_dn_attribute = 'sAMAccountName'
c.LDAPAuthenticator.escape_userdn = False
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment