Openldap: getting error as ldap_bind: Invalid credentials (49)
Closed
bibhusisa
Posts1Registration dateMonday October 28, 2019StatusMemberLast seenOctober 28, 2019
-
Oct 28, 2019 at 03:08 PM
more_stupidness -
Oct 28, 2019 at 04:40 PM
Hi,
we are setting up an hadoop environment in Azure. we are having java 7 installed and below steps which i have completed and getting error while as "ldap_bind: Invalid credentials (49)" doing ldapsearch
1. I have installed openldap-servers.x86_64 openldap-clients.x86_64 krb5-server-ldap.x86_64 cyrus-sasl cyrus-sasl-ldap
2. sudo /bin/grep -q "^%cloudera-scm\ *ALL=NOPASSWD:.*slapd" /etc/sudoers || echo "%cloudera-scm ALL=NOPASSWD:/etc/init.d/slapd , /sbin/service slapd *" | sudo /usr/bin/tee -a /etc/sudoers > /dev/null
3. sudo chkconfig slapd on
4. service slapd start
5. [root@*********** openldap]# slappasswd
New password:
Re-enter new password:
{SSHA}teRNPA8jxcxAPArWAaVNIbh07N33x0WT
6. [root@******* ~]# cd /etc/openldap/
[root@******* openldap]# ls -ltr
total 12
-rw-r--r-- 1 root root 121 Dec 18 2018 check_password.conf
drwxr-xr-x 2 root root 90 Oct 20 01:14 certs
drwxr-xr-x 2 root root 4096 Oct 24 06:19 schema
drwxr-x--- 3 ldap ldap 45 Oct 24 06:19 slapd.d
-rw-r--r-- 1 root root 489 Oct 24 08:18 ldap.conf
7.Create LDAP cn=Manager account in initial DB and update the base dn of your ldap base
root@********* openldap]# cat ldapmanager.ldif
dn: olcDatabase={2}bdb,cn=config
changetype: modify
replace: olcSuffix
olcSuffix: dc=np,dc=bigdata,dc=eqh
-
replace: olcRootDN
olcRootDN: cn=Manager,dc=np,dc=bigdata,dc=eqh
-
add: olcRootPW
olcRootPW: {SSHA}teRNPA8jxcxAPArWAaVNIbh07N33x0WT==> same password setup earlier
8. [root@****** openldap]# sudo ldapmodify -Y EXTERNAL -H ldapi:/// -f ldapmanager.ldif
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
modifying entry "olcDatabase={2}bdb,cn=config"
ldap_modify: No such object (32)
matched DN: cn=config
9. [root@******** openldap]# cat changemanageracl.ldif
dn: olcDatabase={0}config,cn=config
changetype: modify
delete: olcAccess
-
add: olcAccess
olcAccess: {0}to * by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" manage by dn.base="cn=Manager,dc=np,dc=bigdata,dc=eqh" manage by * none