OpenLDAP: Bootstrapping a minimal cn=config
- Oct
- 01
- Posted by TKH Specialist
- Posted in linux, openldap
Here is how to bootstrap OpenLDAP’s slapd with an absolutely minimal configuration, without needing an intermediate slapd.conf, with one feature — the local root user (uid=0/gid=0) has “manage” access. From this point, ldapmodify can be used via ldapi to continue making configuration changes. This is a good way to start a new server configuration.
Bootstrap:
$> echo 'dn: cn=config objectClass: olcGlobal cn: config dn: olcDatabase={0}config,cn=config objectClass: olcDatabaseConfig olcDatabase: {0}config olcAccess: to dn.subtree="cn=config" by dn=gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth manage by * none ' | slapadd -n0 -F slapd.d
Start slapd:
#> slapd -F slapd.d -h ldapi://foo
Make changes via ldapmodify:
#> ldapmodify -Y EXTERNAL -H ldapi://foo ...
Recent Comments
- Stefan on Flush This!
- Timestamping your Bash History | Matt's Entropy on Remember when you issued that command…?
- Matt Smith on Remember when you issued that command…?
- Ruan on Putting ‘lsof’ to use
- Dylan F. Marquis on External Mapping of LDAP attributes in CAS