ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] Подключение к OpenLDAP и добавление данных
@ 2004-03-30 12:22 Eugene Prokopiev
  2004-03-30 11:44 ` Nick S. Grechukh
  0 siblings, 1 reply; 5+ messages in thread
From: Eugene Prokopiev @ 2004-03-30 12:22 UTC (permalink / raw)
  To: Community

Здравствуйте!

Задача: добавить в дерево OpenLDAP некие данные (пользователя и его 
подразделение), затем получить эти даные оттуда :)

www.ldapzone.spb.ru читал, но ясности это не добавило.

Конфиг - /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
include /etc/openldap/schema/dhcp.schema
pidfile         /var/run/slapd.pid
argsfile        /var/run/slapd.args
TLSCertificateFile      /etc/openldap/ldap.pem
TLSCertificateKeyFile   /etc/openldap/ldap.pem
TLSCACertificateFile    /etc/openldap/ldap.pem
database        ldbm
suffix          "dc=test,dc=ru"
rootdn          "cn=manager,dc=test,dc=ru"
rootpw  secret
directory       /var/lib/ldap/bases
loglevel -1
index objectClass,uid,uidNumber,gidNumber     eq
index cn,mail,surname,givenname               eq,subinitial
index dhcpHWAddress                           eq
index dhcpClassData                           eq

service ldap start отработал успешно.

Добавляю следующий файл:

dn: cn=dhcp,dc=test,dc=ru
objectClass: top
objectClass: person
sn: DHCP Administrator
cn: dhcp

dn: ou=dhcp,dc=test,dc=ru
objectClass: top
objectClass: organizationalUnit
ou: dhcp

Получаю:

# ldapadd -W -x -D "cn=manager,dc=test,dc=ru" -f data.ldif
Enter LDAP Password:
adding new entry "cn=dhcp,dc=test,dc=ru"
ldap_add: No such object
         additional info: parent does not exist

ldif_record() = 32

А при поиске:

$ ldapsearch -LL -H ldap://localhost -b "dc=test,dc=ru"
version: 1

No such object (32)

Что я делаю неправильно?

-- 
С уважением, Прокопьев Евгений



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-03-31  3:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-30 12:22 [Comm] Подключение к OpenLDAP и добавление данных Eugene Prokopiev
2004-03-30 11:44 ` Nick S. Grechukh
2004-03-30 13:02   ` Eugene Prokopiev
2004-03-30 13:46     ` Michael Bochkaryov
2004-03-31  3:06   ` BSW

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git