Newbie help : How to reset the Directory Manager’s password ?

We get this question quite often on IRC or mailling lists, from newbies who’ve installed OpenDJ (or OpenDS) for evaluation and forgot the Directory Manager’s password.

So here are the steps :

Make sure OpenDJ is stopped.

bin/stop-ds

Generate an encoded password for Directory Manager :

bin/encode-password -s SSHA512 -c AS3cur3PassW0rd
Encoded Password:  "{SSHA512}G/knE0xkyW2Af3+1MFy+yPYxchGgLuqog71R4njPJcs9t5NDAadqLxU7pxZjZkrDquQeb5aq7tum1ZFC3uE+r4Nmuil4S46A"

Copy the string within quotes (without the quotes), and edit the config/config.ldif file.

Go down to the following entry

dn: cn=Directory Manager,cn=Root DNs,cn=config

Replace the value of userPassword with the newly generated one.

dn: cn=Directory Manager,cn=Root DNs,cn=config
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: top
objectClass: ds-cfg-root-dn-user
userpassword: {SSHA512}G/knE0xkyW2Af3+1MFy+yPYxchGgLuqog71R4njPJcs9t5NDAadqLxU7pxZjZkrDquQeb5aq7tum1ZFC3uE+r4Nmuil4S46A
...

You can now restart the server and administer it.

4 thoughts on “Newbie help : How to reset the Directory Manager’s password ?

  1. Guest 17 February 2012 / 20:54

    When I reboot the server I’m still not able to log into dcconfig with the Directory Manager even after changing the hashed password. What else can I look into to get logged in so I can remove the default admin and create a new one?

    • Ludo 27 February 2012 / 10:18

      Hi,
      Most likely, the server has not been restarted after a reboot of the server.
      By default OpenDJ doesn’t install hooks to restart at reboot. Depending on your OS, you might need to create and install the RC script or configure OpenDJ to use Windows Services.

  2. GAURAV SRIVASTAVA 20 August 2018 / 10:31

    Please help me how to integrate opendj with openam after openam has been installed.

    • Ludo 20 August 2018 / 10:40

      How about you help yourself by reading the OpenAM documentation ? Otherwise, ForgeRock is providing support for these products.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s