Visit the LQ Articles and Editorials section
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-02-2011, 05:04 AM   #1
LQ Newbie
Registered: Jun 2011
Posts: 2

Rep: Reputation: Disabled
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}
but it didn't work.

Thanks in advance.
Old 06-03-2011, 10:32 AM   #2
Senior Member
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650
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...
Old 06-04-2011, 05:41 AM   #3
LQ Newbie
Registered: Jun 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] getting error while adding account in LDAP "ldap_bind: Invalid credentials (49)" csravi88 Linux - Server 6 10-14-2013 08:43 AM
ldap_bind: Invalid credentials (49) pdrobe Linux - General 12 09-13-2012 03:41 AM
ldap 2.4 rhel6 problem with openldap ldap_bind: Invalid credentials (49) dshivji Linux - Server 3 12-04-2010 04:23 AM
LEARNING LDAP -> ldap_bind: Invalid Credentials (49) peterson.julia Linux - Newbie 1 09-20-2010 12:28 AM
ldap: ldap_bind: Invalid credentials (49) (using user migrated with padl) eantoranz Linux - Software 1 09-05-2008 10:52 AM

All times are GMT -5. The time now is 07:34 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration