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

Re: How to slapadd cn=config



Hi Ondrej!

You're right, it's a classic RTFM:

>From the slapadd man page:

 -n dbnum
	      Add entries to the dbnum-th database listed in the configuration
	      file.  The -n cannot be used in conjunction with the -b  option.
	      To  populate the config database slapd-config(5), use -n 0 as it
	      is always the first database. It must physically	exist  on  the
	      filesystem prior to this, however.

I tried -b 'cn=config' instead of -n 0, which is semantically the same,
but not technially.

Problem solved, I think.

Regards,
Torsten


On Tue, 21 Sep 2010 14:45:33 +0200, Ondrej Kuznik
<ondrej.kuznik@acision.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 09/21/2010 02:23 PM, Torsten Schlabach (Tascel eG) wrote:
>> Hi Robert!
>> 
>>> Slapd, etc. needs an /etc/openldap/slapd.conf file
>> 
>> Well, either an /etc/openldap/slapd.conf file *or* a cn=config
database,
>> I
>> guess.
>> 
>> Ok, maybe a possible trick is to have a minimal slapd.conf file which
>> just
>> declares a cn=config database to be able to load it that way.
>> 
>> In that case, a cut & paste example somewhere would come in handy.
>> 
>> But I understand that in OpenLDAP 2.5 they think about doing away with
>> slapd.conf entirely. This would then break your approach again.
>> 
>> Maybe Howard will explain a bit better what he meand by "slapadd the
same
>> way you slapcat".
> 
> I asked a similar question on the #openldap irc channel some time ago,
> the advice was to use:
> slapadd -n0 -l slapdconfig.ldif -F /path/to/new/slapd.d
> 
> (the directory /path/to/new/slapd.d must already exist and should be
> an empty directory)
> 
> That way you need no prior configuration in the form of slapd.conf.
> 
> Ondra
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAkyYqO0ACgkQ9GWxeeH+cXv1QACdHgrI5G/W760M2QCJ1PKiHbNM
> lIIAn0wiPptdEEcCftO5gBDPk01dQcMi
> =h2Z3
> -----END PGP SIGNATURE-----
> 
> This e-mail and any attachment is for authorised use by the intended
> recipient(s) only. It may contain proprietary material, confidential
> information and/or be subject to legal privilege. It should not be
copied,
> disclosed to, retained or used by, any other party. If you are not an
> intended recipient then please promptly delete this e-mail and any
> attachment and all copies and inform the sender. Thank you.