docs:tips_n_tricks:ldap.html
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
docs:tips_n_tricks:ldap.html [17.09.2023 12:59 CEST] – [Read cn=config] sed -> -o ldif-wrap=no peter | docs:tips_n_tricks:ldap.html [27.02.2024 23:32 CET] (current) – [Write olcAccess.ldif in "human readable" format from actual config] peter | ||
---|---|---|---|
Line 14: | Line 14: | ||
ldapsearch -Y EXTERNAL -H ldapi:/// -b cn=config -o ldif-wrap=no ' | ldapsearch -Y EXTERNAL -H ldapi:/// -b cn=config -o ldif-wrap=no ' | ||
- | | sed -e '/ | + | | sed -e '/ |
| less -S | | less -S | ||
+ | ===== Get DIT ===== | ||
+ | |||
+ | ldapsearch -Y EXTERNAL -H ldapi:/// (objectclass=*) dn \ | ||
+ | | sed -ne ' | ||
+ | | sort -u | ||
===== Use OpenLDAP and phpldapadmin on Ubuntu 14.04 ===== | ===== Use OpenLDAP and phpldapadmin on Ubuntu 14.04 ===== | ||
==== Server ==== | ==== Server ==== | ||
Line 139: | Line 144: | ||
</ | </ | ||
- | :!: I assume this depends on where your LDAP tree data is stored - this example assumes it to be in // | + | :!: I assume this depends on where your LDAP tree data is stored - this example assumes it to be in // |
- | ldapsearch -Y EXTERNAL -H ldapi:/// -b " | + | ldapsearch -Y EXTERNAL -H ldapi:/// -b " |
as //root//. | as //root//. | ||
Line 148: | Line 153: | ||
* https:// | * https:// | ||
+ | === Write olcAccess.ldif in "human readable" | ||
+ | |||
+ | ldapsearch -Y EXTERNAL -H ldapi:/// -b cn=config -o ldif-wrap=no -L ' | ||
+ | | sed -e '/^dn: / | ||
+ | |||
+ | or | ||
+ | |||
+ | ldapsearch -Y EXTERNAL -H ldapi:/// -b cn=config -o ldif-wrap=no -L ' | ||
+ | |||
+ | <file sed olcAccess.sed> | ||
+ | #!/bin/sed -f | ||
+ | /^dn: /{ | ||
+ | s/ | ||
+ | h | ||
+ | d | ||
+ | } | ||
+ | / | ||
+ | s/ by /\n by /gi | ||
+ | H | ||
+ | s/^.*$// | ||
+ | x | ||
+ | s/ | ||
+ | p | ||
+ | d | ||
+ | } | ||
+ | d | ||
+ | </ | ||
+ | |||
+ | [[docs: | ||
==== Client ==== | ==== Client ==== | ||
=== Configure nsswitch === | === Configure nsswitch === |
docs/tips_n_tricks/ldap.html.txt · Last modified: 27.02.2024 23:32 CET by peter