This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
хранение_адресной_книги_в_ldap [2011/11/30 10:52] 127.0.0.1 внешнее изменение |
хранение_адресной_книги_в_ldap [2017/02/02 12:59] (current) val [Хранение адресной книги в LDAP] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Хранение адресной книги в LDAP ====== | ====== Хранение адресной книги в LDAP ====== | ||
| + | |||
| + | **!!!! Устарело !!!!** | ||
| Объект inetOrgPerson и его атрибут mail не удается использовать из-за конфликта между классами предками (invalid structural object class chain (account/person)) | Объект inetOrgPerson и его атрибут mail не удается использовать из-за конфликта между классами предками (invalid structural object class chain (account/person)) | ||
| Line 155: | Line 157: | ||
| <code> | <code> | ||
| [server:~] # cat /usr/local/etc/openldap/slapd.conf | [server:~] # cat /usr/local/etc/openldap/slapd.conf | ||
| + | </code><code> | ||
| ... | ... | ||
| include /usr/local/etc/openldap/schema/core.schema | include /usr/local/etc/openldap/schema/core.schema | ||
| Line 162: | Line 165: | ||
| include /root/mozillaorgperson.schema | include /root/mozillaorgperson.schema | ||
| ... | ... | ||
| + | </code><code> | ||
| + | [server:~] # /usr/local/etc/rc.d/slapd restart | ||
| </code> | </code> | ||
| Line 175: | Line 180: | ||
| </code><code> | </code><code> | ||
| root@server:~# slapcat -f mozillaorgperson.conf -F /tmp/ -n0 -s "cn={4}mozillaorgperson,cn=schema,cn=config" > /tmp/cn=mozillaorgperson.ldif | root@server:~# slapcat -f mozillaorgperson.conf -F /tmp/ -n0 -s "cn={4}mozillaorgperson,cn=schema,cn=config" > /tmp/cn=mozillaorgperson.ldif | ||
| + | |||
| + | root@server:~# vim /tmp/cn=mozillaorgperson.ldif | ||
| !!! remove 5-7 last lines !!! | !!! remove 5-7 last lines !!! | ||
| + | root@server:~# ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/inetorgperson.ldif # No need in ubuntu 12.04 | ||
| - | root@server:~# ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/inetorgperson.ldif | ||
| root@server:~# ldapadd -Y EXTERNAL -H ldapi:/// -f /tmp/cn=mozillaorgperson.ldif | root@server:~# ldapadd -Y EXTERNAL -H ldapi:/// -f /tmp/cn=mozillaorgperson.ldif | ||
| </code> | </code> | ||
| Line 207: | Line 214: | ||
| </code><code> | </code><code> | ||
| server# ldapmodify -x -D "cn=admin,dc=corpX,dc=un" -w secret -f addmail.ldif | server# ldapmodify -x -D "cn=admin,dc=corpX,dc=un" -w secret -f addmail.ldif | ||
| + | |||
| + | server# ldapsearch -x -b"dc=corpX,dc=un" -h server "uid=user1" | ||
| </code> | </code> | ||