0

I installed openldap server to fedora 20, and try use it for manage bugzilla accounts. So I first configure it for my domain, plus set password:

dn: olcDatabase={0}config,cn=config
changetype: modify
replace: olcRootPW
olcRootPW: {SSHA}...

dn: olcDatabase={2}hdb,cn=config
changetype: modify
replace: olcRootPW
olcRootPW: {SSHA}...
-
replace: olcRootDN
olcRootDN: cn=admin,dc=example,dc=com
-
replace: olcSuffix
olcSuffix: dc=example,dc=com

and run:

 ldapmodify -a -Q -Y EXTERNAL -H ldapi:/// -f ./initial.ldif

After that I try add test user:

# User account
dn: uid=user1,ou=people,dc=example,dc=com
cn: User Name
givenName: Name
sn: User
uid: user1
mail: email@domain
objectClass: top
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
userPassword: {CRYPT}*

and call ldapadd

ldapadd -v -v -f ./useradd.ldif -x -D "cn=admin,dc=example,dc=com" -w pass

But it failed, say that it doesn't know inetOrgPerson.

So I try to append scheme with such class:

ldapadd -v -f ./inetorgperson.ldif -x -D "cn=admin,dc=example,dc=com" -w pass

but it failed with message about wrong login/password,

and now problems start:

I thought that problem that cn=config and I use cn=admin (it is my first day with ldap), so I used:

dn: olcDatabase={0}config,cn=config changetype: modify replace: olcRootDN olcRootDN: cn=admin,dc=example,dc=com

and whoa ldapadd -v -f ./inetorgperson.ldif -x -D "cn=admin,dc=example,dc=com" -w pass start works, but useradd failed with:

ldap_add: No such object (32)

plus after restart of slapd I got:

can only be set when rootdn is under suffix

So can anybody can give me advise how to add to fresh openldap record about user with "uid", "mail" and passwords fields?

0

I solved problem. Theare two problems: 1)How to add schema? Thanks to OpenLDAP cannot add new schema I solved it by using "-Y external" for ldapadd

2)initial configuration, there is olcDatabase={1}monitor,cn=config it should be also changed to got working slapd.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.