- pre-dependencies
- install nebulaLogin
- test
This is developed with python2 so please use pip2 if you also have python3
$ wget https://bootstrap.pypa.io/get-pip.py
$ python get-pip.py
for ubuntu & debian
$ sudo apt install gcc
for CentOS
$ sudo yum install gcc
This package access ldap server by python-ldap and python-ldap will be automatically installed.But before that,some dev package are needed
for Ubuntu & Debian
$ sudo apt install libsasl2-dev python-dev libldap2-dev libssl-dev
for CentOS:
$ sudo yum install python-devel openldap-devel
$ sudo pip install nebulaLogin
$ python
>>> from login import login
>>> login.LDAPlogin('test','test')
ldap_search_dn(self, value=None, value_type='uid')
ldap_add_user(self, cn, mail, username, password)
check_user_belong_to_group(self, uid, group_cn='kevindwliu')
ldap_get_user(self, uid=None)
LDAPlogin(userName,password)