- [Show page]
- [Old revisions]
- [[unknown link type]]
- []
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux:skoleni:ldap [2018/05/15 11:12] admin [Co je LDAP] |
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 321: | Line 325: | ||
ldapadd -x -D "cn=admin,dc=pb" -w heslo -f pb_add1.ldif | ldapadd -x -D "cn=admin,dc=pb" -w heslo -f pb_add1.ldif | ||
</code> | </code> | ||
+ | |||
+ | Ted sami pridejte | ||
+ | * sebe jako person | ||
+ | * dve skupiny | ||
<file ldif pb_add2.ldif> | <file ldif pb_add2.ldif> | ||
Line 445: | 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 460: | Line 468: | ||
- | <code> | + | <file ldif memberof_config.ldif> |
dn: cn=module,cn=config | dn: cn=module,cn=config | ||
cn: module | cn: module | ||
Line 478: | 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 486: | 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.1526375567.txt.gz · Last modified: 2018/05/15 11:12 by admin