[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Newbie OpenLDAP woes



I am confused about how I have an empty dn.  I am including my ldap.conf and
slapd.conf as well as the ldif file I imported via the command line.

>From what I can see, I have defined a suffix in slapd.conf.  I imported
basics.ldif with the command:

Sudo slapadd -v -f /etc/ldap/salpd.conf -l basics.ldif

When I executed the command it seemed to do the import fine.

The other thing I don't understand is what the password is for root DN
(cn=Manager,dc=example,dc=com).  To me it seems like the password is
"secret" but when I type that in it rejects those credentials, so I am very
confused as to what I am supposed to type in for a password.  The only way I
can seem to connect is by leaving the password out and connecting via an
anonymous bind.

I apologize if I missing something really obvious, this is all new to me.
And I really appreciate the help!

-Kristen


On 7/10/08 11:07 AM, "Dieter Kluenter" <dieter@dkluenter.de> wrote:

> Hi,
> 
> Kristen  Walker <kwalker@sbceo.org> writes:
> 
>> Hi everyone,
>> 
>> I am new to OpenLDAP and this list.  I joined because I am trying to set up
>> an OpenLDAP server so that Moodle and ELGG can authenticate users from the
>> LDAP server.  It is a little more difficult than I thought it would be, and
>> I am running into some frustrating problems that I don't understand.  I am
>> hoping someone here might be able to help.
>> 
>> I am using Ubuntu and using the book Mastering OpenLDAP as my guide.
>> 
>> I have the server set up, edited config files and installed phpldapadmin to
>> make things a little easier for me.  I added my first entries but do not see
>> them when I do a search, and nothing appears under my base in phpldapadmin
>> (see attached screen shot).  I don't get any complaints when I add the
>> entries from my .ldif file, so I just don't understand why they don't seem
>> to end up in my directory.
>> 
>> 
>> If I do this command, sudo slapcat -a '(uid=barbara)' , the result is:
>> 
>> dn:
>> ou: Users
>> uid: barbara
>> sn: Jensen
> [...]
> 
> This entry has an empty DN, thus is not stored in the database defined
> by the suffix parameter in slapd.conf
> 
> create propper entries as described in the OpenLDAP docs
> http://www.openldap.org/doc/admin24/dbtools.html
> 
> -Dieter

--
Kristen Walker

Digital Media Resources Developer
Instructional Media Services
Santa Barbara County Education Office
4400 Cathedral Oaks Road
P.O. Box 6307
Santa Barbara, CA 93160-6307
(805)964-4711 ext. 5244/FAX (805)683-3597
kwalker@sbceo.org
http://www.sbceoportal.org


# $OpenLDAP: pkg/ldap/libraries/libldap/ldap.conf,v 1.9 2000/09/04 19:57:01 kurt Exp $
#
# LDAP Defaults
#

# See ldap.conf(5) for details
# This file should be world readable but not world writable.

BASE	dc=example,dc=com
URI	ldap://sbceoportal.org
BINDDN  cn=Manager,dc=example,dc=com

SIZELIMIT	0
TIMELIMIT	0
#DEREF		never
# This is the root of the directory tree
dn: dc=example,dc=com
description: Example.Com, your trusted non-existent corporation.
dc: example
o: Example.Com
objectClass: top
objectClass: dcObject
objectClass: organization

# Subtree for users
dn: ou=Users,dc=example,dc=com
ou: Users
description: Example.Com Users
objectClass: organizationalUnit

# Subtree for groups
dn: ou=Groups,dc=example,dc=com
ou: Groups
description: Example.Com Groups
objectClass: organizationalUnit

# Subtree for system accounts
dn: ou=System,dc=example,dc=com
ou: System
description: Special accounts used by software applications.
objectClass: organizationalUnit

##
## USERS
##

# Matt Butcher
dn: uid=matt,ou=Users,dc=example,dc=com
ou: Users
# Name info:
uid: matt
cn: Matt Butcher
sn: Butcher
givenName: Matt
givenName: Matthew
displayName: Matt Butcher
# Work Info:
title: Systems Integrator
description: Systems Integration and IT for Example.Com
employeeType: Employee
departmentNumber: 001
employeeNumber: 001-08-98
mail: mbutcher@example.com
mail: matt@example.com
roomNumber: 301
telephoneNumber: +1 555 555 4321
mobile: +1 555 555 6789
st: Illinois
l: Chicago
street: 1234 Cicero Ave.
# Home Info:
homePhone: +1 555 555 9876
homePostalAddress: 1234 home street $ Chicago, IL $ 60699-1234
# Misc:
userPassword: secret
preferredLanguage: en-us,en-gb
# Object Classes:
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson

# Barbara Jensen:
dn: uid=barbara,ou=Users,dc=example,dc=com
ou: Users
uid: barbara
sn: Jensen
cn: Barbara Jensen
givenName: Barbara
displayName: Barbara Jensen
mail: barbara@example.com
userPassword: secret
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson

# LDAP Admin Group:
dn: cn=LDAP Admins,ou=Groups,dc=example,dc=com
cn: LDAP Admins
ou: Groups
description: Users who are LDAP administrators
uniqueMember: uid=barbara,dc=example,dc=com
uniqueMember: uid=matt,dc=example,dc=com
objectClass: groupOfUniqueNames

# Special Account for Authentication:
dn: uid=authenticate,ou=System,dc=example,dc=com
uid: authenticate
ou: System
description: Special account for authenticating users
userPassword: secret
objectClass: account
objectClass: simpleSecurityObject

# slapd.conf - Configuration file for LDAP SLAPD
###########
# Basics #
###########

include /etc/ldap/schema/core.schema
include /etc/ldap/schema/cosine.schema
include /etc/ldap/schema/inetorgperson.schema

pidfile /var/run/slapd/slapd.pid
argsfile /var/run/slapd/slapd.args
logslevel none

modulepath /usr/lib/ldap
# modulepath /usr/local/libexec/openldap
moduleload back_hdb

############################
# Database Configuration   #
############################
database hdb
suffix "dc=example,dc=com"
rootdn "cn=Manager,dc=example,dc=com"
rootpw secret
directory /var/lib/ldap
# directory /usr/local/var/openldap-data
index objectClass,cn eq

########
# ACLs #
########
access to attrs=userPassword
	by anonymous auth
	by self write
	by * none

access to *
	by self write
	by * none