dsconfig should have option to add base entry when creating new backend or new baseDN #481
Replies: 9 comments 1 reply
-
addBaseEntry = Only create the base entry (without import) |
Beta Was this translation helpful? Give feedback.
-
if, for example, I am following the instructions to use a JDBC connection for a database (https://github.com/OpenIdentityPlatform/OpenDJ/wiki/Using-a-Relational-Database-as-an-LDAP-Backend), when I do
./opendj/bin/dsconfig create-backend -h localhost -p 4444 --bindDN "cn=Directory Manager" --bindPassword password --backend-name=userRoot --type jdbc --set base-dn:dc=example,dc=com --set 'db-directory:jdbc:postgresql://localhost:5432/database_name?user=postgres&password=password' --set enabled:true --no-prompt --trustAll
I am left with a database with a baseDN, but no entry in the database for that baseDN, whereas with setup or control-panel, I can get the entry for the baseDN added at the same time as creating the baseDN. If I am using dsconfig, I then have to go through a second step to add the entry for the baseDN to the database via an ldif, either with ldapadd or using an ldif in control-panel.
Are you saying the argument addBaseEntry already exists for dsconfig? If so, where is it documented?
…On 6/2/25 8:06 pm, Valery Kharseko ***@***.***> wrote:
addBaseEntry = Only create the base entry (without import)
—
Reply to this email directly, view it on GitHub <https://github.com/
OpenIdentityPlatform/OpenDJ#478#issuecomment-2639219301>, or
unsubscribe <https://github.com/notifications/unsubscribe-auth/
AHYN37M2EFWICS4KFKHXMCT2OMQZDAVCNFSM6AAAAABWSNLTKWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZZGIYTSMZQGE>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Basically, with dsconfig, the only option I have is the "Leave Database Empty" option |
Beta Was this translation helpful? Give feedback.
-
[root@ldap21 ~]# /opt/opendj/bin/dsconfig create-backend -h localhost -p 4444 --bindDN "cn=Directory Manager" --bindPassword ******** --backend-name=userRoot --type jdbc --set base-dn:dc=example,dc=com --set 'db-directory:jdbc:oracle:thin:opendj/********@//orcl23xe.example.com/FREEPDB1' --set enabled:true --no-prompt --trustAll --addBaseEntry See "dsconfig --help" to get more usage help |
Beta Was this translation helpful? Give feedback.
-
create-backend don't have addBaseEntry option --set base-dn:dc=example,dc=com base-dn Description Default Value None |
Beta Was this translation helpful? Give feedback.
-
All --set base-dn does is tells the backend what the basedn for the backend is. It DOES NOT create an entry in the database for that baseDN, as opposed to setup --addBaseEntry, or "Only Create Base Entry", which DO. With dsconfig --set base-dn all you end up with is an empty database |
Beta Was this translation helpful? Give feedback.
-
@vharseko Similarly, with control-panel, I can choose "Leave Database Empty" or "Only Create Base Entry" What are the equivalent options if I am using dsconfig? |
Beta Was this translation helpful? Give feedback.
-
addbaseEntry for base-dn:dc=example,dc=com
|
Beta Was this translation helpful? Give feedback.
-
@vharseko |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
the setup program has the option to add the entry for the baseDN when doing an initial configuration
[root@ldap21 opendj]# ./setup --help
Usage: setup {options}
This utility can be used to setup the Directory Server
Command options:
-a, --addBaseEntry
Indicates whether to create the base entry in the Directory Server database
Similarly, control_panel has the option to Create Base Entry
However, there does not seem to be the same option when creating a backend or adding a baseDN with dsconfig, which means the entry for the baseDN must be added separately via an ldif
It would be good to have the same --addBaseEntry option in dsconfig that is found in setup
Beta Was this translation helpful? Give feedback.
All reactions