Create a Root user in OpenDJ

Sometimes you need to create a user with Root privileges on the OpenDJ directory server.

You need to do two main steps:

1.Create the root user on OpenDJ
2.Change the root user created the privileges
a.Take a look on the OpenDJ documentation to identify what is available. About OpenDJ Privileges

Below is an example about how to do it, in order to complete it you need:

1.Copy the text below using a text editor and save it as a ldif file. For example runme.ldif

# Create root user

dn: cn=TestRootUser,cn=Root DNs,cn=config
objectClass: inetOrgPerson
objectClass: person
objectClass: top
objectClass: ds-cfg-root-dn-user
objectClass: organizationalPerson
userPassword: password
cn: TestRootUser
sn: TestRootUser
ds-cfg-alternate-bind-dn: cn=TestRootUser
givenName: Directory

# Change a Root User’s Privileges

dn: cn=TestRootUser,cn=Root DNs,cn=config
changetype: modify
add: ds-privilege-name
ds-privilege-name: proxied-auth
ds-privilege-name: data-sync

2.On your openDJ instance, go to the bin or bat folder depending on your operating system and execute the next command.

On windows you can try something like:

ldapmodify -h localhost -p 389 -D “cn=Directory Manager” -w Password1dm –defaultAdd –filename “C:\Forgerock\OpenDJ\bat\runme.ldif”