I am new to LDAP
and OpenLDAP
When running very basic ldapsearch
ldapsearch -H ldap:// -x -s base -b “” -LLL “+”
It returns
ldapsearch: invalid option -- 'H'
in CentOS 7
but if I run
sudo ldapsearch -H ldap:// -x -s base -b “” -LLL “+”
the invalid option
error is gone but then it returns
Invalid DN syntax (34)
Additional information: invalid DN
I think it looks like I messed up some of the configuration, all I did was following instruction from this tutorial
Please let me know any extra information i should provide here and how can I resolve the problem. I am really newbie in (Open)LDAP
.
UPDATE
Content of /etc/openldap/slapd.d/db.ldif
dn: olcDatabase={2}hdb,cn=config
changetype: modify
replace: olcSuffix
olcSuffix: dc=myname,dc=local
dn: olcDatabase={2}hdb,cn=config
changetype: modify
replace: olcRootDN
olcRootDN: cn=ldapadm,dc=myname,dc=local
dn: olcDatabase={2}hdb,cn=config
changetype: modify
replace: olcRootPW
olcRootPW: {SSHA}123123123123123123123