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

Re: Converting from slapd.d back to slapd.conf

Ferenc Wagner wrote:
Frantisek Hanzlik <franta@hanzlici.cz> writes:

Or are somewhere prepared simple and working config. files as

slapd/slapd.ldif in the source tree.


I'd start with

$ sudo -u openldap mkdir /etc/ldap/slapd.d /srv/ldap/dc=example,dc=org
$ sudo -u openldap /usr/sbin/slapadd -F /etc/ldap/slapd.d -n 0 -l config.ldif

where config.ldif contains something like the following (based on the
default Debian config; at least the paths must be adapted to your
installation and init script):

dn: cn=config
objectClass: olcGlobal
olcArgsFile: /var/run/slapd/slapd.args
olcLogLevel: none
olcPidFile: /var/run/slapd/slapd.pid
olcToolThreads: 1

dn: cn=module,cn=config
objectClass: olcModuleList
olcModulePath: /usr/lib/ldap
olcModuleLoad: back_mdb

dn: cn=schema,cn=config
objectClass: olcSchemaConfig

include: file:///etc/ldap/schema/core.ldif

include: file:///etc/ldap/schema/cosine.ldif

include: file:///etc/ldap/schema/nis.ldif

include: file:///etc/ldap/schema/inetorgperson.ldif

dn: olcBackend=mdb,cn=config
objectClass: olcBackendConfig

dn: olcDatabase={-1}frontend,cn=config
objectClass: olcDatabaseConfig
objectClass: olcFrontendConfig
olcAccess: to * by dn.exact=gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth manage by * break
olcAccess: to dn.exact="" by * read
olcAccess: to dn.base=cn=Subschema by * read
olcSizeLimit: 500

dn: olcDatabase={0}config,cn=config
objectClass: olcDatabaseConfig
olcAccess: to * by dn.exact=gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth manage by * break

dn: olcDatabase={1}mdb,cn=config
objectClass: olcDatabaseConfig
objectClass: olcMdbConfig
olcDbDirectory: /srv/slapd/dc=example,dc=org
olcSuffix: dc=example,dc=org
olcAccess: to attrs=userPassword by self write by anonymous auth by * none
olcAccess: to dn.base="" by * read
olcAccess: to * by self write by * read
olcRootDN: cn=admin,dc=example,dc=org
olcRootPW: secret
olcDbMaxSize: 1073741824
olcDbIndex: objectClass eq

  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/