OpenLDAP gives invalid credentials (49) error message

5,838 views
Skip to first unread message

Abhishek K

unread,
Apr 11, 2012, 12:55:33 PM4/11/12
to vg...@googlegroups.com
Hello All,

I need help with setting up openLdap on Ubuntu server. I have tried 10.04 and 11.10 and with the servers, I get the same error message when trying to login via phpldapadmin or using the "ldapadd" command.

I have googled a lot but unable to come up with a solution. In 10.04, installing slapd did not ask for admin password. However, when installing in 11.10, it did. I am sure I entered the correct password. I am using the QuickStart Guide for OpenLDAP 2.4 here.

My example.ldif and ldap.conf reside in /etc/ldap folder and are exactly the same as in the quickstart guide. I come until step-9 but step-10 fails. The command is:-

    ldapadd -x -D "cn=Manager,dc=example,dc=com" -W -f example.ldif
    Enter LDAP Password:
    ldap_bind: Invalid Credentials (49)
Not sure what I am doing wrong. Been working on this for past 3 days without ANY positive signs. Any help is much appreciated.
-- 
Regards,
Abhishek

Bhavin Mehta

unread,
Apr 12, 2012, 4:15:37 AM4/12/12
to vg...@googlegroups.com
  Hello Abhishek,

On Wed, Apr 11, 2012 at 10:25 PM, Abhishek K <abhi...@gmail.com> wrote:
Hello All,

I need help with setting up openLdap on Ubuntu server. I have tried 10.04 and 11.10 and with the servers, I get the same error message when trying to login via phpldapadmin or using the "ldapadd" command.

I have googled a lot but unable to come up with a solution. In 10.04, installing slapd did not ask for admin password. However, when installing in 11.10, it did. I am sure I entered the correct password. I am using the QuickStart Guide for OpenLDAP 2.4 here.

My example.ldif and ldap.conf reside in /etc/ldap folder and are exactly the same as in the quickstart guide. I come until step-9 but step-10 fails. The command is:-

    ldapadd -x -D "cn=Manager,dc=example,dc=com" -W -f example.ldif
    Enter LDAP Password:
    ldap_bind: Invalid Credentials (49)

   You need to reconfigure slapd through below command.

   sudo dpkg-reconfigure slapd 

  For more detail check out below link.

Not sure what I am doing wrong. Been working on this for past 3 days without ANY positive signs. Any help is much appreciated.
-- 
Regards,
Abhishek

--
Please read http://www.catb.org/~esr/faqs/smart-questions.html before posting.
You received this message because you are subscribed to the "Vibrant GNU/Linux User Group".
To stop receiving emails from this group, mail to VGLUG+un...@googlegroups.com
To post to this group, send email to VG...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/VGLUG



--
 Thanks,
 Bhavin
 
"The fragrance of flowers spreads only in the direction of the wind. But the goodness of a person spreads in all directions."
 

Abhishek K

unread,
Apr 12, 2012, 12:55:04 AM4/12/12
to vg...@googlegroups.com
Hello,

When I try to do ldapsearch, I do not get the domain name listed in namingContexts. Could this be the problem:-

abhi@ldap:/etc/ldap$ ldapsearch -x -b '' -s base '(objectclass=*)' namingContexts
# extended LDIF
#
# LDAPv3
# base <> with scope baseObject
# filter: (objectclass=*)
# requesting: namingContexts
#

#
dn:
namingContexts: dc=nodomain

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1
I also did a debug command with the ldapadd. Could this be useful? Could anybody help understand and fix the issue? Any help is appreciated.

abhi@ldap:/etc/ldap$ ldapadd -x -D "cn=Manager,dc=example,dc=com" -W -f example.ldif -d 255
ldap_create
Enter LDAP Password:
ldap_sasl_bind
ldap_send_initial_request
ldap_new_connection 1 1 0
ldap_int_open_connection
ldap_connect_to_host: TCP localhost:389
ldap_new_socket: 4
ldap_prepare_socket: 4
ldap_connect_to_host: Trying 127.0.0.1:389
ldap_pvt_connect: fd: 4 tm: -1 async: 0
ldap_open_defconn: successful
ldap_send_server_request
ber_scanf fmt ({it) ber:
ber_dump: buf=0xb7f7ad00 ptr=0xb7f7ad00 end=0xb7f7ad30 len=48
  0000:  30 2e 02 01 01 60 29 02  01 03 04 1c 63 6e 3d 4d   0....`).....cn=M 
  0010:  61 6e 61 67 65 72 2c 64  63 3d 65 78 61 6d 70 6c   anager,dc=exampl 
  0020:  65 2c 64 63 3d 63 6f 6d  80 06 73 65 63 72 65 74   e,dc=com..secret 
ber_scanf fmt ({i) ber:
ber_dump: buf=0xb7f7ad00 ptr=0xb7f7ad05 end=0xb7f7ad30 len=43
  0000:  60 29 02 01 03 04 1c 63  6e 3d 4d 61 6e 61 67 65   `).....cn=Manage 
  0010:  72 2c 64 63 3d 65 78 61  6d 70 6c 65 2c 64 63 3d   r,dc=example,dc= 
  0020:  63 6f 6d 80 06 73 65 63  72 65 74                  com..secret      
ber_flush2: 48 bytes to sd 4
  0000:  30 2e 02 01 01 60 29 02  01 03 04 1c 63 6e 3d 4d   0....`).....cn=M 
  0010:  61 6e 61 67 65 72 2c 64  63 3d 65 78 61 6d 70 6c   anager,dc=exampl 
  0020:  65 2c 64 63 3d 63 6f 6d  80 06 73 65 63 72 65 74   e,dc=com..secret 
ldap_write: want=48, written=48
  0000:  30 2e 02 01 01 60 29 02  01 03 04 1c 63 6e 3d 4d   0....`).....cn=M 
  0010:  61 6e 61 67 65 72 2c 64  63 3d 65 78 61 6d 70 6c   anager,dc=exampl 
  0020:  65 2c 64 63 3d 63 6f 6d  80 06 73 65 63 72 65 74   e,dc=com..secret 
ldap_result ld 0xb7f72560 msgid 1
wait4msg ld 0xb7f72560 msgid 1 (infinite timeout)
wait4msg continue ld 0xb7f72560 msgid 1 all 1
** ld 0xb7f72560 Connections:
* host: localhost  port: 389  (default)
  refcnt: 2  status: Connected
  last used: Thu Apr 12 10:21:04 2012


** ld 0xb7f72560 Outstanding Requests:
 * msgid 1,  origid 1, status InProgress
   outstanding referrals 0, parent count 0
  ld 0xb7f72560 request count 1 (abandoned 0)
** ld 0xb7f72560 Response Queue:
   Empty
  ld 0xb7f72560 response count 0
ldap_chkResponseList ld 0xb7f72560 msgid 1 all 1
ldap_chkResponseList returns ld 0xb7f72560 NULL
ldap_int_select
read1msg: ld 0xb7f72560 msgid 1 all 1
ber_get_next
ldap_read: want=8, got=8
  0000:  30 0c 02 01 01 61 07 0a                            0....a..         
ldap_read: want=6, got=6
  0000:  01 31 04 00 04 00                                  .1....           
ber_get_next: tag 0x30 len 12 contents:
ber_dump: buf=0xb7f7bf08 ptr=0xb7f7bf08 end=0xb7f7bf14 len=12
  0000:  02 01 01 61 07 0a 01 31  04 00 04 00               ...a...1....     
read1msg: ld 0xb7f72560 msgid 1 message type bind
ber_scanf fmt ({eAA) ber:
ber_dump: buf=0xb7f7bf08 ptr=0xb7f7bf0b end=0xb7f7bf14 len=9
  0000:  61 07 0a 01 31 04 00 04  00                        a...1....        
read1msg: ld 0xb7f72560 0 new referrals
read1msg:  mark request completed, ld 0xb7f72560 msgid 1
request done: ld 0xb7f72560 msgid 1
res_errno: 49, res_error: <>, res_matched: <>
ldap_free_request (origid 1, msgid 1)
ldap_parse_result
ber_scanf fmt ({iAA) ber:
ber_dump: buf=0xb7f7bf08 ptr=0xb7f7bf0b end=0xb7f7bf14 len=9
  0000:  61 07 0a 01 31 04 00 04  00                        a...1....        
ber_scanf fmt (}) ber:
ber_dump: buf=0xb7f7bf08 ptr=0xb7f7bf14 end=0xb7f7bf14 len=0

ldap_msgfree
ldap_err2string
ldap_bind: Invalid credentials (49)
abhi@ldap:/etc/ldap$


Arun Pal

unread,
Apr 12, 2012, 2:07:19 AM4/12/12
to vg...@googlegroups.com
Also mention the host name,

rgds


--

Abhishek K

unread,
Apr 12, 2012, 9:39:14 AM4/12/12
to Arun Pal, vg...@googlegroups.com
Hello Arun/Bhavin,

Thanks for replying. I suspected hostname. It was ldap before. But i changed it to ldap.example.com to match my configuration and rebooted the server. Still no improvement.

I will run the command tomorrow and let you know. Thanks again.

Regards,
Abhishek

Sent from my Windows Phone

From: Arun Pal
Sent: 12-04-2012 PM 02:12
To: vg...@googlegroups.com
Subject: Re: [VGLUG] OpenLDAP gives invalid credentials (49) error message

Mudasir Mirza

unread,
Apr 12, 2012, 12:36:47 PM4/12/12
to vg...@googlegroups.com

Hi.

Goto www.diglinux.com , there i have written a complete article on setting up OpenLDAP Server on ubuntu 10.04...
That should help you out...

Regards.
Mudasir Mirza.
Systen Administrator.
(From my Android)

On Apr 11, 2012 10:20 PM, "Abhishek K" <abhi...@gmail.com> wrote:

Abhishek K

unread,
Apr 12, 2012, 2:02:34 PM4/12/12
to Mudasir Mirza, vg...@googlegroups.com
Hi Mudazir,

Will try it out tomorrow. Is the procedure same also for 11.10 server?

Also, I notice that 11.10 performance is not as good as 10.04 on a virtual machine with similar specs. Boot up time is also higher on 11.10 Ndlans therefore was to get it running on 10.04. Does anyone else has performance issues on 11.10??

Also, if someone has experience, could you tell how many Ldap databases and users will a server with 512MB of ram and high end processor support without breaking sweat?


Regards,
Abhishek

Sent from my Windows Phone

From: Mudasir Mirza
Sent: 12-04-2012 PM 11:04

To: vg...@googlegroups.com
Subject: Re: [VGLUG] OpenLDAP gives invalid credentials (49) error message

Reply all
Reply to author
Forward
0 new messages