Код: Выделить всё
$> pkg_add openldap-client
$> pkg_add openldap-server
$> nano -w /etc/rc.local
Код: Выделить всё
if [ "$slapd_flags" != "NO" -a -x /usr/local/libexec/slapd ]; then
install -d -o _openldap /var/run/openldap
/usr/local/libexec/slapd $slapd_flags
echo -n ' slapd'
fi
Код: Выделить всё
$> nano -w /etc/rc.local
Код: Выделить всё
slapd_flags="-u _openldap"
Настройка LDAP (/etc/openldap/slapd.conf)
Код: Выделить всё
$>nano -w /etc/openldap/slapd.conf
добавить (после 'include /etc/openldap/schema/core.schema'):
Код: Выделить всё
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/misc.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/openldap.schema
расскоментировать:
Код: Выделить всё
moduleload back_ldbm.la
добавить (после '# rootdn can always read and write EVERYTHING!'):
Код: Выделить всё
access to attrs=userPassword
by self write
by anonymous auth
by * none
access to *
by self write
by anonymous read
by * none
изменить:
Код: Выделить всё
suffix "dc=domain,dc=tld"
rootdn "cn=root,dc=domain,dc=tld"
изменить:
Код: Выделить всё
rootpw {SSHA}*
Код: Выделить всё
$>slappasswd
New password: я ввел test
Re-enter new password: я ввел test
{SSHA}vMjmuB1cSzQUmJ1qItyAyQRUx07nEz08 (так выглядит пароль 'test')
добавить(после 'index objectClass eq'):
Код: Выделить всё
index cn eq
Остальное смотреть в статье товарища fr33man : http://www.lissyara.su/?id=1277
Ошибки в статье:
Код: Выделить всё
spider# ldapadd -x -D "cn=root,dc=unix" -W -f base.ldif
Enter LDAP Password:
adding new entry "dc=l1523,dc=ru"
spider#