To generate slapd.conf to xyzschema.ldif

Using this

slapcat -f slapd.conf.schemaname -F /tmp/schema -n0 -s cn=schema,cn=config

Schema file has been created. 

But when I am trying to add this schema using
ldapadd -D cn=admin, cn=config  -W -f cn\=\{0\}schemaname.ldif

Getting Error ldap_bind: Invalid credentials (49)

I figure out that my credentials are not configured properly.


So, I create a: manage.ldif file

dn: olcDatabase={1}bdb,cn=config
changetype: modify
replace: olcRootPW
olcRootPW: {SHA}GvyYSUqNK/Uo/Cva399YZUPUFNM=

Used 
ldapmodify -Y EXTERNAL -H ldapi:/// -f manager.ldif

SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
modifying entry "olcDatabase={1}bdb,cn=config"

But still, when I am trying to add my customize schema, getting same error
Error ldap_bind: Invalid credentials (49)


Please fine the Attachment,
 /etc/ldap/slapd.d/cn=config/olcDatabase={1}bdb.ldif



System configuration:

Ubuntu 14.04

Installed slapd: apt-get install slapd ldap-utils
Than,
Configured by:- dpkg reconfigure slapd
dc=my-xyxdomain, dc=com
used: bdb
Later configured phpldapadmin.

Working fine.





Regards
Abhishek Koserwal
Final year, CSE, IET-DAVV

The capacity to learn is a gift; The ability to learn is a skill; The willingness to learn is a choice -- Brian Herbert