fenixan
fenixan

Reputation: 47

error of insufficient access when binding as the rootdn/rootpw

I was trying openldap step to step following its quick-start-guide on ubuntu 14,when I try to add slapd.ldif in this way:

ldapadd -x -D "cn=manager,dc=eg,dc=com" -w secret -f slapd.ldif.default

with my sldap.conf

include         /usr/local/etc/openldap/schema/core.schema
pidfile         /usr/local/var/run/slapd.pid
argsfile        /usr/local/var/run/slapd.args
database        bdb
suffix          "dc=eg,dc=com"
rootdn          "cn=manager,dc=eg,dc=com"
rootpw          secret
directory       /usr/local/var/openldap-data
index   objectClass     eq

it failed with prompt like this:

adding new entry "cn=config"
ldap_add: Insufficient access (50)

and when I created a ldif as shown in the guide

dn: dc=eg,dc=com 
objectclass: dcObject 
objectclass: organization 
o: Example Company 
dc: eg 

dn: cn=manager,dc=eg,dc=com 
objectclass: organizationalRole 
cn: manager

and try adding it as a new entry:

ldapadd -x -D "cn=manager,dc=eg,dc=com" -W -f example.ldif

it failed with prompt like this:

adding new entry "dc=eg,dc=com "
ldap_add: Invalid syntax (21)
additional info: objectclass: value #0 invalid per syntax

how to configure correctly to add a new entry?

is it possible that the quick-start-guide has been out-of-date?

Upvotes: 0

Views: 564

Answers (1)

user207421
user207421

Reputation: 310913

You're trying to reconfigure your server online when it has an offline configuration. You need to switch to the online configuration if you want to accomplish this sort of thing online, or else edit slapd.conf accordingly and restart OpenLDAP.

Off topic.

Upvotes: 1

Related Questions