DSCTL(8)

πŸ’– DSCTL(8) πŸ’–

okay bestie, buckle UP, because this is the dsctl manual page β€” an actual Python-generated manpage from section 8, and she is LONG. This is part 1 of 4, so we're not even done yet. Let's go 🫢


✨ NAME ✨

dsctl


πŸŽ€ SYNOPSIS πŸŽ€

dsctl [-h] [-v] [-j] [-l] [instance]
      {restart,start,stop,status,remove,db2index,db2bak,db2ldif,dbverify,bak2db,ldif2db,backups,ldifs,index-check,tls,healthcheck,get-nsstate,ldifgen,dsrc,cockpit,dblib,thread-pool} ...

🌸 POSITIONAL ARGUMENTS 🌸

so like, you pick an instance (or don't) and then you pick ONE of these moves. each one is a whole vibe:

  • dsctl restart β€” restart an instance of Directory Server, but only if it's already running; otherwise it just starts it. no cap.
  • dsctl start β€” start an instance of Directory Server, assuming it isn't currently running.
  • dsctl stop β€” stop an instance of Directory Server, assuming it is currently running.
  • dsctl status β€” peek at whether an instance of Directory Server is running or not.
  • dsctl remove β€” destroy an instance of Directory Server and yeet all its data. πŸ’€
  • dsctl db2index β€” kick off a reindex of the server database. the server must be stopped for this to proceed.
  • dsctl db2bak β€” kick off a BDB backup of the database. the server must be stopped for this to proceed.
  • dsctl db2ldif β€” kick off an LDIF dump of the database. the server must be stopped for this to proceed.
  • dsctl dbverify β€” perform a db verification. you should only do this at the direction of support, fr fr. πŸ™ˆ
  • dsctl bak2db β€” restore a BDB backup of the database. the server must be stopped for this to proceed.
  • dsctl ldif2db β€” restore an LDIF dump of the database. the server must be stopped for this to proceed.
  • dsctl backups β€” list the backup's found in the server's default backup directory.
  • dsctl ldifs β€” list all the LDIF files chillin' in the server's LDIF directory.
  • dsctl index-check β€” check for index ordering mismatches (parentid/ancestorid). the server must be stopped.
  • dsctl tls β€” manage TLS certificates. queen behavior πŸ‘‘
  • dsctl healthcheck β€” run a healthcheck report on a local Directory Server instance. this is a safe and read-only operation. do not try to run this on a remote Directory Server, because this tool needs access to local resources β€” otherwise the report may be inaccurate.
  • dsctl get-nsstate β€” get the replication nsState in a human readable format. here's what all the fields mean:
    • Replica DN: β€” The DN of the replication configuration entry
    • Replica Suffix: β€” The replicated suffix
    • Replica ID: β€” The Replica identifier
    • Gen Time β€” The time the CSN generator was created
    • Gen Time String: β€” The time string of generator
    • Gen as CSN: β€” The generation CSN
    • Local Offset: β€” The offset due to the local clock being set back
    • Local Offset String: β€” The offset in a nice human format
    • Remote Offset: β€” The offset due to clock difference with remote systems
    • Remote Offset String: β€” The offset in a nice human format
    • Time Skew: β€” The time skew between this server and its replicas
    • Time Skew String: β€” The time skew in a nice human format
    • Seq Num: β€” The number of multiple csns within a second
    • System Time: β€” The local system time
    • Diff in Seconds: β€” The time difference in seconds from the CSN generator creation to now
    • Diff in days/secs: β€” The time difference broken up into days and seconds
    • Endian: β€” Little/Big Endian
  • dsctl ldifgen β€” LDIF generator to make sample LDIF files for testing.
  • dsctl dsrc β€” manage the .dsrc file.
  • dsctl cockpit β€” enable the Cockpit interface/UI.
  • dsctl dblib β€” database library (i.e bdb/lmdb) migration.
  • dsctl thread-pool β€” offline thread pool diagnostics, read from the local mmap status file.

πŸ”₯ COMMAND dsctl restart πŸ”₯

usage: dsctl [-v] [-j] [instance] restart [-h]

πŸ”₯ COMMAND dsctl start πŸ”₯

usage: dsctl [-v] [-j] [instance] start [-h]

πŸ”₯ COMMAND dsctl stop πŸ”₯

usage: dsctl [-v] [-j] [instance] stop [-h]

πŸ”₯ COMMAND dsctl status πŸ”₯

usage: dsctl [-v] [-j] [instance] status [-h]

πŸ”₯ COMMAND dsctl remove πŸ”₯

usage: dsctl [-v] [-j] [instance] remove [-h] [--do-it]

✨ OPTIONS 'dsctl remove' ✨

  • --do-it β€” by default we do a dry run. this actually initiates the removal of the instance. like, for real for real.

πŸ”₯ COMMAND dsctl db2index πŸ”₯

usage: dsctl [-v] [-j] [instance] db2index [-h] [--attr ATTR] backend
  • backend β€” the backend to reindex. IE userRoot

✨ OPTIONS 'dsctl db2index' ✨

  • --attr ATTR β€” an attribute to reindex. IE: --attr member --attr cn ...

πŸ”₯ COMMAND dsctl db2bak πŸ”₯

usage: dsctl [-v] [-j] [instance] db2bak [-h] [--watch] [archive]
  • archive β€” the destination for the archive. this will be created during the db2bak process.

✨ OPTIONS 'dsctl db2bak' ✨

  • --watch β€” watch the status of the db2bak task

πŸ”₯ COMMAND dsctl db2ldif πŸ”₯

usage: dsctl [-v] [-j] [instance] db2ldif [-h] [--replication] [--encrypted] [--watch] backend [ldif]
  • backend β€” the backend to output as an LDIF. IE userRoot
  • ldif β€” the path to the ldif output location.

✨ OPTIONS 'dsctl db2ldif' ✨

  • --replication β€” export replication information, suitable for importing on a new consumer or backups.
  • --encrypted β€” export encrypted attributes
  • --watch β€” watch the status of the db2ldif task

πŸ”₯ COMMAND dsctl dbverify πŸ”₯

usage: dsctl [-v] [-j] [instance] dbverify [-h] backend
  • backend β€” the backend to verify. IE userRoot

πŸ”₯ COMMAND dsctl bak2db πŸ”₯

usage: dsctl [-v] [-j] [instance] bak2db [-h] [--watch] archive
  • archive β€” the archive to restore. this will erase all current server databases. 😭

✨ OPTIONS 'dsctl bak2db' ✨

  • --watch β€” watch the status of the bak2db task

πŸ”₯ COMMAND dsctl ldif2db πŸ”₯

usage: dsctl [-v] [-j] [instance] ldif2db [-h] [--encrypted] [--watch] backend ldif
  • backend β€” the backend to restore from an LDIF. IE userRoot
  • ldif β€” the path to the ldif to import

✨ OPTIONS 'dsctl ldif2db' ✨

  • --encrypted β€” import encrypted attributes
  • --watch β€” watch the status of the ldif2db task

πŸ”₯ COMMAND dsctl backups πŸ”₯

usage: dsctl [-v] [-j] [instance] backups [-h] [--delete DELETE]

✨ OPTIONS 'dsctl backups' ✨

  • --delete DELETE β€” delete backup directory

πŸ”₯ COMMAND dsctl ldifs πŸ”₯

usage: dsctl [-v] [-j] [instance] ldifs [-h] [--delete DELETE]

✨ OPTIONS 'dsctl ldifs' ✨

  • --delete DELETE β€” delete LDIF file

πŸ”₯ COMMAND dsctl index-check πŸ”₯

usage: dsctl [-v] [-j] [instance] index-check [-h] [--fix] [backend]
  • backend β€” backend to check. if not specified, all backends are checked.

✨ OPTIONS 'dsctl index-check' ✨

  • --fix β€” fix mismatches by adjusting config to match on-disk data

πŸ”₯ COMMAND dsctl tls πŸ”₯

usage: dsctl [-v] [-j] [instance] tls [-h] {list-ca,list-client-ca,show-server-cert,show-cert,generate-server-cert-csr,import-client-ca,import-ca,import-server-cert,import-server-key-cert,remove-cert,export-cert} ...

🌈 POSITIONAL ARGUMENTS 'dsctl tls' 🌈

  • dsctl tls list-ca β€” list server certificate authorities including intermediates
  • dsctl tls list-client-ca β€” list client certificate authorities including intermediates
  • dsctl tls show-server-cert β€” show the active server certificate that clients will see and verify
  • dsctl tls show-cert β€” show a certificate's details referenced by it's nickname. this is analogous to certutil -L -d <path> -n <nickname>
  • dsctl tls generate-server-cert-csr β€” generate a Server-Cert certificate signing request β€” the csr is then submitted to a CA for verification, and when signed you import with import-ca and import-server-cert
  • dsctl tls import-client-ca β€” import a CA trusted to issue user (client) certificates. this is part of how client certificate authentication functions.
  • dsctl tls import-ca β€” import a CA or intermediate CA for signing this servers certificates (aka Server-Cert). you should import all the CA's in the chain as required. PEM bundles are accepted
  • dsctl tls import-server-cert β€” import a new Server-Cert after the csr has been signed from a CA.
  • dsctl tls import-server-key-cert β€” import a new key and Server-Cert after having been signed from a CA. this is used if you have an external csr tool or a service like lets encrypt that generates PEM keys externally.
  • dsctl tls remove-cert β€” delete a certificate from this database. this will remove it from acting as a CA, a client CA or the Server-Cert role.
  • dsctl tls export-cert β€” export a certificate to PEM or DER/Binary format. PEM format is the default

πŸ”₯ COMMAND dsctl tls list-ca πŸ”₯

usage: dsctl [-v] [-j] [instance] tls list-ca [-h]

πŸ”₯ COMMAND dsctl tls list-client-ca πŸ”₯

usage: dsctl [-v] [-j] [instance] tls list-client-ca [-h]

πŸ”₯ COMMAND dsctl tls show-server-cert πŸ”₯

usage: dsctl [-v] [-j] [instance] tls show-server-cert [-h] [--nickname NICKNAME]

✨ OPTIONS 'dsctl tls show-server-cert' ✨

  • --nickname NICKNAME β€” the nickname (friendly name) of the certificate to display if different than

πŸ”₯ COMMAND dsctl tls show-cert πŸ”₯

usage: dsctl [-v] [-j] [instance] tls show-cert [-h] nickname
  • nickname β€” the nickname (friendly name) of the certificate to display

πŸ”₯ COMMAND dsctl tls generate-server-cert-csr πŸ”₯

usage: dsctl [-v] [-j] [instance] tls generate-server-cert-csr [-h] [--subject SUBJECT] [--nickname NICKNAME] [alt_names ...]
  • alt_names β€” certificate requests subject alternative names. these are auto-detected if not provided

✨ OPTIONS 'dsctl tls generate-server-cert-csr' ✨

  • --subject SUBJECT, -s SUBJECT β€” certificate Subject field to use
  • --nickname NICKNAME β€” the name of the certificate if different than 'Server-Cert'

πŸ”₯ COMMAND dsctl tls import-client-ca πŸ”₯

usage: dsctl [-v] [-j] [instance] tls import-client-ca [-h] cert_path nickname
  • cert_path β€” the path to the x509 cert to import as a client trust root
  • nickname β€” the name of the certificate once imported

πŸ”₯ COMMAND dsctl tls import-ca πŸ”₯

usage: dsctl [-v] [-j] [instance] tls import-ca [-h] cert_path nickname [nickname ...]
  • cert_path β€” the path to the x509 cert to import as a server CA
  • nickname β€” the name of the certificate once imported

πŸ”₯ COMMAND dsctl tls import-server-cert πŸ”₯

usage: dsctl [-v] [-j] [instance] tls import-server-cert [-h] [--nickname NICKNAME] cert_path
  • cert_path β€” the path to the x509 cert to import as Server-Cert

✨ OPTIONS 'dsctl tls import-server-cert' ✨

  • --nickname NICKNAME β€” the name of the certificate, if you wanna call it something other than Server-Cert πŸ’…

πŸŽ€ COMMAND 'dsctl tls import-server-key-cert' πŸŽ€

usage: dsctl [-v] [-j] [instance] tls import-server-key-cert [-h] [--nickname NICKNAME] cert_path key_path
  • cert_path β€” the path to the x509 cert you're importing as Server-Cert πŸ¦‹
  • key_path β€” the path to the x509 key that goes with Server-Cert, like they're a matching set bestie πŸ’–

✨ OPTIONS 'dsctl tls import-server-key-cert' ✨

  • --nickname NICKNAME β€” the name of the certificate, if you want it to be something other than Server-Cert πŸŽ€

πŸ’€ COMMAND 'dsctl tls remove-cert' πŸ’€

usage: dsctl [-v] [-j] [instance] tls remove-cert [-h] nickname
  • nickname β€” the name of the certificate you want to delete. yes we're really doing this 😭

🌸 COMMAND 'dsctl tls export-cert' 🌸

usage: dsctl [-v] [-j] [instance] tls export-cert [-h] [--binary-format] [--output-file OUTPUT_FILE] nickname
  • nickname β€” the name of the certificate you want to export 🫢

✨ OPTIONS 'dsctl tls export-cert' ✨

  • --binary-format β€” export the certificate in DER/binary format, for when you're feeling raw and unfiltered πŸ”₯
  • --output-file OUTPUT_FILE β€” the name for the exported certificate. the default name is the certificate nickname with an extension of .pem or .crt β€” iconic default behaviour tbh πŸ‘‘

πŸ‘‘ COMMAND 'dsctl healthcheck' πŸ‘‘

usage: dsctl [instance] healthcheck [-h] [--list-checks] [--list-errors] [--dry-run] [--check CHECK [CHECK ...]] [--exclude-check EXCLUDE_CHECK [EXCLUDE_CHECK ...]]

✨ OPTIONS 'dsctl healthcheck' ✨

  • --list-checks β€” lists all the known checks, so you know what's on the menu πŸ“‹
  • --list-errors β€” lists all the known error codes ✨
  • --dry-run β€” doesn't actually run the check, just tells you what would have been done. window shopping, basically πŸ›οΈ
  • --check CHECK [CHECK ...] β€” the areas to check. you can get these from --list-checks. and here's the little trick: every element on the left of the colon (:) can be swapped out for an asterisk if there are multiple options on the right side available 🌟
  • --exclude-check EXCLUDE_CHECK [EXCLUDE_CHECK ...] β€” the areas to skip. also obtainable from --list-checks. same deal here β€” any element on the left of the colon (:) can be replaced with an asterisk if multiple options on the right are available 🚫

🧚 COMMAND 'dsctl get-nsstate' 🧚

usage: dsctl [instance] get-nsstate [-h] [--suffix SUFFIX] [--flip FLIP]

✨ OPTIONS 'dsctl get-nsstate' ✨

  • --suffix SUFFIX β€” the DN of the replication suffix to read the state from πŸ”
  • --flip FLIP β€” flips between Little/Big Endian. you might need this on certain architectures, so like… architecture-dependent bestie, don't @ me πŸ’…

🌈 COMMAND 'dsctl ldifgen' 🌈

okay bestie, this one is THE main character of the whole page. look at this:

usage: dsctl [-v] [-j] [instance] ldifgen [-h] {users,groups,cos-def,cos-template,roles,mod-load,nested} ...

seven whole little generators living inside it. obsessed. πŸ’–

πŸ’œ POSITIONAL ARGUMENTS 'dsctl ldifgen' πŸ’œ

  • dsctl ldifgen users β€” generates an LDIF stuffed with user entries πŸ§‘β€πŸ€β€πŸ§‘
  • dsctl ldifgen groups β€” generates an LDIF with groups and members πŸ«‚
  • dsctl ldifgen cos-def β€” generates an LDIF with a COS definition (that's classic, pointer, or indirect) ✨
  • dsctl ldifgen cos-template β€” generates an LDIF with a COS template πŸŽ€
  • dsctl ldifgen roles β€” generates an LDIF with a role entry (managed, filtered, or indirect) πŸ‘‘
  • dsctl ldifgen mod-load β€” generates an LDIF full of modify operations. this one is meant to be eaten by ldapmodify 🍽️
  • dsctl ldifgen nested β€” generates a heavily nested database LDIF in a cascading/fractal tree design. yes, fractal. it's giving recursion 🌳

πŸ¦‹ COMMAND 'dsctl ldifgen users' πŸ¦‹

usage: dsctl [-v] [-j] [instance] ldifgen users [-h] [--number NUMBER] [--suffix SUFFIX] [--parent PARENT] [--generic] [--start-idx START_IDX] [--rdn-cn] [--localize] [--ldif-file LDIF_FILE]

✨ OPTIONS 'dsctl ldifgen users' ✨

  • --number NUMBER β€” how many users to create πŸ”’
  • --suffix SUFFIX β€” the database suffix where the entries will get created πŸ—‚οΈ
  • --parent PARENT β€” the parent entry the user entries should be created under. if you don't specify one, they get scattered under random Organizational Units πŸ™ˆ
  • --generic β€” creates generic entries in the format of "uid=user####". these are also compatible with ldclt 🀝
  • --start-idx START_IDX β€” for generic LDIFs you can pick the starting index for the user entries. the default is "0" πŸ’…
  • --rdn-cn β€” uses the attribute "cn" as the RDN attribute in the DN instead of "uid" ✨
  • --localize β€” localizes the LDIF data 🌍
  • --ldif-file LDIF_FILE β€” the LDIF file name. default location is the server's LDIF directory, using the name ldifgen.ldif πŸ“„

πŸ“ COMMAND 'dsctl ldifgen groups' πŸ“

usage: dsctl [-v] [-j] [instance] ldifgen groups [-h] [--number NUMBER] [--suffix SUFFIX] [--parent PARENT] [--num-members NUM_MEMBERS] [--create-members] [--member-parent MEMBER_PARENT] [--member-attr MEMBER_ATTR] [--ldif-file LDIF_FILE] NAME
  • NAME β€” the group name 🏷️

✨ OPTIONS 'dsctl ldifgen groups' ✨

  • --number NUMBER β€” the number of groups to create πŸ”’
  • --suffix SUFFIX β€” the database suffix where the groups will be created πŸ—‚οΈ
  • --parent PARENT β€” the parent entry the group entries should be created under. if you don't specify one, the groups are stored under the suffix 🫢
  • --num-members NUM_MEMBERS β€” the number of members in the group. default is 10000 😳 yes, ten thousand
  • --create-members β€” actually creates those member user entries πŸ™Œ
  • --member-parent MEMBER_PARENT β€” the entry DN the members should be created under. the default is the suffix entry ✨
  • --member-attr MEMBER_ATTR β€” the membership attribute to use in the group. default is "uniquemember" πŸ’…
  • --ldif-file LDIF_FILE β€” the LDIF file name. default location is the server's LDIF directory, using the name ldifgen.ldif πŸ“„

🧁 COMMAND 'dsctl ldifgen cos-def' 🧁

usage: dsctl [-v] [-j] [instance] ldifgen cos-def [-h] [--type TYPE] [--parent PARENT] [--create-parent] [--cos-specifier COS_SPECIFIER] [--cos-template COS_TEMPLATE] [--cos-attr [COS_ATTR ...]] [--ldif-file LDIF_FILE] NAME
  • NAME β€” the COS definition name 🏷️

✨ OPTIONS 'dsctl ldifgen cos-def' ✨

  • --type TYPE β€” the COS definition type: "classic", "pointer", or "indirect" 🎭
  • --parent PARENT β€” the parent entry the COS definition should be created under 🌳
  • --create-parent β€” creates that parent entry πŸ‘Ά
  • --cos-specifier COS_SPECIFIER β€” used in a classic COS definition. this attribute lives in the user entry and decides which COS template gets used πŸ”
  • --cos-template COS_TEMPLATE β€” the DN of the COS template entry. only used for "classic" and "pointer" COS definitions ✨
  • --cos-attr [COS_ATTR ...] β€” a list of attributes defining which attribute the COS generates values for πŸ“‹
  • --ldif-file LDIF_FILE β€” the LDIF file name. default location is the server's LDIF directory, using the name ldifgen.ldif πŸ“„

πŸŽ€ COMMAND 'dsctl ldifgen cos-template' πŸŽ€

usage: dsctl [-v] [-j] [instance] ldifgen cos-template [-h] [--parent PARENT] [--create-parent] [--cos-priority COS_PRIORITY] [--cos-attr-val COS_ATTR_VAL] [--ldif-file LDIF_FILE] NAME
  • NAME β€” the COS template name 🏷️

✨ OPTIONS 'dsctl ldifgen cos-template' ✨

  • --parent PARENT β€” the DN of the entry to store the COS template entry under πŸ“‚
  • --create-parent β€” creates the parent entry πŸ‘Ά
  • --cos-priority COS_PRIORITY β€” sets the priority of this conflicting/competing COS template. drama between templates, basically πŸ’…
  • --cos-attr-val COS_ATTR_VAL β€” defines the attribute and the value that the template provides 🎁
  • --ldif-file LDIF_FILE β€” the LDIF file name. default location is the server's LDIF directory, using the name ldifgen.ldif πŸ“„

πŸ’œ COMMAND 'dsctl ldifgen roles' πŸ’œ

usage: dsctl [-v] [-j] [instance] ldifgen roles [-h] [--type TYPE] [--parent PARENT] [--create-parent] [--filter FILTER] [--role-dn [ROLE_DN ...]] [--ldif-file LDIF_FILE] NAME
  • NAME β€” the Role name 🏷️

✨ OPTIONS 'dsctl ldifgen roles' ✨

  • --type TYPE β€” the Role type: "managed", "filtered", or "nested" 🎭
  • --parent PARENT β€” the DN of the entry to store the Role entry under πŸ“‚
  • --create-parent β€” creates the parent entry πŸ‘Ά
  • --filter FILTER β€” a search filter for gathering Role members. required for a "filtered" role πŸ”
  • --role-dn [ROLE_DN ...] β€” a DN of a role entry that should be included in this role. used for "nested" roles only πŸͺ†
  • --ldif-file LDIF_FILE β€” the LDIF file name. default location is the server's LDIF directory, using the name ldifgen.ldif πŸ“„

πŸ’– COMMAND 'dsctl ldifgen mod-load' ✨

okay bestie, this one is the chaos gremlin of ldifgen β€” it generates an LDIF full of modify, add, delete and modrdn operations so you can stress-test your server with actual churn. it's giving "load test but make it messy" πŸ¦‹

usage: dsctl [-v] [-j] [instance] ldifgen mod-load [-h] [--create-users]
                                                   [--delete-users]
                                                   [--num-users
       NUM_USERS]
                                                   [--parent PARENT]
                                                   [--create-parent]
                                                   [--add-users
       ADD_USERS]
                                                   [--del-users
       DEL_USERS]
                                                   [--modrdn-users
       MODRDN_USERS]
                                                   [--mod-users
       MOD_USERS]
                                                   [--mod-attrs
       [MOD_ATTRS ...]]
                                                   [--randomize]
                                                   [--ldif-file
       LDIF_FILE]

🌸 OPTIONS 'dsctl ldifgen mod-load' πŸŽ€

  • --create-users β€” make the entries that are gonna get modified or deleted. by default the script just assumes those user entries already exist, so if they don't… nothing to play with πŸ™ˆ
  • --delete-users β€” yeet all the user entries at the end of the LDIF. cleanup era πŸ’…
  • --num-users NUM_USERS β€” how many user entries will be modified or deleted. the headcount, bestie
  • --parent PARENT β€” the DN of the parent entry where the user entries live. their home address 🏠
  • --create-parent β€” create the parent entry too. build the house first, then move in ✨
  • --add-users ADD_USERS β€” how many additional entries get added during the load
  • --del-users DEL_USERS β€” how many entries get deleted during the load
  • --modrdn-users MODRDN_USERS β€” how many entries get a modrdn operation performed on them. renaming arc πŸ‘‘
  • --mod-users MOD_USERS β€” how many entries get modified
  • --mod-attrs [MOD_ATTRS ...] β€” the list of attributes the script randomly picks from when modifying an entry. default is "description". you can pass a whole lil list here
  • --randomize β€” randomly perform the specified add, mod, delete, and modrdn operations. pure chaos, no notes πŸ’€
  • --ldif-file LDIF_FILE β€” the LDIF file name. default location is the server's LDIF directory using the name 'ldifgen.ldif'

🧚 COMMAND 'dsctl ldifgen nested' πŸ¦‹

nested time!! this generates a tree of user entries, split up under nodes/subtrees. very "directory within a directory" of it 🌈

usage: dsctl [-v] [-j] [instance] ldifgen nested [-h] [--num-users
       NUM_USERS]
                                                        [--node-limit
       NODE_LIMIT]
                                                        [--suffix SUFFIX]
                                                        [--ldif-file LDIF_FILE]

⭐ OPTIONS 'dsctl ldifgen nested' 🌸

  • --num-users NUM_USERS β€” the total number of user entries to create in the entire LDIF. ngl this one does not include the container entries, so the final count is bigger than this number. math is math πŸ’…
  • --node-limit NODE_LIMIT β€” the total number of user entries to create under each node/subtree. so yes, it multiplies. buckle up πŸŽ€
  • --suffix SUFFIX β€” the suffix DN for the LDIF
  • --ldif-file LDIF_FILE β€” the LDIF file name. default location is the server's LDIF directory using the name 'ldifgen.ldif'

πŸ’œ COMMAND 'dsctl dsrc' πŸ’…

the .dsrc era!! this command group reads and writes your .dsrc file (that's the lil config file the LDAP CLI tools use to remember your instance's settings so you don't have to type them every single time). it's giving quality-of-life, fr fr.

usage: dsctl [-v] [-j] [instance] dsrc [-h]
       {create,modify,delete,display,repl-mon} ...

🫢 POSITIONAL ARGUMENTS 'dsctl dsrc' ✨

  • dsctl dsrc create β€” generate the .dsrc file
  • dsctl dsrc modify β€” modify the .dsrc file
  • dsctl dsrc delete β€” delete instance configuration from the .dsrc file.
  • dsctl dsrc display β€” display the contents of the .dsrc file.
  • dsctl dsrc repl-mon β€” display the contents of the .dsrc file.
yes bestie, display and repl-mon both say "display the contents of the .dsrc file" in the original. i'm not fixing it, i'm not merging it, i'm just reporting the lore πŸ’€

🌈 COMMAND 'dsctl dsrc create' πŸŽ€

brand new .dsrc file, who dis. this one walks you through all the connection details πŸ’–

usage: dsctl [-v] [-j] [instance] dsrc create [-h] [--uri URI]
                                               [--basedn BASEDN]
                                               [--people-rdn PEOPLE_RDN]
                                               [--groups-rdn GROUPS_RDN]
                                               [--binddn BINDDN]
                                               [--saslmech SASLMECH]
                                               [--tls-cacertdir
       TLS_CACERTDIR]
                                               [--tls-cert TLS_CERT]
                                               [--tls-key TLS_KEY]
                                               [--tls-reqcert
       TLS_REQCERT]
                                               [--starttls] [--pwdfile
       PWDFILE]
                                               [--do-it]

✨ OPTIONS 'dsctl dsrc create' 🌸

  • --uri URI β€” the URI (LDAP URL) for the Directory Server instance. where your server lives, basically 🏠
  • --basedn BASEDN β€” the default database suffix
  • --people-rdn PEOPLE_RDN β€” set the RDN for the 'people' subtree. default is "ou=people"
  • --groups-rdn GROUPS_RDN β€” set the RDN for the 'groups' subtree. default is "ou=groups"
  • --binddn BINDDN β€” the default Bind DN used or authentication.
  • --saslmech SASLMECH β€” the SASL mechanism to use: PLAIN or EXTERNAL.
  • --tls-cacertdir TLS_CACERTDIR β€” the directory containing the Trusted Certificate Authority certificate.
  • --tls-cert TLS_CERT β€” the absolute file name to the server certificate.
  • --tls-key TLS_KEY β€” the absolute file name to the server certificate key.
  • --tls-reqcert TLS_REQCERT β€” request certificate strength: 'never', 'allow', 'hard'
  • --starttls β€” use startTLS for connection to the server. glow up your connection πŸ”’
  • --pwdfile PWDFILE β€” the absolute path to a file containing the Bind DN's password.
  • --do-it β€” create the file without any confirmation. no takebacks, bestie πŸ’…

πŸ¦‹ COMMAND 'dsctl dsrc modify' 🧚

same energy as create, except every argument is now optional-ish (they're wrapped in brackets) so you can just poke the one thing you wanna change. lowkey the superior workflow ⭐

usage: dsctl [-v] [-j] [instance] dsrc modify [-h] [--uri [URI]]
                                               [--basedn [BASEDN]]
                                               [--people-rdn
       [PEOPLE_RDN]]
                                               [--groups-rdn
       [GROUPS_RDN]]
                                               [--binddn [BINDDN]]
                                               [--saslmech [SASLMECH]]
                                               [--tls-cacertdir
       [TLS_CACERTDIR]]
                                               [--tls-cert [TLS_CERT]]
                                               [--tls-key [TLS_KEY]]
                                               [--tls-reqcert
       [TLS_REQCERT]]
                                               [--starttls]
       [--cancel-starttls]
                                               [--pwdfile [PWDFILE]]
       [--do-it]

πŸ’– OPTIONS 'dsctl dsrc modify' πŸ‘‘

  • --uri [URI] β€” the URI (LDAP URL) for the Directory Server instance.
  • --basedn [BASEDN] β€” the default database suffix.
  • --people-rdn [PEOPLE_RDN] β€” sets the RDN used for the 'people' container
  • --groups-rdn [GROUPS_RDN] β€” sets the RDN used for the 'groups' container
  • --binddn [BINDDN] β€” the default Bind DN used or authentication.
  • --saslmech [SASLMECH] β€” the SASL mechanism to use: PLAIN or EXTERNAL.
  • --tls-cacertdir [TLS_CACERTDIR] β€” the directory containing the Trusted Certificate Authority certificate.
  • --tls-cert [TLS_CERT] β€” the absolute file name to the server certificate.
  • --tls-key [TLS_KEY] β€” the absolute file name to the server certificate key.
  • --tls-reqcert [TLS_REQCERT] β€” request certificate strength: 'never', 'allow', 'hard'
  • --starttls β€” use startTLS for connection to the server. (no brackets on this one, it's a straight toggle πŸŽ€)
  • --cancel-starttls β€” do not use startTLS for connection to the server. the anti-starttls, if you will πŸ™ˆ
  • --pwdfile [PWDFILE] β€” the absolute path to a file containing the Bind DN's password.
  • --do-it β€” update the file without any confirmation. periodt.

πŸ’… COMMAND 'dsctl dsrc delete' 🌸

removing this instance's config from the .dsrc file. it's giving spring cleaning ✨

usage: dsctl [-v] [-j] [instance] dsrc delete [-h] [--do-it]

πŸŽ€ OPTIONS 'dsctl dsrc delete' πŸ’œ

  • --do-it β€” delete this instance's configuration from the .dsrc file.

🌟 COMMAND 'dsctl dsrc display' 🌈

just shows you what's inside your .dsrc file. no flags, no drama, pure vibes ✨

usage: dsctl [-v] [-j] [instance] dsrc display [-h]

πŸ”₯ COMMAND 'dsctl dsrc repl-mon' πŸ”₯

this is the replica-monitor corner of your .dsrc β€” you add and delete replica connections and host/port aliases here. very "keeping the family tree tidy" of it πŸ‘‘

usage: dsctl [-v] [-j] [instance] dsrc repl-mon [-h]
                                                 [--add-conn ADD_CONN
       [ADD_CONN ...]]
                                                 [--del-conn DEL_CONN
       [DEL_CONN ...]]
                                                 [--add-alias ADD_ALIAS
       [ADD_ALIAS ...]]
                                                 [--del-alias DEL_ALIAS
       [DEL_ALIAS ...]]

⭐ OPTIONS 'dsctl dsrc repl-mon' πŸ¦‹

  • --add-conn ADD_CONN [ADD_CONN ...] β€” add a replica connection: 'NAME:HOST:PORT:BINDDN:CREDENTIAL'. yes the whole thing, colons and all πŸ’…
  • --del-conn DEL_CONN [DEL_CONN ...] β€” delete a replica connection by its NAME
  • --add-alias ADD_ALIAS [ADD_ALIAS ...] β€” add a host/port alias: 'ALIAS_NAME:HOST:PORT'
  • --del-alias DEL_ALIAS [DEL_ALIAS ...] β€” delete a host/port alias by its ALIAS_NAME

πŸ¦‹ COMMAND 'dsctl cockpit' πŸŽ€

cockpit?? yes, the web console thing. this group flips the Cockpit socket on and off and fiddles with the firewall for the "cockpit" service. it's giving "dashboard era" πŸ’–

usage: dsctl [-v] [-j] [instance] cockpit [-h]
                               {enable,open-firewall,disable,close-firewall}
       ...

✨ POSITIONAL ARGUMENTS 'dsctl cockpit' 🌸

  • dsctl cockpit enable β€” enable the Cockpit socket
  • dsctl cockpit open-firewall β€” open the firewall for the "cockpit" service
  • dsctl cockpit disable β€” disable the Cockpit socket
  • dsctl cockpit close-firewall β€” remove the "cockpit" service from the firewall settings

πŸ’œ COMMAND 'dsctl cockpit enable' πŸŽ€

socket goes brrr. (in the good way). no options for this one, bestie ✨

usage: dsctl [-v] [-j] [instance] cockpit enable [-h]

πŸ”₯ COMMAND 'dsctl cockpit open-firewall' 🌈

let the outside world in, but politely, and only for one specific zone πŸ’…

usage: dsctl [-v] [-j] [instance] cockpit open-firewall [-h] [--zone
       ZONE]

⭐ OPTIONS 'dsctl cockpit open-firewall' πŸ¦‹

  • --zone ZONE β€” the firewall zone

🧚 COMMAND 'dsctl cockpit disable' 🌸

socket goes off. no options here either πŸŽ€

usage: dsctl [-v] [-j] [instance] cockpit disable [-h]

🌟 COMMAND 'dsctl cockpit close-firewall' πŸ’–

yeeting the "cockpit" service back out of the firewall settings. goodbye portal πŸšͺ✨

usage: dsctl [-v] [-j] [instance] cockpit close-firewall [-h]

πŸ‘‘ COMMAND 'dsctl dblib' πŸ’…

okay SO. this is the database library migration corner. your backend is either bdb (Berkeley DB) or lmdb, and this group moves you back and forth between them. huge glow-up potential, but also: read the warnings when they show up, bestie 😭

usage: dsctl [-v] [-j] [instance] dblib [-h] {bdb2mdb,mdb2bdb,cleanup}
       ...

🌈 POSITIONAL ARGUMENTS 'dsctl dblib' πŸ¦‹

  • dsctl dblib bdb2mdb β€” migrate bdb databases to lmdb
  • dsctl dblib mdb2bdb β€” migrate lmdb databases to bdb
  • dsctl dblib cleanup β€” remove migration ldif file and old database

⭐ COMMAND 'dsctl dblib bdb2mdb' πŸ”₯

the great migration. bdb in, lmdb out 🧚

usage: dsctl [-v] [-j] [instance] dblib bdb2mdb [-h] [--tmpdir TMPDIR]

πŸ’œ OPTIONS 'dsctl dblib bdb2mdb' 🌸

  • --tmpdir TMPDIR β€” ldif migration files directory path.

πŸŽ€ COMMAND 'dsctl dblib mdb2bdb' ✨

reverse uno card. lmdb in, bdb out πŸ¦‹

usage: dsctl [-v] [-j] [instance] dblib mdb2bdb [-h] [--tmpdir TMPDIR]

🌟 OPTIONS 'dsctl dblib mdb2bdb' 🌈

  • --tmpdir TMPDIR β€” ldif migration files directory path.

πŸ’– COMMAND 'dsctl dblib cleanup' 🧹

cleans up after the migration β€” the ldif file and the old database both get swept away. tidy queen behavior πŸ‘‘

usage: dsctl [-v] [-j] [instance] dblib cleanup [-h]

🫢 COMMAND 'dsctl thread-pool' 🌸

peek behind the curtain at the server's worker threads. no LDAP connection required for the status subcommand, which is genuinely so convenient fr fr πŸ’…

usage: dsctl [-v] [-j] [instance] thread-pool [-h] {status} ...

πŸ¦‹ POSITIONAL ARGUMENTS 'dsctl thread-pool' ⭐

  • dsctl thread-pool status β€” display pool gauges and per-worker activity without an LDAP connection

🧡 COMMAND dsctl thread-pool status

okay so this is the one you actually came here for bestie, the status check πŸ’… it shows you what the thread pool is doing right now, no cap:

usage: dsctl [-v] [-j] [instance] thread-pool status [-h] [--file FILE]

that's the whole shape of it β€” optional -v and -j up front, optional [instance], then thread-pool status, then -h for help or --file FILE if you wanna peek at a file instead of the live thing. iconic ✨


πŸŽ€ OPTIONS β€” dsctl thread-pool status

  • --file FILE β€” instead of reading the instance's live thread-pool status file, read this file instead. super handy for when the server went πŸ’€ and left you a crash file that got preserved as threadpool.YYYYMMDD-HHMMSS β€” you can still go back and read the receipts πŸ•΅οΈβ€β™€οΈβœ¨

✨ OPTIONS ✨

these ones are the general vibes for the whole dsctl situation, not just thread-pool stuff, iykyk:

  • -v, --verbose β€” show verbose operation tracing while the command runs. it's giving β€œtell me EVERYTHING that's happening” πŸ—£οΈ so you can watch it work step by step. main character behavior fr fr.
  • -j, --json β€” return the result in a JSON object. perfect for when you want to pipe it into something else and be all programmatic about it 🧚 lowkey the move for scripting bestie.
  • -l, --list β€” list the available Directory Server instances. your little roster of servers, all lined up like ✨attendees at the function✨ πŸ‘‘

heads up bestie πŸ’– -v and -j show up both here as global options and in the thread-pool status usage line, and --file is the status-specific one. don't mix 'em up β€” --file only means anything for reading a thread-pool status file. periodt.

πŸ‘‘ AUTHOR

"Red Hat, Inc., and William Brown" <389-devel@lists.fedoraproject.org>


and that's the whole page, bestie, we made it to the end and it ate πŸŒˆπŸ’… you now know more about dsctl than like 99% of people, fr fr. this whole thing shipped as lib389 3.3.1, dated 2026-09-11 πŸ—“οΈβœ¨ β€” go forth and wrangle your directory servers, you gorgeous genius πŸ«ΆπŸ’– no cap, obsessed with you. bye bestie! πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from