OpenLDAP User Tools.
- clone this repo and cd into LDAPUserTools.
git clone https://github.com/Jimmy01240397/LDAPUserTools
cd LDAPUserTools
- run install.sh
sh install.sh
- setup all schema
bash initldapschema.sh <your DC> <olcDatabase file>
- setup all ou
slapadd -b <dc> -l base.ldif
cp sshldappubkey.sh /usr/local/bin/sshldappubkey
chmod 700 /usr/local/bin/sshldappubkey
vi /etc/ssh/sshd_config
AuthorizedKeysCommand /usr/local/bin/sshldappubkey
AuthorizedKeysCommandUser root
use -h to see info
ldapuseradd -h
ldapgroupadd -h
ldapusermod -h
ldapgroupmod -h
ldapuserdel -h
ldapgroupdel -h
Add group and user
ldapgroupadd -D "cn=admin,dc=example,dc=com" -w "test1234" groupname
ldapuseradd -D "cn=admin,dc=example,dc=com" -w "test1234" -s /bin/bash username
or add a bindconf
vi <pathofbindconf>/<nameofbindconf>.yaml
url: ldap://127.0.0.1
binddn: cn=admin,dc=example,dc=com
bindpasswd: test1234
ldapgroupadd -f <pathofbindconf>/<nameofbindconf>.yaml groupname
ldapuseradd -f <pathofbindconf>/<nameofbindconf>.yaml -s /bin/bash username