Repository navigation
dsconfig should have option to add base entry when creating new backend or new baseDN #478
Description
Activity
- changed the title
[-]dsconfig should have option to add base entry when creating new backend[/-][+]dsconfig should have option to add base entry when creating new backend or new baseDN[/+]on Feb 6, 2025 addBaseEntry = Only create the base entry (without import)
- 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: ***@***.***>
Basically, with dsconfig, the only option I have is the "Leave Database Empty" option
[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
An error occurred while parsing the command-line arguments: The provided
argument --addBaseEntry is not a valid global argument identifierSee "dsconfig --help" to get more usage help
create-backend don't have addBaseEntry option
--set base-dn:dc=example,dc=com
base-dn
Description
Specifies the base DN(s) for the data that the backend handles. A single backend may be responsible for one or more base DNs. Note that no two backends may have the same base DN although one backend may have a base DN that is below a base DN provided by another backend (similar to the use of sub-suffixes in the Sun Java System Directory Server). If any of the base DNs is subordinate to a base DN for another backend, then all base DNs for that backend must be subordinate to that same base DN.Default Value None
Allowed Values A valid DN.
Multi-valued Yes
Required Yes- locked and limited conversation to collaborators
on Feb 7, 2025
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