Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:skoleni:ldap [2018/05/15 11:44]
admin [Pridavani zaznamu]
linux:skoleni:ldap [2018/11/01 18:23] (current)
admin
Line 167: Line 167:
 suffix "​dc=pb"​ suffix "​dc=pb"​
 rootdn "​cn=admin,​dc=pb"​ rootdn "​cn=admin,​dc=pb"​
-rootpw ​gaMMa2018+rootpw ​deLTa2019
 cachesize 10000 cachesize 10000
  
Line 181: Line 181:
  
 access to dn.base=""​ by * read access to dn.base=""​ by * read
 +
 +access to *
 +  by dn="​cn=admin,​dc=example,​dc=net"​ write
 +  by * read
  
 </​file>​ </​file>​
Line 449: Line 453:
 ) )
  
-olcRootDN: cn=admin,​cn=config +  ​olcRootDN: cn=admin,​cn=config 
-olcRootPW: superheslo+  olcRootPW: superheslo
  
 Je nutné restartovat ldap: Je nutné restartovat ldap:
Line 464: Line 468:
  
  
-<code>+<file ldif memberof_config.ldif>
 dn: cn=module,​cn=config dn: cn=module,​cn=config
 cn: module cn: module
Line 482: Line 486:
 olcMemberOfMemberAD:​ member olcMemberOfMemberAD:​ member
 olcMemberOfMemberOfAD:​ memberOf olcMemberOfMemberOfAD:​ memberOf
-</code>+</file>
  
 Proc nepouzivat "​muzevsude"​ a jine powergroupy?​ -> protoze tam z lenosti pak skonci vsichni. Proc nepouzivat "​muzevsude"​ a jine powergroupy?​ -> protoze tam z lenosti pak skonci vsichni.
Line 490: Line 494:
  
    ​ldapsearch -x -b '​ou=people,​dc=pb'​ '​(&​(objectClass=inetOrgPerson)(uid=cajkovsky)(memberOf=cn=projekt_b,​ou=groups,​dc=pb))'​    ​ldapsearch -x -b '​ou=people,​dc=pb'​ '​(&​(objectClass=inetOrgPerson)(uid=cajkovsky)(memberOf=cn=projekt_b,​ou=groups,​dc=pb))'​
 +   
 +   
    ​NAME=ldapsearch -x -h 127.0.0.1 "​(&​(objectClass=person)(|(telephoneNumber=${NUM})(mobile=${NUM})(homePhone=${NUM})(fax=${NUM})))"​ cn | sed -n '​s/​cn:​\s\(.*\)/​\1/​p    ​NAME=ldapsearch -x -h 127.0.0.1 "​(&​(objectClass=person)(|(telephoneNumber=${NUM})(mobile=${NUM})(homePhone=${NUM})(fax=${NUM})))"​ cn | sed -n '​s/​cn:​\s\(.*\)/​\1/​p
        
 +   ​ldapsearch -x -b "​dc=pb" ​ '​(objectClass=inetOrgPerson)'​ uid
 ====== Ukazka kodu v PHP ====== ====== Ukazka kodu v PHP ======
 Pozor na mala a velka pismena v poli memberOf -> memberof Pozor na mala a velka pismena v poli memberOf -> memberof
 
linux/skoleni/ldap.1526377442.txt.gz · Last modified: 2018/05/15 11:44 by admin