After importing backend.ldif I get "Invalid credentials (49) "

Bug #636363 reported by Zaphod
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openldap (Ubuntu)
Expired
Low
Unassigned

Bug Description

So I was trying to document configuring a new OpenLDAP install in Maverick but I ran into problems pretty quick. After I import my backend.ldif file I am unable to import the front end because of the error "Invalid credentials (49)".

Here is what I did. I can't see any mistakes so far:

sudo apt-get install slapd ldap-utils

load some additional schema files

sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/cosine.ldif
sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/nis.ldif
sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/inetorgperson.ldif

create a file called "backend.lan.local.ldif"
----------------------------------------------------------------------------------------------------------------

# Load dynamic backend modules
dn: cn=module,cn=config
objectClass: olcModuleList
cn: module
olcModulepath: /usr/lib/ldap
olcModuleload: back_hdb

# Database settings
dn: olcDatabase=hdb,cn=config
objectClass: olcDatabaseConfig
objectClass: olcHdbConfig
olcDatabase: {1}hdb
olcSuffix: dc=lan,dc=local
olcDbDirectory: /var/lib/ldap
olcRootDN: cn=admin,dc=lan,dc=local
olcRootPW: secret
olcDbConfig: set_cachesize 0 2097152 0
olcDbConfig: set_lk_max_objects 1500
olcDbConfig: set_lk_max_locks 1500
olcDbConfig: set_lk_max_lockers 1500
olcDbIndex: objectClass eq
olcLastMod: TRUE
olcDbCheckpoint: 512 30
olcAccess: to attrs=userPassword by dn="cn=admin,dc=lan,dc=local" write by anonymous auth by self write by * none
olcAccess: to attrs=shadowLastChange by self write by * read
olcAccess: to dn.base="" by * read
olcAccess: to * by dn="cn=admin,dc=lan,dc=local" write by * read
------------------------------------------------------------------------------------------------------------------------------------

load it into the LDAP

sudo ldapadd -Y EXTERNAL -H ldapi:/// -f backend.lan.local.ldif

Create a file called "frontend.lan.local.ldif" on the server.
----------------------------------------------------------------------------------------------------------------------------------

# Create top-level object in domain
dn: dc=lan,dc=local
objectClass: top
objectClass: dcObject
objectclass: organization
o: lan Organization
dc: lan
description: LDAP lan

# Admin user.
dn: cn=admin,dc=lan,dc=local
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator
userPassword: secret

dn: ou=people,dc=lan,dc=local
objectClass: organizationalUnit
ou: people

dn: ou=groups,dc=lan,dc=local
objectClass: organizationalUnit
ou: groups

dn: ou=computers,dc=lan,dc=local
objectClass: organizationalUnit
ou: computers

dn: uid=john,ou=people,dc=lan,dc=local
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
uid: john
sn: Doe
givenName: John
cn: John Doe
displayName: John Doe
uidNumber: 1000
gidNumber: 10000
userPassword: password
gecos: John Doe
loginShell: /bin/bash
homeDirectory: /home/john
shadowExpire: -1
shadowFlag: 0
shadowWarning: 7
shadowMin: 8
shadowMax: 999999
shadowLastChange: 10877
mail: <email address hidden>
postalCode: 31000
l: Toulouse
o: lan
mobile: +33 (0)6 xx xx xx xx
homePhone: +33 (0)5 xx xx xx xx
title: System Administrator
postalAddress:
initials: JD

dn: cn=lan,ou=groups,dc=lan,dc=local
objectClass: posixGroup
cn: lan
gidNumber: 10000
--------------------------------------------------------------------------------------------------------------------------------
import front end configuration

sudo ldapadd -x -D cn=admin,dc=lan,dc=local -W -f frontend.lan.local.ldif

Here is where I get
"Enter LDAP Password:
ldap_bind: Invalid credentials (49)"

From what I can tell I haven't made any mistake.

Revision history for this message
Stephan Rügamer (sruegamer) wrote :

Hi,

did you try to do this:

sudo ldapadd -Y EXTERNAL -H ldapi:/// -f frontend.lan.local.ldif

Could be that you are missing some acls for cn=admin

Revision history for this message
Zaphod (vilppu777) wrote :

I haven't installed the ldap scripts package yet as acording to this document I don't do it until much later
https://help.ubuntu.com/10.04/serverguide/C/openldap-server.html
So without that ldapscripts package I can't use that command

Revision history for this message
Zaphod (vilppu777) wrote :

hold on never mind

Revision history for this message
Zaphod (vilppu777) wrote :

I forgot I removed openldap I will re-install and try that and let you know.

Revision history for this message
Zaphod (vilppu777) wrote :

@Stephan Hermann
When I run your command I get:

$ sudo ldapadd -Y EXTERNAL -H ldapi:/// -f frontend.lan.local.ldif
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
adding new entry "dc=lan,dc=local"
ldap_add: Server is unwilling to perform (53)
 additional info: no global superior knowledge

--------------------
Then it exits

Revision history for this message
Stephan Rügamer (sruegamer) wrote :

hmm...

I just followed the document and everything worked fine...

I wonder what's missing...

INvestigating

Revision history for this message
Zaphod (vilppu777) wrote :

Are you using Ubuntu 10.10? I did a fresh install of the latest Ubuntu 10.10 x32 I can try again from the start and see what I get.

Revision history for this message
Chuck Short (zulcss) wrote :

Are you still having this problem?

chuck

Changed in openldap (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for openldap (Ubuntu) because there has been no activity for 60 days.]

Changed in openldap (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Davim (davim) wrote :

I have the same problem on ubuntu server 10.04.1 64b.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.