LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 11-06-2007, 09:08 AM   #1
gergaholic
LQ Newbie
 
Registered: Nov 2007
Posts: 11

Rep: Reputation: 0
Exclamation ldap_bind: Invalid credentials (49) on OpenLDAP server


I am attempting to add a user to my LDAP database. I just set it up and am really confused by what is causing this error:
ldap_bind: Invalid credentials (49)

# LDAP Defaults

host 10.1.10.15
base dc=orca,dc=affinitygs,dc=com
binddn "cn=root,dc=orca,dc=affinitygs,dc=com"
bindpw password
ssl no


this is the line I am attempting to execute:

ldapadd -x -D "cn=Manager,dc=orca,dc=affinitygs,dc=com" -W -w secret -f/etc/openldap/myldif.ldif
 
Old 11-07-2007, 03:30 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,975

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
Quote:
ldapadd -x -D "cn=Manager,dc=orca,dc=affinitygs,dc=com" -W -w secret -f/etc/openldap/myldif.ldif
You don't need both -W and -w. You should use just one of them. Using -W will prompt you for a password while -w will accept the one given in the command (secret in your case).
 
Old 11-07-2007, 11:30 AM   #3
gergaholic
LQ Newbie
 
Registered: Nov 2007
Posts: 11

Original Poster
Rep: Reputation: 0
Ok, here is what I am trying now:

ldapadd -cv -x -D "cn=manager,dc=affinitygs,dc=com" -w secret -f /var/lib/ldap/new.ldif
 
Old 11-08-2007, 04:31 AM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,975

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
Quote:
Originally Posted by gergaholic View Post
Ok, here is what I am trying now:

ldapadd -cv -x -D "cn=manager,dc=affinitygs,dc=com" -w secret -f /var/lib/ldap/new.ldif
Did you succeded adding the ldif this way?
As a last resort you can use slapadd (but you have to stop the slapd server first) which does not require credentials:
Code:
slapadd -l /var/lib/ldap/new.ldif[
 
Old 11-08-2007, 09:02 AM   #5
gergaholic
LQ Newbie
 
Registered: Nov 2007
Posts: 11

Original Poster
Rep: Reputation: 0
I have not yet succeeded. I continue to get the invalid credentials message.
 
Old 11-08-2007, 09:44 AM   #6
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,975

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
Quote:
ldapadd -cv -x -D "cn=manager,dc=affinitygs,dc=com" -w secret -f /var/lib/ldap/new.ldif
I've just noted that you use "cn=manager,dc=affinitygs,dc=com" while in your slapd.cond you have: "cn=root,dc=orca,dc=affinitygs,dc=com". You should use the correct cn.

Last edited by bathory; 11-08-2007 at 09:49 AM.
 
Old 11-08-2007, 10:03 AM   #7
gergaholic
LQ Newbie
 
Registered: Nov 2007
Posts: 11

Original Poster
Rep: Reputation: 0
I have already corrected this. I have tried numerous changes since I first put up my first posting. Here is what I have:

#ldap.conf
host 10.1.10.15
base dc=affinitygs,dc=com
binddn "cn=root,dc=affinitygs,dc=com"
bindpw {SSHA}MsrDdVhfUf1rp5tpKsbCzToKBdS+GCza

#slapd.conf
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/misc.schema
include /var/lib/ldap/new.ldif

loglevel 4095

database ldif
suffix "dc=affinitygs,dc=com"
rootdn "cn=root,dc=affinitygs,dc=com"
rootpw {SSHA}MsrDdVhfUf1rp5tpKsbCzToKBdS+GCza

directory /var/lib/ldap/

index objectClass eq
#index ou,cn,mail,surname,givenname eq,pres,sub
#index uidNumber,gidNumber,loginShell eq,pres
#index uid,memberUid eq,pres,sub
#index nisMapName,nisMapEntry eq,pres,sub

access to attrs=userPassword
by self write
by anonymous auth
 
Old 11-08-2007, 10:03 AM   #8
gergaholic
LQ Newbie
 
Registered: Nov 2007
Posts: 11

Original Poster
Rep: Reputation: 0
I have the LDAP book by Gerald Carter on order...just trying to figure this all out in the mean time.
 
  


Reply


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
ldap_bind: Invalid credentials (49) pdrobe Linux - General 12 09-13-2012 03:41 AM
ldap_bind: Invalid credentials (49) on OpenLDAP server gergaholic Fedora 2 11-05-2007 04:23 PM
ldapadd returning ldap_bind: Invalid credentials (49) unixtech Linux - Server 7 06-01-2007 01:37 PM
LDAP_BIND: Invalid Credentials rupesh_pulikool Linux - Software 0 02-01-2005 02:27 PM
ldap_bind:Invalid credentials chintone Linux - General 0 12-06-2002 06:42 AM


All times are GMT -5. The time now is 01:10 PM.

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