PingDirectory

Use dsconfig in non-interactive mode

Non-interactive command-line mode provides a simple way to make arbitrary changes to the server, and to use administrative scripts to automate configuration changes. To make changes to multiple configuration objects at the same time, use batch mode.

The general format for the non-interactive command line is:

$ bin/dsconfig --no-prompt {globalArgs} {subcommand} {subcommandArgs}

The --no-prompt argument specifies non-interactive mode. The {globalArgs} argument provides a set of arguments that specify how to connect and authenticate to the server. Global arguments can be standard LDAP connection parameters or SASL connection parameters depending on the implementation. The {subcommand} specifies which general action to perform. The following uses standard LDAP connections:

$ bin/dsconfig --no-prompt list-backends \
  --hostname server.example.com \
  --port 389 \
  --bindDN uid=admin,dc=example,dc=com \
  --bindPassword password

The following uses SASL GSSAPI (Kerberos) parameters:

$ bin/dsconfig --no-prompt list-backends \
  --saslOption mech=GSSAPI \
  --saslOption authid=admin@example.com \
  --saslOption ticketcache=/tmp/krb5cc_1313 \
  --saslOption useticketcache=true

The {subcommandArgs} argument contains a set of arguments specific to the particular task. To always display the advanced properties, use the --advanced command-line option.

Global arguments can appear anywhere on the command line. The subcommand-specific arguments can appear anywhere after the subcommand.