Implementation of LDAP server for user authentication. This server is the in-memory LDAP server (IM-LDAP) and it is for non-production environments.
-
node
apt install nodejs node -v
-
npm
apt install npm npm -v
-
OpenLDAP
apt-get install slapd ldap-utils
- Clone the repo
git clone https://github.com/jenhao-thesis/LdapServer.git
- Install NPM packages
npm install
- Launch a node app
node ldapServer.js
The qwer.ldif
is a pre-define hierarchical directory structure file.
-
Initial a hierarchical directory structure for user data
ldapadd -H ldap://localhost:1389 -D "cn=root" -w secret -f qwer.ldif
-
(optional) Search specific user
ldapsearch -H ldap://localhost:1389 -x -D "cn=root" -w "secret" -b "ou=location2,dc=jenhao,dc=com"