User Tools

Site Tools


docs:tips_n_tricks:ldap.html

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
docs:tips_n_tricks:ldap.html [17.09.2023 21:14 CEST] – [Read cn=config] peterdocs:tips_n_tricks:ldap.html [27.02.2024 17:30 CET] – [Write olcAccess.ldif in "human readable" format from actual config] peter
Line 17: Line 17:
   | less -S   | less -S
  
 +===== Get DIT =====
 +
 +  ldapsearch -Y EXTERNAL -H ldapi:/// (objectclass=*) dn \
 +  | sed -ne 's/^dn: [a-zA-Z0-9_]\+=[^,]\+,\(.*\)$/\1/gp'\
 +  | sort -u
 ===== Use OpenLDAP and phpldapadmin on Ubuntu 14.04 ===== ===== Use OpenLDAP and phpldapadmin on Ubuntu 14.04 =====
 ==== Server ==== ==== Server ====
Line 139: Line 144:
 </code> </code>
  
-:!: I assume this depends on where your LDAP tree data is stored - this example assumes it to be in //olcDatabase={1}hdb,cn=config//. You check it with+:!: I assume this depends on where your LDAP tree data is stored - this example assumes it to be in //olcDatabase={1}hdb,cn=config//. You can list all database objects with their respective suffix by calling
  
-  ldapsearch -Y EXTERNAL -H ldapi:/// -b "cn=config" '(olcSuffix=*)' dn+  ldapsearch -Y EXTERNAL -H ldapi:/// -b "cn=config" '(olcSuffix=*)' dn olcSuffix
  
 as //root//. as //root//.
Line 148: Line 153:
  
   * https://technicalnotes.wordpress.com/2014/04/19/openldap-setup-with-memberof-overlay/   * https://technicalnotes.wordpress.com/2014/04/19/openldap-setup-with-memberof-overlay/
 +=== Write olcAccess.ldif in "human readable" format from actual config  ===
 +
 +  ldapsearch -Y EXTERNAL -H ldapi:/// -b cn=config -o ldif-wrap=no -L '(objectclass=*)' \
 +  | sed -n -e '/^dn: /{s/^\(.*\)$/\n\1\nchangetype: modify\nreplace: olcAccess/;h};/^olcAccess/{s/ by /\n  by /gi;H;x;p}'
 +  
 +[[docs:tips_n_tricks:ldap.html?rev=1709050872#read_olcaccess_anc_convert_it_into_human_readable_format|Read olcAccess anc convert it into "human readable" format]]
 ==== Client ==== ==== Client ====
 === Configure nsswitch === === Configure nsswitch ===
docs/tips_n_tricks/ldap.html.txt · Last modified: 27.02.2024 23:32 CET by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki