[nzlug] Bootstrapping LDAP
Daniel Pittman
daniel at rimspace.net
Thu Jan 4 14:37:27 NZDT 2007
Martin D Kealey <martin at kurahaupo.gen.nz> writes:
> On Thu, 4 Jan 2007, Daniel Pittman wrote:
[...]
> For the sake of this argument, assume it's "create a new address book".
>
> In fact I'm building a custom schema for an unrelated application, but
> this would be enough to start with.
>
> Really this problem isn't about what goes into the database
> eventually, it's about how to insert the bootstrap records.
OK. The install process should have prompted for, and created, the
admin DN, something like 'cn=admin,dc=rimspace,dc=net', and assigned a
password for you.
The next step is to build a suitable LDIF file to load your records.
You need to make sure this defines the basic holding place first, in
most cases, such as this:
dn: ou=user,dc=rimspace,dc=net
objectClass: organizationalUnit
objectClass: top
ou: user
Then, under that create the records for your objects:
dn: cn=myrecord,ou=user,dc=rimspace,dc=net
objectClass: myObjectClass
objectClass: top
cn: myrecord
myField: myValue
Then you should be able to load that into the database using a command
like this:
ldapadd -n -x -D cn=admin,dc=rimspace,dc=net -W -f mydata.ldif
Drop the '-n' when it actually works. That will prompt you for the
password for your admin entity; substitute the details you gave at
install time.
I hope that answers your question.
Regards,
Daniel
--
Digital Infrastructure Solutions -- making IT simple, stable and secure
Phone: 0401 155 707 email: contact at digital-infrastructure.com.au
http://digital-infrastructure.com.au/
More information about the NZLUG
mailing list