Commadmin Command-Line Description
This page provides general information about how to use the commadmin command. It includes the following topics:
Execution Modes
The command line execution has three possible modes:
- Execute with options specified in a file
commadmin <object> <task> -i <inputfile>
Analyzes inputfile and executes it. The input file should be in the format Command File Format
- Immediate or shell execution
commadmin <object> <task> [<options>]
If all needed information is provided, the command will execute immediately.
- Interactive
commadmin <object> <task>
The command contains some, but not all of the required options for command execution. The administrator is queried for the remainder of the options and attributes.
Command results
When an operation succeeds, the following message appears:
OK
If a failure occurs, the following message appears:
FAIL
<message>
Where <message> displays the error text.
Command File Format
The options can be specified within a file, using the -i option.
Within the file, option names are separated from option values by white space. The option value begins with the first non-white space character and extends to the end-of-line character. Option sets are separated by blank lines.
The general syntax is:
<option name><white space>[option value, if any] <option name><white space>[option value, if any] ... <option name><white space>[option value, if any] <blank line> <option name><white space>[option value, if any] <option name><white space>[option value, if any] ... <option name><white space>[option value, if any]
The option value given in the command line becomes the default for each option set. Alternatively, these options can be specified for each option set. The value then overrides any default specified on the command line.
Following is an example of the format and syntax for the file specified by the -i option for the commadmin user create command.
l newuser1
F new
L user1
W secret
l newuser2
F new
L user2
W secret
l newuser3
F new
L user3
W secret
<and so forth...>
Mandatory commadmin Options
The following are the mandatory options used for authenticating the administrator or the user.
| Options | Description |
|---|---|
| -D userid | User ID used to bind to the directory. |
| -w password | Password used to authenticate the user ID to the directory. You may also specify password via a text file, password.txt. For example, if you specify -w mypassword.txt, and the content of the mypassword.txt file is secret, the commadmin utility takes the string secret as the password. Note that if you specify -w mypassword.txt, and the mypassword.txt file does not exist, the commadmin utility takes the string mypassword.txt itself as the password. |
| -n domain | The domain the administrator belongs to. (For more information, see the Note shown below this table.) |
| Configuring Delegated Administrator for Directory Access Through Access Manager (Legacy Mode) This note applies only if you choose to access the directory using Access Manager in Legacy mode when you first configure Delegated Administrator after installation. In this case, the Access Manager Host (-X), Access Manager Port (-p), and the default domain (-n) values are specified when you run the configuration program, config-commda, and stored in the cli-userprefs.properties file. If the -X, -p, and -n options are not specified at the time when a commadmin command is executed, their values are taken from the cli-userprefs.properties file. |

