NAME

openldap - LCFG OpenLDAP Component

SYNOPSIS

openldap METHOD [ARGS]

DESCRIPTION

An LCFG component that is used to configure and manage the OpenLDAP service on clients and servers.

METHODS

The non-standard component methods are described below.

start

On a client builds the client configuration. On a slave builds the server configuration and synchronizes its database with the database on the master server if not already done. On a master builds the server configuration and creates the master database if not already done. With the -f option on a slave or master will forcibly destroy the existing configuration and database and re-create from scratch. Starts the slapd server on the master and slaves.

run

Cleans out database transaction log files.

kick

Force a slave server to synchronize its database with the master server. With no argument only new entries and modified entries will be synchronized, entries that have been deleted from the master server database will not be deleted from the slave server database. With the hard argument deleted entries will also be synchronized. Note that synchronizing deleted entries will take longer to do and will increase the load on the master. With the start argument synchronization is done from the epoch rather than from whenever it was last done. This can be useful if there is something that will not synchronize because the replication tool believes the database is already consistent for some reason. This method also accepts the generic -v option which can be used to verbosely report progress on synchronization. Normally this method would be called automatically at a regular frequency via the cron component.

For this method to work a supported replication tool must be specified in the tool_replicate resource.

save

On a server (master or slave) backs up the current LDAP database as an LDIF file. The directory the backups are saved to is specified in the backup resource. The backup files should be kept at the same level of security as the original live data. The backups can be safely taken while the service is live. This method is normally invoked automatically at a regular time interval via the cron component.

load

On a server (master or slave) loads the current LDAP database from dump files produced via the save method. Takes one optional argument which is a timestamp. With no argument the load is done from the most recent dump file in the directory specified in the backup resource. The timestamp argument has the syntax [CC[YY[MM[DD[HH[MM]]]]]]]. For example, 200202 would load from the most recent dump file from Feb 2002, or 2002021211 would load from the most recent dump file for Feb 12 2002 during the 1100 hours period. Invoking this method destroys the existing database and recreates it from the saved data.

RESOURCES

The non-standard component resources are described below.

CLIENT CONFIGURATION

The following resources control the configuration of clients.

These items configure the client's default LDAP server. The default is not universally used, in particular only those tools built on the OpenLDAP C libraries will pay attention to this section of configuration.

server

The address of the LDAP server the machine should query.

searchbase

The base DN for searches on that server.

version

The LDAP version to use for queries.

binddn

The DN to bind to the server as (uses an anonymous bind if this is omitted).

bindpw

The password to use if the bind is not anonymous, and requires a password.

bind_policy

Set to soft to prevent nss_ldap from retrying failed LDAP queries as this can cause it to hang for a long time if no server is present.

nss_ldap CONFIGURATION

nss_initgroups_ignoreusers

This option directs the nss_ldap implementation of initgroups(3) to return NSS_STATUS_NOTFOUND if called with any of the listed users as its argument. The users are specified in a comma-separated list.

nss_reconnect_tries

The number of times nss_ldap will try to reconnect.

nss_reconnect_maxconntries

The maximum number of times nss_ldap will attempt to make a new connection before it begins to back-off with sleeps between each attempt.

The total number of connection attempts that would be made is reconnect_tries plus reconnect_maxconntries.

nss_reconnect_sleeptime

This is the time that nss_ldap will sleep before retrying a connection. If the connection attempt fails multiple times then the sleeptime will be doubled at each attempt up to the value specified in nss_reconnect_maxsleeptime.

nss_reconnect_maxsleeptime

The maximum time nss_ldap will sleep between connection attempts.

nss_map_attributes

Space-separated list of attributes for which replacement attributes will be specified.

nss_map_attribute_tag

Replacement attribute, to be used by nss_ldap, for the attribute specified by tag.

SERVER CONFIGURATION

The following resources control the configuration of servers.

type

Type selects which mode the LDAP server is running in:

master

LDAP server is domain master. A minimal initial dataset is loaded. No other data is loaded.

slave

LDAP server is a slave. The database will be initially synchronized with the master if a supported replication tool is defined in the tool_replicate resource.

client

No LDAP server is run.

backup

Directory where a servers database backup files are stored.

backup_rotate

Maximum number of snapshot save files to retain, the most recent N-1 of these are always held and N or more over this are always removed.

loglevel

The level at which logging should be performed. The slapd.conf(5) manpage provides details of what information is provided at each level.

schemas

List of schemas to include in the slapd configuration. If the schemafile_TAG resource is present this contains the name of the file to use, otherwise it defaults to /etc/openldap/schema/TAG.schema.

schemafile_TAG

Filename of schema file to use for TAG.

writemaster

The host that LDAP update requests on a slave server should be referred to using the DN in the dbrootdn resource to make the actual update. Should be empty on the master server.

allowv2

Set to a non-null value to allow LDAP v2 binds.

saslregexp

List of saslRegexp rule tags.

matching_TAG

The matching pattern for the saslRegexp rule.

replace_TAG

The replace pattern for the saslRegexp rule.

access

List of access rule tags.

to_TAG

The to part of this access rule.

by_TAG

List of tags, one for each by part of this access rule.

for_TAG_TAG

The by part of this access rule.

dbsuffix

Naming suffix of the database that the LDAP server stores. Will generally be the same as searchbase.

dbrootdn

RootDN of the database. On a slave, this should be the DN used by the replication agent which copies content into the database, on the master it should be the DN which has 'super user' access to the database, or a non-existent DN to disable this form of access.

indices

List of attributes which should be indexed. Note that changing this list will trigger a database shut down and index rebuild. Depending on the complexity this may take a large amount of time.

indextype_TAG

List of the indices to maintain for attribute TAG. See the slapd.conf(5) manpage for more details.

sizelimit
timelimit
idletimeout

See the slapd.conf(5) manpage for details.

saslrealm

The default realm for all SASL operations against the server

lastmod

See the slapd.conf(5) manpage for details.

checkpoint

See the slapd-bdb(5) manpage for details.

dbconfig

List of directive tags for configuring DB_CONFIG. See the BDB documentation for more details on DB_CONFIG directives.

dbc_tag

A DB_CONFIG directive and value.

master

Hostname of the server a slave synchronizes with. This does not have to be the master server, it could be another slave for example.

sources

List of servers replication will try and source from in turn. If not defined falls back to sourcing from the server specified in the master resource.

kickwait

Length of time in seconds for a replication to take before timing out, defaults to 300.

kickhardwait

Length of time in seconds for a full replication to take before timing out, defaults to 600.

PROXY SERVER CONFIGURATION

The following resources control the configuration of a server using back-ldap and the proxycache overlay.

proxy

Set to any non-empty value (normally true or yes) to enable the proxy-cache configuration.

cache

The proxycache values, see slapo-pcache for more details, however the default is "bdb 5000 AUTO 500 300" where AUTO substitutes for the numattrsets and is calculated automatically from the resource definitions of attribute sets below. There should be five values specifying database backend, max entries, number of attribute sets, entry limit and cc period.

cachequeries

The maximum cache queries, defaulting to 10000, see slapo-pcache for further details.

attrsets

List of attribute set tags with each defined below.

attrndx_tag

The index number of this attribute set, should be an ascending number starting from zero for the first set.

attributes_tag

A space separated list of the attributes associated with this set.

templates

List of cache filter template tags with each defined below.

comment_tag

Comment about this cache filter template, added into the configuration file for information only.

filter_tag

The filter definition for the template.

attrsetndx_tag

The index number of the attribute set to use for the template.

timeout_tag

The TTL (in seconds) for objects cached under the template.

FILES

/etc/ldap.conf
/etc/openldap/ldap.conf
/etc/openldap/slapd.conf
/etc/openldap/schema/*

PLATFORMS

Fedora3,Fedora5

SEE ALSO

ldapreplicate, slapd, slurpd, slapadd, slapcat, slapindex

AUTHOR

DICE Infrastructure Unit <inf-unit@inf.ed.ac.uk>