Вот линк http://www.lissyara.su/?id=1938
Пинаем, находим недочеты, ну и пожелания

Модератор: xM
А вобще советую почитать у меня OpenLDAP, addressbook, web интерфейс и все все все. там все конкретно последовательно и проверено мной неоднократноСейчас нам необходимо создать корень:
# cat ampul.local.ldif
dn: dc=ampul,dc=local
objectClass: top
objectClass: dcObject
objectClass: organization
dc: ampul
o: FSI Ust-Luga Branch
dn: ou=addressbook,dc=ampul,dc=local
objectClass: top
objectClass: organizationalUnit
ou: addressbook
Добавим нашу схему в OpenLDAP.
# ldapadd -x -h localhost -f ampul.local.ldif -D "cn=root,dc=ampul,dc=local" -W
Enter LDAP Password: ****
adding new entry "dc=ampul,dc=local"
adding new entry "ou=addressbook,dc=ampul,dc=local"
Код: Выделить всё
cat 111
dn: dc=home,dc=local
objectClass: top
objectClass: dcObject
objectClass: organization
dc: home
o: FSI Ust-Luga Branch
dn: ou=book,dc=home,dc=local
objectClass: top
objectClass: organizationalUnit
ou: addressbook
Код: Выделить всё
ldapadd -x -h localhost -f 111 -D "cn=root,dc=home,dc=local" -W
Enter LDAP Password:
adding new entry "dc=home,dc=local"
adding new entry "ou=book,dc=home,dc=local"
Код: Выделить всё
cat slapd.conf
allow bind_v2
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include /usr/local/etc/openldap/schema/core.schema
include /usr/local/etc/openldap/schema/cosine.schema
include /usr/local/etc/openldap/schema/inetorgperson.schema
include /usr/local/etc/openldap/schema/misc.schema
include /usr/local/etc/openldap/schema/nis.schema
include /usr/local/etc/openldap/schema/openldap.schema
# Define global ACLs to disable default read access.
# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral ldap://root.openldap.org
pidfile /var/run/openldap/slapd.pid
argsfile /var/run/openldap/slapd.args
# Load dynamic backend modules:
modulepath /usr/local/libexec/openldap
moduleload back_bdb
# moduleload back_hdb
# moduleload back_ldap
# Sample security restrictions
# Require integrity protection (prevent hijacking)
# Require 112-bit (3DES or better) encryption for updates
# Require 63-bit encryption for simple bind
# security ssf=1 update_ssf=112 simple_bind=64
# Sample access control policy:
# Root DSE: allow anyone to read it
# Subschema (sub)entry DSE: allow anyone to read it
# Other DSEs:
# Allow self write access
# Allow authenticated users read access
# Allow anonymous users to authenticate
# Directives needed to implement policy:
# access to dn.base="" by * read
# access to dn.base="cn=Subschema" by * read
# access to *
# by self write
# by users read
# by anonymous auth
#
# if no access controls are present, the default policy
# allows anyone and everyone to read anything but restricts
# updates to rootdn. (e.g., "access to * by * read")
#
# rootdn can always read and write EVERYTHING!
#######################################################################
# BDB database definitions
#######################################################################
database bdb
suffix "dc=home,dc=local"
rootdn "cn=root,dc=home,dc=local"
# Cleartext passwords, especially for the rootdn, should
# be avoid. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw {SSHA}сикрет :)
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd and slap tools.
# Mode 700 recommended.
directory /var/db/openldap-data
# Indices to maintain
index objectClass eq
Код: Выделить всё
cp DB_CONFIG.example /var/db/openldap-data/DB_CONFIG
я себе вот такую наваял,правда под свою иерархию(себя оставил для примера):Скажите пожалуйста если возможность сделать адресную книгу так, чтобы она была иерархическая, а не плоская. Русскими словами. В начале например 3 подразделения администрация, бух, продавцы. Нажимаешь +(или что-то типо того)около администрации и выпадают все пользователи администрации, и что бы можно назад закрыть. А то обидно c ldap удобно, но отсутствие этой штуки все портит.
Код: Выделить всё
Не удалось добавить объект на LDAP-сервер.
Сообщение LDAP: No such object
Номер ошибки: 0x20 (LDAP_NO_SUCH_OBJECT)
Описание: That object does not exist.
Код: Выделить всё
ldap# pkg_info | grep openldap
openldap-client-2.4.16 Open source LDAP client implementation
openldap-server-2.4.16 Open source LDAP server implementation
Код: Выделить всё
ldap# pkg_info | grep openldap
openldap-client-2.3.43 Open source LDAP client implementation
openldap-server-2.3.43 Open source LDAP server implementation
Код: Выделить всё
cn=root,dn=mm,dn=ru
Код: Выделить всё
ldap# cat /usr/local/etc/openldap/slapd.conf | grep rootdn
# updates to rootdn. (e.g., "access to * by * read")
# rootdn can always read and write EVERYTHING!
rootdn "cn=root,dc=mm,dc=ru"
# Cleartext passwords, especially for the rootdn, should
Код: Выделить всё
Не удалось добавить объект на LDAP-сервер.
Сообщение LDAP: No such object
Номер ошибки: 0x20 (LDAP_NO_SUCH_OBJECT)
Описание: That object does not exist.
Код: Выделить всё
ldap# cat /usr/local/etc/openldap/slapd.conf
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include /usr/local/etc/openldap/schema/core.schema
include /usr/local/etc/openldap/schema/cosine.schema
include /usr/local/etc/openldap/schema/inetorgperson.schema
include /usr/local/etc/openldap/schema/misc.schema
include /usr/local/etc/openldap/schema/nis.schema
include /usr/local/etc/openldap/schema/openldap.schema
# Define global ACLs to disable default read access.
# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral ldap://root.openldap.org
pidfile /var/run/openldap/slapd.pid
argsfile /var/run/openldap/slapd.args
# Load dynamic backend modules:
modulepath /usr/local/libexec/openldap
#moduleload back_bdb
#moduleload back_hdb
#moduleload back_ldap
moduleload back_ldbm
# Sample security restrictions
# Require integrity protection (prevent hijacking)
# Require 112-bit (3DES or better) encryption for updates
# Require 63-bit encryption for simple bind
# security ssf=1 update_ssf=112 simple_bind=64
# Sample access control policy:
# Root DSE: allow anyone to read it
# Subschema (sub)entry DSE: allow anyone to read it
# Other DSEs:
# Allow self write access
# Allow authenticated users read access
# Allow anonymous users to authenticate
# Directives needed to implement policy:
# access to dn.base="" by * read
# access to dn.base="cn=Subschema" by * read
# access to *
# by self write
# by users read
# by anonymous auth
#
# if no access controls are present, the default policy
# allows anyone and everyone to read anything but restricts
# updates to rootdn. (e.g., "access to * by * read")
#
# rootdn can always read and write EVERYTHING!
access to dn.base="" by * read
access to dn.base="cn=Subschema" by * read
access to *
by self write
by users read
by anonymous auth
#######################################################################
# BDB database definitions
#######################################################################
database ldbm
suffix "dc=mm,dc=ru"
rootdn "cn=root,dc=mm,dc=ru"
# Cleartext passwords, especially for the rootdn, should
# be avoid. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw (password hash)
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd and slap tools.
# Mode 700 recommended.
directory /var/db/openldap-data
loglevel 256
# Indices to maintain
index objectClass eq
index cn eq
Код: Выделить всё
test# ldapadd -x -D "cn=root,dc=mail,dc=local" -h 192.168.3.1 -W -f base.ldif
Enter LDAP Password:
ldap_bind: Invalid credentials (49)
Код: Выделить всё
test# ldapadd -x -D "cn=root,dc=mail,dc=local" -h 192.168.3.1 -W -f base.ldif
Enter LDAP Password:
ldap_bind: Server is unwilling to perform (53)
additional info: unauthenticated bind (DN with no password) disallowed
укажи полный путь до base.ldifГоша писал(а):Уважаемые знатоки доброго времени суток! Пишет Вам Гога Салеля с далекой и холодной Камчатки!
Остановился на этом моменте если ввожу пароль (пароля я не знаю), по получаю (((Если без пароля то вотКод: Выделить всё
test# ldapadd -x -D "cn=root,dc=mail,dc=local" -h 192.168.3.1 -W -f base.ldif Enter LDAP Password: ldap_bind: Invalid credentials (49)
Где и что ни так ??? Не могу понять ((( Подскажите пожалуйста?Код: Выделить всё
test# ldapadd -x -D "cn=root,dc=mail,dc=local" -h 192.168.3.1 -W -f base.ldif Enter LDAP Password: ldap_bind: Server is unwilling to perform (53) additional info: unauthenticated bind (DN with no password) disallowed