Commit bfd05640 authored by pedrolab's avatar pedrolab

ldap: add debug, change tocs and small changes

parent f7042d9e
...@@ -25,9 +25,12 @@ https://oav.net/mirrors/LDAP-ObjectClasses.html \ ...@@ -25,9 +25,12 @@ https://oav.net/mirrors/LDAP-ObjectClasses.html \
- [Force TLS](#force-tls) - [Force TLS](#force-tls)
- [nobody user for ldap bind](#nobody-user-for-ldap-bind) - [nobody user for ldap bind](#nobody-user-for-ldap-bind)
- [Usage](#usage) - [Usage](#usage)
- [Debug](#debug)
- [Show config](#show-config) - [Show config](#show-config)
- [Change ldap admin config password](#change-ldap-admin-config-password) - [Change ldap admin config password](#change-ldap-admin-config-password)
- [Delete members from a group using ldif](#delete-members-from-a-group-using-ldif) - [Create a group using ldif](#create-a-group-using-ldif)
- [Add a member from a group using ldif](#add-a-member-from-a-group-using-ldif)
- [Delete a member from a group using ldif](#delete-a-member-from-a-group-using-ldif)
- [Apache Directory](#apache-directory) - [Apache Directory](#apache-directory)
- [Useful connections to create with apache directory](#useful-connections-to-create-with-apache-directory) - [Useful connections to create with apache directory](#useful-connections-to-create-with-apache-directory)
...@@ -456,6 +459,18 @@ And import the configuration ...@@ -456,6 +459,18 @@ And import the configuration
# Usage # Usage
## Debug
stop ldap server service:
service slapd stop
run it as a command:
slapd -u openldap -d 256
[see here debug levels available](https://www.openldap.org/doc/admin24/runningslapd.html)
## Show config ## Show config
ldapsearch -LLL -Y EXTERNAL -H ldapi:/// -b olcDatabase={1}mdb,cn=config ldapsearch -LLL -Y EXTERNAL -H ldapi:/// -b olcDatabase={1}mdb,cn=config
...@@ -478,7 +493,6 @@ Then import the file ...@@ -478,7 +493,6 @@ Then import the file
ldapmodify -Y EXTERNAL -H ldapi:/// -f chg_admin_pass ldapmodify -Y EXTERNAL -H ldapi:/// -f chg_admin_pass
## Create a group using ldif ## Create a group using ldif
Edit `/tmp/add_group.ldif` Edit `/tmp/add_group.ldif`
...@@ -495,7 +509,6 @@ Import configuration ...@@ -495,7 +509,6 @@ Import configuration
ldapmodify -x -W -D "uid=my-user,dc=example,dc=com" -f /tmp/add_group.ldif ldapmodify -x -W -D "uid=my-user,dc=example,dc=com" -f /tmp/add_group.ldif
## Add a member from a group using ldif ## Add a member from a group using ldif
Edit `/tmp/add_member.ldif` Edit `/tmp/add_member.ldif`
...@@ -511,7 +524,6 @@ Import configuration ...@@ -511,7 +524,6 @@ Import configuration
ldapmodify -x -W -D "uid=my-user,dc=example,dc=com" -f /tmp/add_member.ldif ldapmodify -x -W -D "uid=my-user,dc=example,dc=com" -f /tmp/add_member.ldif
## Delete a member from a group using ldif ## Delete a member from a group using ldif
Edit `/tmp/delete_member.ldif` Edit `/tmp/delete_member.ldif`
...@@ -525,10 +537,7 @@ member: uid=a_user,ou=users,dc=example,dc=com ...@@ -525,10 +537,7 @@ member: uid=a_user,ou=users,dc=example,dc=com
Import configuration Import configuration
ldapmodify -x -W -D "uid=my-user,dc=commonscloud,dc=coop" -f /tmp/delete_member.ldif ldapmodify -x -W -D "uid=my-user,dc=example,dc=com" -f /tmp/delete_member.ldif
# Apache Directory # Apache Directory
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment