ldap
LDAP
OpenLDAP and Mozilla's address book schema
Darkstar's LDAP
Running under openldap and enhanced to be compatible with Mozilla's address book schema [based on mozillaAbPersonObsolete.schema]. When starting a new database, LDAP has to be initialized and appropriate roots created. Here is Darkstar's init.ldif. Use the following command:
ldapadd -x -D "cn=root,dc=example,dc=com" -W -f init.ldif
Once initialized, LDAP address book can be populated via a tool such as gq, or, using the LDIF. One sample for an individual entry is found addentry.ldif.
Yahoo address book conversion
Alternatively, if you have an addressbook at Yahoo, you can follow the following steps to convert the exported LDIF from Yahoo's address book and populate the LDAP database.
NOTE for Mozilla clients:
LDAPv2 support is disabled in the slapd.conf file. Once the database is properly setup and Mozilla is configured to use the directory, you must add allow bind_v2 to the slapd.conf file.
Based on the following information:
From:Sven Woehlbier (sven.woehlbier@attosensor.de)
Subject: addressbook and openldap2
Newsgroups: netscape.public.general
Date: 2003-01-21 00:49:03 PST
I want use an "addressbook-server" (openldap2; linux) and as client
Netscape 7.01 Mail (windows).
How do you configurate openldap2 in this case?
I have a solution, but You can not see all addressbook-fields with
Netscape-Mail (mozillaSecondEmail; homePostalAddress;
mozillaHomePostalAddress2; mozillaLocalityName; mozillaHomeState;
mozillaHomePostalCode; mozillaHomeCountryName; postalAddress;
mozillaPostalAddress2; c).
Thank You Sven!
my solution:
===========================================================================
slapd.conf:
===========================================================================
# $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v 1.8.8.6 2001/04/20
23:32:43 kurt Exp $
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
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/mozillaAbPersonObsolete.schema
schemacheck on
loglevel 256
# Define global ACLs to disable default read access.
# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral ldap://root.openldap.org
pidfile /var/run/slapd.pid
argsfile /var/run/slapd.args
# Load dynamic backend modules:
# modulepath /usr/lib/openldap/openldap
# moduleload back_ldap.la
# moduleload back_ldbm.la
# moduleload back_passwd.la
# moduleload back_shell.la
#######################################################################
# ldbm database definitions - attosensor
#######################################################################
database ldbm
cachesize 1000
dbcachesize 100000
readonly off
suffix "dc=firma,dc=com"
rootdn "cn=Manager,dc=firma,dc=com"
rootpw secret
lastmod on
directory /path/ldap
index objectClass eq
#defaultaccess none
defaultaccess write (will deactivate later)
#access to attr=userPassword
# by dn="cn=Manager,dc=firma,dc=com" write
# by self read
# by * auth
#access to *
# by dn="cn=Manager,dc=firma,dc=com" write
# by self write
# by * read
===========================================================================
mozillaAbPersonObsolete.schema:
===========================================================================
# req. core
# req. cosine
# req. inetorgperson
# attribute defs
attributetype ( 1.3.6.1.4.1.9131.2.1.1
NAME ( 'xmozillaNickname' ) SUP name )
attributetype ( 1.3.6.1.4.1.9131.2.1.2
NAME ( 'xmozillaUseHtmlMail' )
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.9131.2.1.3
NAME 'mozillaSecondemail'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
attributetype ( 1.3.6.1.4.1.9131.2.1.4
NAME 'mozillaHomeLocalityName'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} )
attributetype ( 1.3.6.1.4.1.9131.2.1.5
NAME 'mozillaPostalAddress2'
EQUALITY caseIgnoreListMatch
SUBSTR caseIgnoreListSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.41 )
attributetype ( 1.3.6.1.4.1.9131.2.1.6
NAME 'mozillaHomePostalAddress2'
EQUALITY caseIgnoreListMatch
SUBSTR caseIgnoreListSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.41 )
attributetype ( 1.3.6.1.4.1.9131.2.1.7
NAME ( 'mozillaHomeState' ) SUP name )
attributetype ( 1.3.6.1.4.1.9131.2.1.8
NAME 'mozillaHomePostalCode'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{40} )
attributetype ( 1.3.6.1.4.1.9131.2.1.9
NAME ( 'mozillaHomeCountryName' ) SUP name SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.9131.2.1.10
NAME ( 'mozillaHomeFriendlyCountryName' )
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
attributetype ( 1.3.6.1.4.1.9131.2.1.11
NAME ( 'homeUrl' )
EQUALITY caseIgnoreIA5Match
SUBSTR caseIgnoreIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
attributetype ( 1.3.6.1.4.1.9131.2.1.12
NAME ( 'workUrl' )
EQUALITY caseIgnoreIA5Match
SUBSTR caseIgnoreIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
attributetype ( 1.3.6.1.4.1.9131.2.1.96
NAME ( 'custom1' )
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.9131.2.1.97
NAME ( 'custom2' )
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.9131.2.1.98
NAME ( 'custom3' )
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.9131.2.1.99
NAME ( 'custom4' )
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
SINGLE-VALUE )
# objectClass defs
objectclass ( 1.3.6.1.4.1.9131.2.2.1
NAME 'mozillaAbPersonObsolete'
SUP top
AUXILIARY
MAY (
xmozillaNickname $
xmozillaUseHtmlMail $
mozillaSecondemail $
mozillaPostalAddress2 $
mozillaHomePostalAddress2 $
mozillaHomeLocalityName $
mozillaHomeState $
mozillaHomePostalCode $
mozillaHomeCountryName $
mozillaHomeFriendlyCountryName $
homeUrl $
workUrl $
custom1 $
custom2 $
custom3 $
custom4 ) )
===========================================================================
initial.ldif:
===========================================================================
# root Eintrag
dn: dc=firma,dc=com
dc: firma
o: firma
objectclass: dcObject
objectclass: organization
# LDAP Manager
dn: cn=Manager,dc=firma,dc=com
objectclass: person
cn: Manager
sn: Manager
description: "LDAP Manager"
# Knoten User
dn: o=auth_user,dc=firma,dc=com
o: auth_user
objectclass: organization
# Knoten Gruppen
dn: o=auth_group,dc=firma,dc=com
o: auth_group
objectclass: organization
# Gruppe users erzeugen
dn: cn=users,o=auth_group,dc=firma,dc=com
objectclass: posixGroup
objectclass: top
cn: users
userPassword: secret
gidNumber: 100
# User erzeugen
dn: uid=user,o=auth_user,dc=firma,dc=com
uid: user
objectclass: account
objectclass: posixAccount
objectclass: top
objectclass: shadowAccount
objectclass: person
objectclass: inetOrgPerson
userPassword: secret
shadowLastChange: 11660
shadowMax: 99999
uidNumber: 500
gidNumber: 100
homeDirectory: /home/user
loginShell: /bin/bash
cn: user
sn: user
mail: user@firma.com
telephoneNumber: +49(0)1234/56789
#Adressbuch user
dn: o=Adressbuch,uid=user,o=auth_user,dc=firma,dc=com
o: Adressbuch
objectclass: organization
===========================================================================
addentry.ldif: (ldif exporte with netscape-addressbook; without
objectclass country and c: D)
===========================================================================
dn: cn=Manfred Mustermann, o=Adressbuch, uid=user, o=auth_user,
dc=firma, dc=com
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
objectclass: mozillaAbPersonObsolete
objectclass: country
givenName: Manfred
sn:: V8O2aGxiaWVy
cn:: U3ZlbiBXw7ZobGJpZXI=
xmozillanickname: Manni
mail: mustermann@firma.com
mozillaSecondEmail: info@firma.com
xmozillausehtmlmail: FALSE
telephoneNumber: +49(0)1234/56789
homePhone: +49(0)9876/54321
facsimileTelephoneNumber: +49(0)1234/56789
pager: 1111111
mobile: 2222222
homePostalAddress: Mustergasse
mozillaHomePostalAddress2: Nr.6
mozillaHomeLocalityName: Metropolis
mozillaHomeState: Bundesland
mozillaHomePostalCode: 12345
mozillaHomeCountryName: Deutschland
postalAddress: firmenpark
mozillaPostalAddress2: Nr.7
l: Metropolis(geschf.)
st: Bundesland(geschf)
postalCode: 54321
c: D
title: Dipl.-Ing.
ou: Abteilung
o: firma GmbH
workurl: http://www.firma.com
homeurl: http://www.mutermann.de
custom1: benuzerdefiniert1
custom2: benuzerdefiniert2
custom3: benuzerdefiniert3
custom4: benuzerdefiniert4
description: hinweise