[plug] Getting Started with LDAP

Craig Ringer craig at postnewspapers.com.au
Wed Apr 20 22:59:50 WST 2005


On Wed, 2005-04-20 at 21:51 +0800, Timothy White wrote:
> Subject: Getting Started with LDAP
> I'm going to start pulling my hair out soon.

Gee, it's funny how those two things seem to go together. Been there,
done that, experienced that pain.

> Unfortunately I can't seem to get the system started. It appears that
> although all the Schemes and stuff is installed, I'm not given a base
> system. No matter how hard I try I can get the base of the LDAP tree
> to be created. I know that the base is an object of the form
> "dc=white,dc=lan" and from what I can see browsing the Schemes it
> should be an objectclass domain.

There's a sample LDIF attached (assuming PLUG's filter passes it) that
should get you started. It's from the POST, and I haven't bothered
making all the names generic.

Just modify to taste then:

# slapadd < the_ldif_file

then verify with slapcat.

> >From what I've seen in the slapd.conf file I need the user
> "cn=admin,dc=white,dc=lan" set up before I can actually access the
> LDAP over LDAP.

That's right. You should then create a real user object to manage the
directory and disable the hard-coded root user in the LDAP
configuration.

You define a temporary admin user in slapd.conf to let you do that. See
"man slapd.conf" - look for the "rootdn" and "rootpw" directives.
Alternately, you can just import an LDIF file that provides the basics
(base DN, admin user, etc) with slapadd.

--
Craig Ringer
-------------- next part --------------
dn: dc=postnewspapers,dc=com,dc=au
objectClass: organization
objectClass: dcObject
dc: postnewspapers
o: POST Newspapers
structuralObjectClass: organization

dn: cn=admin,dc=postnewspapers,dc=com,dc=au
objectClass: organizationalRole
objectClass: simpleSecurityObject
cn: admin
description: LDAP administrator
userPassword:: xxxxxxxxxxxxxxxxxxxx
structuralObjectClass: organizationalRole

dn: ou=People,dc=postnewspapers,dc=com,dc=au
objectClass: organizationalUnit
ou: People
structuralObjectClass: organizationalUnit

dn: ou=Roaming,dc=postnewspapers,dc=com,dc=au
objectClass: organizationalUnit
ou: Roaming
structuralObjectClass: organizationalUnit


More information about the plug mailing list