Giter VIP home page Giter VIP logo

jupyterhub-ldapcreateusers's Introduction

ldapcreateusers

This module extends the Jupyterhub ldapauthenticator and allows authenticated users through LDAP to have accounts created for them on the system that Jupyterhub is running on.

It uses the LocalAuthenticator found in Jupyterhub, but authenticates users through LDAP.

The getting started guide has more details.

Configuration Settings

The settings are similar to those used in the ldapauthenticator:

# jupyterhub config file

c.JupyterHub.authenticator_class = 'ldapcreateusers.LocalLDAPCreateUsers'
c.LocalLDAPCreateUsers.server_address = 'some.ldap.server'
c.LocalLDAPCreateUsers.server_port = 389
c.LocalLDAPCreateUsers.use_ssl = False
c.LocalLDAPCreateUsers.bind_dn_template = 'uid={username},dc=yourdomain,dc=com'
c.LocalLDAPCreateUsers.create_system_users = True

Requirements

This module does nothing by itself. It simply extends the ldapauthenticator class and allows local user accounts on the system to be created.

This module has been tested with Python 3.4. It depends on jupyterhub and ldapauthenticator

Installation

You can install using pip $ pip install jupyterhub-ldapcreateusers

jupyterhub-ldapcreateusers's People

Contributors

benhosmer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

bharatlakhiyani

jupyterhub-ldapcreateusers's Issues

Cannot sync `add_user_cmd ` in the config file

env:

  • os: centos 7
  • python 3.7
  • jupyterhub==1.1.0

my config file:

...
c.PAMAuthenticator.open_sessions = False
c.LocalAuthenticator.create_system_users = True
c.PAMAuthenticator.add_user_cmd = ['adduser', '-m']

# ldap
c.JupyterHub.authenticator_class = 'ldapcreateusers.LocalLDAPCreateUsers'
c.LDAPAuthenticator.server_address = 'ldap://localhost'
c.LDAPAuthenticator.use_ssl = False
c.LDAPAuthenticator.bind_dn_template = [
    "cn={username},ou=People,dc=x,dc=com",
]
c.LDAPAuthenticator.allowed_groups = [
    "cn=jupyter,ou=Group,dc=x,dc=com",
]

debug auth.py:

    ...
    def add_system_user(self, user):
        """Create a new local UNIX user on the system.

        Tested to work on FreeBSD and Linux, at least.
        """
        #self.add_user_cmd = ['adduser', '-m']
        self.log.info(f"\n\ncmd : {self.add_user_cmd}\n")  # debug

        name = user.name
        cmd = [arg.replace('USERNAME', name) for arg in self.add_user_cmd]
        ...

debug message:

[I 2020-11-18 13:45:16.682 JupyterHub auth:776]
    cmd : ['adduser', '-q', '--gecos', '""', '--disabled-password']

It can be seen from here that add_user_cmd in config file is not initialized

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.