Код: Выделить всё
[root@phoebus] /usr/local/etc/openldap # ldapadd -x -h localhost -D "cn=root,dc=empire,dc=if,dc=ua" -W -f test1.ldif
Enter LDAP Password:
adding new entry "dc=empire,dc=if,dc=ua"
ldap_add: Server is unwilling to perform (53)
additional info: operation not permitted within namingContext
Код: Выделить всё
[root@phoebus] /usr/local/etc/openldap # cat test1.ldif
dn: dc=empire,dc=if,dc=ua
objectclass: top
objectclass: dcObject
objectclass: organization
dc: empire
o: Empire
Description: Empire
Код: Выделить всё
[root@phoebus] /usr/local/etc/openldap # cat slapd.conf
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/openldap.schema
include /usr/local/etc/openldap/schema/nis.schema
pidfile /var/run/openldap/slapd.pid
argsfile /var/run/openldap/slapd.args
modulepath /usr/local/libexec/openldap
moduleload back_sql.la
backend sql
#######################################################################
# sql database definitions
#######################################################################
database sql
suffix "dc=empire,dc=if,dc=ua"
rootdn "cn=root,dc=empire,dc=if,dc=ua"
rootpw 1
dbname ldap
dbuser root
dbpasswd 1
subtree_cond "ldap_entries.dn LIKE CONCAT('%',?)"
insentry_query "INSERT INTO ldap_entries (id,dn,oc_map_id,parent,keyval) VALUES ((select max(id)+1 from ldap_entries),?,?,?,?)"
upper_func "upper"
strcast_func "text"
lastmod on
access to attrs=userPassword
by anonymous auth
by self write
by * none
access to *
by self write
by * read
Код: Выделить всё
[root@phoebus] /usr/local/etc/openldap # tail -f /var/log/debug.log
Jan 14 12:10:52 phoebus slapd[1176]: WARNING: No dynamic config support for database sql.
Jan 14 12:10:52 phoebus slapd[1176]: slapd starting
Jan 14 12:16:59 phoebus slapd[1176]: conn=1000 fd=8 ACCEPT from IP=127.0.0.1:14513 (IP=0.0.0.0:389)
Jan 14 12:16:59 phoebus slapd[1176]: conn=1000 op=0 BIND dn="cn=root,dc=empire,dc=if,dc=ua" method=128
Jan 14 12:16:59 phoebus slapd[1176]: conn=1000 op=0 BIND dn="cn=root,dc=empire,dc=if,dc=ua" mech=SIMPLE ssf=0
Jan 14 12:16:59 phoebus slapd[1176]: conn=1000 op=0 RESULT tag=97 err=0 text=
Jan 14 12:16:59 phoebus slapd[1176]: conn=1000 op=1 ADD dn="dc=empire,dc=if,dc=ua"
Jan 14 12:16:59 phoebus slapd[1176]: conn=1000 op=1 RESULT tag=105 err=53 text=operation not permitted within namingContext
Jan 14 12:16:59 phoebus slapd[1176]: conn=1000 op=2 UNBIND
Jan 14 12:16:59 phoebus slapd[1176]: conn=1000 fd=8 closed