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

Re: How do I reset rootdn password?


On Sat, Feb 4, 2012 at 1:56 AM, Daniel Savard <dsavard@cids.ca> wrote:
> I would like to know how to reset the rootpw in OpenLDAP 2.4?
> Do I need to recreate over the entire configuration database and the
> database itself or there is a trick?

Risking to be burned by the community, you could directly edit the
slapd.d files (this is NOT recommended, but you could risk doing it in
your case), this one in particular (shutdown slapd before doing this):


And change that line:

olcRootPW:: e1NTSEF9b085TTcyaUNnK2lKUVp1d2s3SENvZHpEOHFBS2c5VCs=

Note this is bsae64 encoded, so, will need to generate it with
slappasswd and then encode it to base64, there are some online
encoders you could use.

Also, I believe there are olcRootPW per-database (I don't remember
seeing that on slapd.conf kind of configs, but I just saw it on the
slapd.d right now):

On file: olcDatabase={1}hdb.ldif

olcRootPW: {SSHA}/VPQC7Z0ptwQyV5N24eX/IqyiZpvcrB5

And, this one is NOT base64 encoded... by seeing this, I could say
that you could actually use the value from slappasswd (by removing the
extra ":") on the other file.

I hope this helps,

Ildefonso Camargo