-   Linux - Newbie (
-   -   Enter LDAP Password keeps saying ldap_bind: Invalid credentials (49) (

Cheetara63 06-02-2011 05:04 AM

Enter LDAP Password keeps saying ldap_bind: Invalid credentials (49)
Hi everyone.

I looked everywhere for a solution to my problem but still didn't find it.
I have these two simple files as sladp.conf and mytree.ldif and when i try to add something to mytree.ldif it keeps asking me for a password (which i believe is roopw defined in slapd.conf) but it doesn't work.
I really need help with this.

These are my files:


database dbd
suffix "dc=ers,dc=uminho,dc=pt"
rootdn "cn=Manager,dc=ers,dc=uminho,dc=pt"
rootpw ersadmin
directory /usr/local/var/openldap-data


dn: dc=ers, dc=uminho, dc=pt
objectclass: dcObject
objectclass: organization
o: ERS
dc: ers

dn: cn=Manager,dc=ers,dc=uminho,dc=pt
objectclass: organizationalRole
cn: Manager

And this is what i'm trying to do and my response:

sudo ldapadd -x -D "cn=Manager,dc=ers,dc=uminho,dc=pt" -W -f /etc/ldap/mytree.ldif
Enter LDAP Password:
ldap_bind: Invalid credentials (49)

I already tried to encrypt the password using
slappasswd -h {SSHA} -s ersadmin
and changing my slapd.conf file

password-hash        {SSHA}
rootpw        {SSHA}pLEBIPx4rW3eebpwACBGAZkNH4CVBRGW

but it didn't work.

Thanks in advance.

kbp 06-03-2011 10:32 AM

I'm confused .. it looks like you're trying to bind to ldap as the user that you're trying to add .. ????

The bind user needs to exist in the directory already...

Cheetara63 06-04-2011 05:41 AM

I was just following some example i had. The problem is that i can't access the ldap's server because of the password.
Anyway, i probably won't need this anymore, but i believe the only way to solve my problem was to re-install ubuntu and ldap. A friend told me that could be because (and he is not so sure of this) newer versions of ubuntu may not need the slapd.conf file. They just use .ldifs (or somehting like this...)
He told me he followed this tutorial ( and he didn't have so many problems.

Thanks for the response, anyway.

All times are GMT -5. The time now is 07:23 PM.