![]() | |
Sun Java System Portal Server 6 2005Q1 Technical Reference Guide |
Chapter 12
dpadminThis chapter contains the following sections:
DescriptionThe dpadmin command enables display profile objects to be retrieved, added, modified, and removed from a display profile document by using the subcommands. All interactions with display profile objects must be in their native XML format. The dpadmin command can operate on a single display profile document only.
The dpadmin command requires:
- A subcommand (see Subcommands)
- A user distinguished name and password to access the directory server.
- A target display profile document. A distinguished name to identify the LDAP node or --global (-g) option for the global level display profile document.
SyntaxThis section describes the dpadmin command syntax. You cannot mix long-named options with short ones in one command line.
Short-Named Format
dpadmin list|merge|modify|add|remove [command-specific-options] -u uid -w password {-g|-d dn} [-l locale] [-r] [-b] [-V] [-h] [file]
dpadmin batch [-c] -f batch-script-filename [-l locale] [-b] [-h]
Long-Named Format
dpadmin list|merge|modify|add|remove [command-specific-options] --runasdn uid --password password {--global|--dn dn} [--locale locale] [--dryrun] [--verbose] [--version] [--help] [file]
dpadmin --version
dpadmin batch [--continue] --file batch-script-filename [--locale locale] [--verbose] [--help]
SubcommandsThe dpadmin command takes these subcommands:
list
Description
This subcommand retrieves the specified display profile node object from the specified display profile document. If no display profile node object is specified, the entire display profile document is retrieved. The display profile object is displayed in its native XML format on standard out.
The list subcommand takes these options:
- Administrator’s distinguished name and password for accessing the LDAP database. These options are required.
- Name of the display profile node object to display.
- Display profile node object to display defined by the -g or --global option for the global level node, or -d or --dn option with a specific non-global level node specified. The -g or -d option is required. In the absence of the command-specific -n or --name option, it displays the entire display profile document. The -g or --global option displays the entire root display profile document.
Syntax
dpadmin list -u|--runasdn uid -w|--password password {(-g|--global)|(-d|--dn dn)} [-n|--name name]
dpadmin list -h|--help
Options
The following table contains two columns: the first column lists the possible options, arguments or operands for the list subcommand; the second column gives a brief description. The following options are supported:
Examples
This example gets the named TemplateTableContainer from the dc=org,dc=com organization node and prints it to standard out.
dpadmin list -n TemplateTableContainer -u "uid=amAdmin,ou=people,dc=org,dc=com" -w joshua -d "dc=org,dc=com"
This example goes to the global level only to get mailcheck and if found, prints it to standard out.
dpadmin list -n mailcheck -u "uid=amAdmin,ou=people,dc=org,dc=com" -w joshua -g
This example gets the channel named Bookmark2 located in the container TemplateTableContainer and prints it to standard out.
dpadmin list -n TemplateTableContainer/Bookmark2 -u "uid=amAdmin,ou=people,dc=org,dc=com" -w joshua -d "dc=org,dc=com"
merge
Description
This subcommand retrieves and displays the merged result of the specified DP node objects. Objects are displayed in their native XML format. The object to be displayed is sent to standard out. If you do not use the -n or --name option, then an error is reported.
The merge command accepts the name argument to specify the fully-qualified name of the display profile container, channel, or provider object to display. If the name argument is absent, then the entire DP document is displayed. If the name argument does not identify a display profile node object, then an error is reported.
Note
The merge subcommand merely displays the merged view of the object and does not persist the result. The underlying data does not get affected by running this subcommand.
Syntax
dpadmin merge [-n|--name name] -u|--runasdn uid -w|--password password {(-g|--global)|(-d|--dn dn)}
Options
The following table contains two columns: the first column lists the possible options, arguments or operands for the list subcommand; the second column gives a brief description. The following options are supported:
Example
The following is the merged result of the Bookmark channel for the user hradmin who is assigned to the HR Role.
The output from the merge subcommand is comprised of an aggregated result, meaning that all DP objects that are available will be listed. For instance, properties such as GlobalThemes and locales are not specifically defined in Bookmark definition yet they show up in the output because these were merged in from one or more parent of the Bookmark channel.
modify
Description
This subcommand changes the value of an existing display profile object. The data that is supplied to the dpadmin modify command is either from one or more input files or from standard input (an XML fragment that follows the command).
This XML data always requires a proper XML header as well as a name that uniquely defines which display profile object is to be modified. An example of proper XML header is:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE DisplayProfile SYSTEM "jar://resources/psdp.dtd">
Subcommand Semantics
The semantics of the modify subcommand vary depending on the type of the display profile object being modified. When the combine option is specified, the new elements (like properties) in the display profile object are combined with the existing ones rather than replacing them. The variations of the modify subcommand are discussed below.
An entire display profile document can be changed to the new object value specified by using a file. When the combine option is specified, every display profile object in the display profile document is recursively combined. See the information below for how the combine option works for each display profile object.
A channel or container can be changed to the new object value. When modifying a channel or container, if the parent option is:
- Specified, the specified parent container is searched for a channel or container that matches the name of the new display profile object. If it is found, it is replaced by the new display profile object.
- Absent, the root display profile object is assumed to be the parent container. So the root is searched for a channel or container that matches the name of the new display profile object. If it is found, it is replaced with the new display profile object.
When the combine option is specified, the existing Properties, Available, and Selected objects are combined with the new display profile objects.
A display profile object’s properties can be changed to the new value. The parent option is required to modify a display profile object’s properties. A display profile node (either channel or container) or display profile provider object that matches the specified name is searched for under the specified parent. If found, the object’s properties object is replaced by the new display profile object. When the combine option is specified, the existing properties are combined with the new display profile object.
The Available or Selected list in a container can be replaced with the new display profile object. The parent option is required to modify display profile objects of this type. A display profile container that matches the parent name is searched for. Then the Selected or Available object is replaced by the new display profile object. When the combine option is specified, the existing Selected or Available object is combined with the new display profile object.
String, Boolean, Integer, Collection, or Locale
A String, Boolean, Integer, Collection, or Locale property in a display profile object can be replaced by new display profile object property.
If the parent option is specified, the display profile node (either a channel or container) or display profile provider (in that order) that matches the specified name is searched for. If found, a property that matches the name of the new property is searched for. If found, the property in the display profile object is replaced by new display profile object property.
If the parent option is absent, then the display profile root node is used and the property is replaced at the root node.
When the combine option is specified, the existing Collection or Locale object is combined with the new display profile object. The combine option is not supported for atomic display profile properties such as String, Boolean, and Integer.
The atomic display profile properties such as String, Boolean, and Integer need not be named. If unnamed, the name is assumed to be equal to the string representation of the value. For example, the following two display profile integer objects are equal:
<Integer value="3"/>
<Integer name="3" value="4"/>
An existing display profile Provider object can be replaced with the display profile provider of the same name. A display profile provider object that matches the name of the new display profile provider object is searched for under the root display profile node. If present, the new display profile provider object is inserted under the root display profile object, replacing the existing display profile provider of the same name. Since providers can only exist under the root node (the root node is an implicit container), the parent option must not be specified.
Subcommand Options
The modify subcommand takes these options:
- Administrator’s distinguished name and password for accessing the LDAP database by using the -u or --runasdn and -w or --password options respectively. These options are required.
- Display profile node object to modify defined by the -g or --global option for the global level node, or -d or --dn option with a specific non-global level node specified. The -g or -d option is required.
- Name of the file where the XML input is included. This argument is optional. When not used, XML input is expected from standard input.
- Fully qualified name of the parent of the display profile object to be modified.
- The option to perform a merge of display profile objects.
Syntax
dpadmin modify -u|--runasdn uid -w|--password password {(-g|--global)|(-d|--dn dn)} [-p|--parent parent] [-m|--combine] file|EOF
dpadmin modify -h|--help
Options
The following table contains two columns: the first column lists the possible options, arguments or operands for the modify subcommand; the second column gives a brief description. The following options are supported:
-b or --verbose
Specify this option to produce debugging messages.
-d or --dn
Specifies the distinguished name in the LDAP node to access the display profile document. The -d or -g option is required.
file
If present, the file argument must be the last argument on the command line. It specifies a path to an XML file that contains an XML fragment that conforms to the display profile DTD. If the file argument is absent from the modify subcommand, then input must be redirected into dpadmin from standard input.
-g or --global
Specifies the global level node in LDAP to access the display profile document. The -d or -g option is required.
-h or --help
Specify this option to dpadmin to print out a brief help page to standard output. If no subcommand is present, a generic help page for dpadmin is printed. If one of the dpadmin subcommands is present, then a brief help page that is specific to the subcommand is printed.
-l or --locale
Use this option to have all debug/error messages localized in the specified locale. If not specified, it defaults to system locale.
-m or --combine
Combines the specified display profile objects with the new display profile objects. The combine option can only be used with these display profile objects: Display Profile root, Channel, Container, Properties, Available, Selected, Collection, and Locale. This is an optional option.
-p or --parent
Specifies the fully qualified name of the parent of the display profile object to be modified. This is an optional option.
-r or --dryrun
Reports error or success of subcommand to sysout. Does not put the resulting changes of the subcommand in LDAP.
-u or --runasdn
Specifies the distinguished name of the user to use to bind to the Directory Server. This option is required.
-w or --password
Specifies the password of the distinguished name of the user used to bind to the Directory Server. This option is required.
Examples
In the following example, modify (replace) the channel named NewNews in the container TemplateTableContainer with value specified as XML text on standard input.
$ dpadmin modify -p TemplateTableContainer -u "uid=amAdmin,ou=people,dc=org,dc=com" -w joshua -d "dc=org,dc=com" <<EOF
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE DisplayProfile SYSTEM "jar://resources/psdp.dtd">
<Channel name="NewNews" provider="newsprovider">
<Properties>
<String name="title" value="News Channel"/>
<String name="description" value="This channel is all about news"/>
</Properties>
</Channel>
EOF
In this example, in the channel NewNews, replace the property named in the file farble.xml with the new object in farble.xml file.
dpadmin modify -p TemplateTableContainer/NewNews -u "uid=amAdmin,ou=people,dc=org,dc=com" -w joshua -d "dc=org,dc=com" farble.xml
The farble.xml file contains the following:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE DisplayProfile SYSTEM "jar://resources/psdp.dtd">
<String name="welcome" value="Hi, welcome to farble land!!!!"/>
In the following example, using the combine option, a new property named “msg2” is added to the collection named “bar”. Note that the existing property, “msg” still remains in the result.
dpadmin list -n TemplateTableContainer -u "uid=amAdmin,ou=people,dc=org,dc=comp" -w joshua -d "dc=org,dc=com"
...
<Collection name="news">
<Collection name="bar">
<String name="msg" value="hi"/>
</Collection>
</Collection>
...
$ dpadmin modify -p TemplateTableContainer -u "uid=amAdmin,dc=org,dc=com" -w joshua -d "dc=org,dc=com" -m <<EOF
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE DisplayProfile SYSTEM "jar://resources/psdp.dtd">
<Collection name="news">
<Collection name="bar">
<String name="msg2" value="woo hoo"/>
</Collection>
</Collection>
EOF
dpadmin list -n TemplateTableContainer -u "uid=amAdmin,dc=org,dc=com" -w joshua -d "dc=org,dc=com"
...
<Collection name="news">
<Collection name="bar">
<String name="msg" value="hi"/>
<String name="msg2" value="woo hoo"/>
</Collection>
</Collection>
...
In the following example, the value of “title” and “msg1” are replaced with the new values. Available and Selected have both had a Reference value added. The “news” collection has added “msg3”. This example shows that the -m or -combine option with the modify subcommand can be used to combine and replace as necessary.
dpadmin list -n test -u "uid=amAdmin,ou=people,dc=org,dc=com" -w joshua -d "dc=org,dc=com"
<Container name="test" provider="testprovider">
<Properties>
<String name="title" value="test"/>
</Properties>
<Available/>
<Selected/>
<Channels>
<Channel name="test1" provider="test1provider">
<Properties>
<Collection name="news">
<String name="msg1" value="blah"/>
<Collection name="bar">
<String name="msg2" value="hi"/>
</Collection>
</Collection>
</Properties>
</Channel>
</Channels>
</Container>
$ dpadmin modify -u "uid=amAdmin,ou=people,dc=org,dc=com" -w joshua -d "dc=org,dc=com" -m <<EOF
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE DisplayProfile SYSTEM "jar://resources/psdp.dtd">
<Container name="test" provider="testprovider">
<Properties>
<String name="title" value="Test Container"/>
</Properties>
<Available>
<Reference value="test1"/>
</Available>
<Selected>
<Reference value="test1"/>
</Selected>
<Channels>
<Channel name="test1" provider="test1provider">
<Properties>
<Collection name="news">
<String name="msg1" value="123"/>
<Collection name="bar">
<String name="msg3" value="123/>
</Collection>
</Collection>
</Properties>
</Channel>
</Channels>
</Container>
EOF
dpadmin list -n test -u "uid=amAdmin,ou=people,dc=org,dc=com" -w joshua -d "dc=org,dc=com"
<Container name="test" provider="testprovider">
<Properties>
<String name="title" value="Test Container"/>
</Properties>
<Available>
<Reference value="test1"/>
</Available>
<Selected>
<Reference value="test1"/>
</Selected>
<Channel name="test1" provider="test1provider">
<Properties>
<Collection name="news">
<String name="msg1" value="123"/>
<Collection name="bar">
<String name="msg2" value="hi"/>
<String name="msg3" value="123/>
</Collection>
</Collection>
</Properties>
</Channel>
</Channels>
</Container>
In the following example, the combine option is used to add conditional properties.
dpadmin list -n test -u "uid=amAdmin,ou=People,dc=iplanet,dc=com" -w joshua -d "dc=iplanet,dc=com"
<Channel name="test" provider="testprovider">
<Properties>
<Collection name="foo">
<String name="foo1" value="bar"/>
</Collection>
</Properties>
</Channel>
$ dpadmin modify -p test -u "uid=amAdmin,ou=People,dc=iplanet,dc=com" -w joshua -d "dc=iplanet,dc=com" -m <<EOF
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE DisplayProfile SYSTEM "jar://resources/psdp.dtd">
<ConditionalProperties condition="client" value="nokia">
<Collection name="foo">
<String name="foo1" value="nokia bar"/>
</Collection>
</ConditionalProperties>
EOF
dpadmin list -n test -u "uid=amAdmin,ou=People,dc=iplanet,dc=com" -w joshua -d "dc=iplanet,dc=com"
<Channel name="test" provider="testprovider">
<Properties>
<Collection name="foo">
<String name="foo1" value="bar"/>
</Collection>
<ConditionalProperties condition="client" value="nokia">
<Collection name="foo">
<String name="foo1" value="nokia bar"/>
</Collection>
</ConditionalProperties>
</Properties>
</Channel>
$ dpadmin modify -p test -u "uid=amAdmin,ou=People,dc=iplanet,dc=com" -w joshua -d "dc=iplanet,dc=com" -m <<EOF
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE DisplayProfile SYSTEM "jar://resources/psdp.dtd">
<ConditionalProperties condition="client" value="nokia">
<ConditionalProperties condition="locale" value="en">
<String name="abc" value="nokia en abc"/>
</ConditionalProperties>
</ConditionalProperties>
EOF
dpadmin list -n test -u "uid=amAdmin,ou=People,dc=iplanet,dc=com" -w joshua -d "dc=iplanet,dc=com"
<Channel name="test" provider="testprovider">
<Properties>
<Collection name="foo">
<String name="foo1" value="bar"/>
</Collection>
<ConditionalProperties condition="client" value="nokia">
<Collection name="foo">
<String name="foo1" value="nokia bar"/>
</Collection>
<ConditionalProperties condition="locale" value="en">
<String name="abc" value="nokia en abc"/>
</ConditionalProperties>
</ConditionalProperties>
</Properties>
</Channel>
add
Description
This subcommand adds a new display profile object to the display profile. This subcommand requires that the object to be added does not exist in the display profile. The add subcommand reads data for the new object from standard input or from one or more files specified as an argument to the command. Data for the new object must be XML and conform the Sun Java System Portal Server display profile DTD.
This XML data always requires a proper XML header as well as a name that uniquely defines which display profile object is to be modified. An example of proper XML header is:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE DisplayProfile SYSTEM "jar://resources/psdp.dtd">
Subcommand Semantics
The semantics of the add subcommand vary depending on the type of the display profile object being added. That is:
An entire display profile document can be added to the specified LDAP node. If the document already exists at the node, then an error is reported. The parent option must not be specified when adding a new display profile document.
A channel or container can be added. If the parent option is present, the parent display profile object is located for the given name and under that parent container, the specified Channel or Container is added. If the parent option is absent, the parent display profile object is assumed to be the root display profile object; so under root the specified Channel or Container, the object is added.
Because a properties bundle is required for all display profile nodes and display profile provider objects, they already exist and cannot be added. Use the modify subcommand.
Because Available and selected objects are required for a display profile container, they already exist and cannot be added. Use the modify subcommand.
String, Boolean, Integer, Collection, or Locale
The display profile object String, Boolean, Integer, Collection, or Locale properties can be added. The parent option must be specified to add display profile object properties of this type. Under the specified parent, a display profile node (either a channel or container) or display profile provider is searched for (in that order) that matches the name. If found, the given display profile property is added to the display profile node or display profile provider.
The atomic display profile properties such as String, Boolean, and Integer need not be named. If unnamed, the name is assumed to be equal to the string representation of the value.
A display profile provider is inserted under the root node. Because providers can only exist under the root node, do not use the parent option. If an object of the same name already exists, then an error is reported.
Subcommand Options
The add subcommand takes these options:
- Administrator’s distinguished name and password for accessing the LDAP database. These options are required.
- Display profile document to add or the display profile document where the object must be added (the -d or --dn option). The display profile object to add defined by the -g or --global option for the global level node. The -g or -d option is required.
- Name of the file where the XML input is included (the file argument).
- Fully qualified name of the parent where the display profile node object is to be added to (the -p or --parent option).
Syntax
dpadmin add -u|--runasdn uid -w|--password password {(-g|--global)|(-d|--dn dn)} [-p|--parent parent] file|<<EOF
dpadmin add -h|--help
Options
The following table contains two columns: the first column lists the possible options, arguments or operands for the add subcommand; the second column gives a brief description. The following options are supported:
-b or --verbose
Specify this option to produce debugging messages.
-d or --dn
Specifies the distinguished name in the LDAP node to access the display profile document. The -d or -g option is required.
file
If present, the file argument must also be the last argument on the command line. It specifies a path to an XML file that contains an XML fragment that conforms to the display profile DTD. If the file argument is absent for the add subcommand, then input must be redirected into dpadmin from standard input.
-g or --global
Specifies the global level node in LDAP to access the display profile document. The -d or -g option is required.
-h or --help
Specify this option to dpadmin to print out a brief help page to standard output. If no subcommand is present, a generic help page for dpadmin is printed. If one of the dpadmin subcommands is present, then a brief help page that is specific to the subcommand is printed.
-l or --locale
Use this option to have all debug/error messages localized in the specified locale. If not specified, it defaults to system locale.
-p or --parent
Specifies the fully qualified name of the parent of the display profile object to add.
-r or --dryrun
Reports error or success of subcommand to sysout. Does not put the resulting changes of the subcommand in LDAP.
-u or --runasdn
Specifies the distinguished name of the user to use to bind to the Directory Server. This option is required.
-w or --password
Specifies the password of the distinguished name of the user used to bind to the Directory Server. This option is required.
Example
In this example, the command adds the collection property named “zipCodes” specified on standard input to the channel named Postal in the container named SampleTabPanelContainer.
$ dpadmin add -p SampleTabPanelContainer/Postal -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua -d "o=sesta.com,o=isp" <<EOF
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE DisplayProfile SYSTEM "jar://resources/psdp.dtd">
<Collection name="zipCodes">
<Integer value="98012"/>
<Integer value="98036"/>
<Integer value="94025"/>
<Integer value="95112"/>
</Collection>
EOF
remove
Description
This subcommand removes an existing display profile object from the display profile. If the object to be removed does not exist in the specified display profile document, an error is reported. This subcommand takes type, parent, and name options.
The type option specifies the type of display profile object to remove. The parent option specifies the fully qualified name of the parent display profile object to remove the display profile object from. The parent display profile object type varies depending on the type of display profile object being removed. The name option specifies the name of the object to remove.
Subcommand Semantics
The semantics of the parent and name options vary depending on the type of display profile object being removed. The following table contains two columns: the first column lists the possible values for the type option; the second column gives a brief description of exactly what is removed.
root
Removes the entire display profile document from the LDAP node as specified by the distinguishedname option or global level display profile if -g | --global option is supplied. The name option is not needed when type=root.
channel
The name option is required. If the parent option is absent, then the parent container is assumed to be the root display profile node. Otherwise, the parent option is assumed to be the parent container name of the channel to remove. The name option specifies the name of the channel or container to remove.
provider
The parent option must not be specified since providers reside under the root display profile node. The name option is required and specifies the provider to remove.
property
The parent option specifies the fully-qualified name of the parent container, channel, or provider object to remove the property from. If the parent option is absent, then the root display profile node is assumed to be the parent object.
The name option specifies the name of the property to remove. If the name option is absent, an error is reported. For unnamed display profile properties, the name is equal to the string representation of the value.
available or selected
Both parent and name options are required. The parent option is assumed to name the parent container or channel object to remove the available (selected) reference from. The name option gives the value of the reference to be removed. If the name option is absent, then an error is reported.
Subcommand Options
The remove subcommand takes these options:
- Administrator’s distinguished name and password for accessing the LDAP database. These options are required.
- Name of the display profile node object to remove. This option is required except when type=root.
- Display profile document node in the LDAP database where the display profile document containing the object to be removed exists. Either the -d (--dn) or -g (--global) option is required.
- Type of display profile node object to remove. This option is required.
- Fully qualified name of the parent of the display profile node object to remove.
Syntax
dpadmin remove -u|--runasdn uid -w|--password password {(-g|--global)|(-d|--dn dn)} [-n|--name name] [-p|--parent parent] -t|--type type
dpadmin remove -h|--help
Options
The following table contains two columns: the first column lists the possible options, arguments or operands for the remove subcommand; the second column gives a brief description. The following options are supported:
-b or --verbose
Specify this option to produce debugging messages.
-d or --dn
Specifies the distinguished name in the LDAP node to access the display profile document. The -d or -g option is required.
-g or --global
Specifies the global level node in LDAP to access the display profile document. The -d or -g option is required.
-h or --help
Specify this option to dpadmin to print out a brief help page to standard output. If no subcommand is present, a generic help page for dpadmin is printed. If one of the dpadmin subcommands is present, then a brief help page that is specific to the subcommand is printed.
-l or --locale
Use this option to have all debug/error messages localized in the specified locale. If not specified, it defaults to system locale.
-n or --name
Specifies the display profile container, channel, or provider object to remove. This option is required except when type=root.
-p or --parent
Specifies the fully qualified name of the parent of the display profile object to remove.
-r or --dryrun
Reports error or success of subcommand to sysout. Does not put the resulting changes of the subcommand in LDAP.
-t or --type
Specifies the type of display profile object being removed. This option is required.
-u or --runasdn
Specifies the distinguished name of the user to use to bind to the Directory Server. This option is required.
-w or --password
Specifies the password of the distinguished name of the user used to bind to the Directory Server. This option is required.
Examples
In this example, the command removes the property named locations from the channel or container named Bookmarks.
dpadmin remove -t property -p Bookmarks -n locations -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua -d "o=sesta.com,o=isp"
Remove the provider pctest from the global display profile
dpadmin remove -t provider -n "pctest" -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua -g
In this example, the command removes the channel named Test that is in the parent container named TemplateTableContainer.
dpadmin remove --type channel --parent TemplateTableContainer --name "Test" --runasdn "uid=amAdmin,ou=people,o=sesta.com,o=isp" --password joshua --dn "o=sesta.com,o=isp"
In the following example, execute a sequence of remove subcommand to remove channel z.
dpadmin list -n X -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua -d "o=sesta.com,o=isp"
<Container name="X" ...>
<Channels>
<Container name="Y" ...>
<Channels>
<Channel name="z" .../>
</Channels>
</Container>
</Channels>
</Container>
$ dpadmin remove -t channel -p X -n Y/z -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua -d "o=sesta.com,o=isp"
$ dpadmin remove -t channel -p X/Y -n z -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua -d "o=sesta.com,o=isp"
$ dpadmin remove -t channel -n X/Y/z -u "uid=amAdmin,ou=people,o=sesta.com,o=isp" -w joshua -d "o=sesta.com,o=isp"
batch
Description
The batch subcommand enables the processing of multiple display profile commands in an optimized fashion. The subcommands are listed in a batch script file (required) and executed consecutively. If an error occurs, the default is to report the error and exit. The -c or --continue option denotes continuous processing mode. In this mode, if an error occurs, it is reported and the dpadmin command continues with the next subcommand.
Batch Script
The command batch scripts must be text (ASCII) documents and can contain any number of subcommands for input into dpadmin, except a batch subcommand. A subcommand must be entered on a single line (the new line character indicates the end of the command). For each subcommand, the administrator’s distinguished name and password must be specified in the command line. The syntax for the subcommand is exactly the same as if the subcommand was entered directly into a shell (without the dpadmin part). The script cannot contain XML, so subcommands that require XML input must have it in a file. If the distinguished name (or DN) contains space(s), use double-quotes around it.
In the example batch script file below, note that each command is on a single line.
add -p PostalMailer -u uid=amAdmin,ou=People,dc=iplanet,dc=com -w joshua -d dc=iplanet,dc=com zipCodes.xml
add -p PostalStamps -u uid=amAdmin,ou=People,dc=iplanet,dc=com -w joshua -d dc=iplanet,dc=com zipCodes.xml stampRates.xml
add -p PostalRates -d "cn=hr role,dc=iplanet,dc=com" zipCodes.xml stampRates.xml
Subcommand Options
The batch subcommand takes the following options:
Syntax
dpadmin batch [-c|--continue] -u|--runasdn uid -w|--password password -f|--file batch-script-file
dpadmin batch -h|--help
Options
The following table contains two columns: the first column lists the possible options, arguments or operands for the batch subcommand; the second column gives a brief description. The following options are supported:
-b or --verbose
Specify this option to produce debugging messages.
-c or --continue
Indicates a continuous operation mode. Errors are reported, but dpadmin continues with the next subcommand if this option is specified. By default, dpadmin exits after reporting an error.
-f or --file
Specifies the batch script file. This argument is required.
-h or --help
Specify this option to dpadmin to print out a brief help page to standard output. If no subcommand is present, a generic help page for dpadmin is printed. If one of the dpadmin subcommands is present, then a brief help page that is specific to the subcommand is printed.
-l or --locale
Use this option to have all debug/error messages localized in the specified locale. If not specified, it defaults to system locale.
-u or --runasdn
Specifies the distinguished name of the user to use to bind to the Directory Server. This is used with the list, modify, add, and remove subcommands only.
This option is optional. If specified, the distinguished name is used to authenticate throughout the batch process. In addition, each subcommand in the batch script can also have its own authentication which will override this distinguished name.
-w or --password
Specifies the password of the distinguished name of the user used to bind to the Directory Server. This option is optional. If specified, the distinguished name is used to authenticate throughout the batch process. In addition, each subcommand in the batch script can also have its own authentication which will override this password.
OptionsThe following table contains a summary of the dpadmin command options. The table contains two columns: the first column lists the possible options, arguments or operands; the second column gives a brief description. The following options are supported:
-V or --version
Specify this option to dpadmin to print descriptive information about the utility, such as its version, legal notices, and other similar information to standard output. Any subcommand and all other options are ignored when this option is present.
GuidelinesUse the following guidelines when running the dpadmin command to update the display profile:
- Make sure no other administrator is currently using the Access Manager software administration console or dpadmin command to make display profile modifications. Such a situation could cause changes to be lost, if you are running dpadmin modify, as there is no locking mechanism to prevent dpadmin and the administration console from accessing the display profile at the same time.
- The preferred sequence when using dpadmin is to put your modifications into a file as an XML “fragment” then run the dpadmin command with the appropriate subcommand. For example,
PortalServer-base/bin/dpadmin add -u uid -w password -d distinguishedname fragmentfile.xml
- If you edit a display profile document directly, first use the dpadmin command with the list subcommand to obtain the latest contents of the display profile, make your edits, then run the dpadmin command with the modify subcommand. For example,
PortalServer-base/bin/dpadmin list -u uid -w password -d distinguishedname > dp-org.xml
Edit the dp-org.xml file.
PortalServer-base/bin/dpadmin modify -u uid -w password -d distinguishedname dp-org.xml
Caution
Between the time you run the dpadmin list and dpadmin modify commands, do not change the display profile document in the LDAP server in any way (by using the administration console, dpadmin, or ldapmodify commands). Otherwise, those changes will be overwritten by the latest dpadmin modify command.