Using Admin Tool Commands
The following sections describe the available commands. For each command, the synopsis and the descriptions of the options and operands observe the following typographical conventions:
Italicsindicate an option argument or operand that should be replaced by an actual value when you run the command.- Curly braces (
{ }) delimit a choice of options or operands where you must include one of the options or operands. The options or operands are separated by a vertical bar (|).- Square brackets (
[ ]) delimit an option or operand, or a choice of options or operands, that may be omitted.- Ellipses (
...) after an option or operand indicates that you may repeat the option or operand.Anything else is literal text that you must include when running the command.
add association
Adds an
Associationobject to the Registry.Synopsis
Description
The
add associationcommand adds anAssociationobject of the specified type to the Registry. You can use any of the following types:
AccessControlPolicyForAffiliatedWith(which has the subconceptsEmployeeOfandMemberOf)ContainsContentManagementServiceForEquivalentToExtendsExternallyLinksHasFederationMemberHasMemberImplementsInstanceOfInvocationControlFileFor(which has the subconceptsCatalogingControlFileForandValidationControlFileFor)OffersServiceOwnerOfRelatedToReplacesResponsibleForSubmitterOfSupersedesUsesOptions
Operands
Example
The following command (all on one line) creates a
RelatedTorelationship between the objects with the two specified URNs.admin> add association -type RelatedTo \ urn:uuid:ab80d8f7-3bea-4467-ad26-d04a40045446 \ urn:uuid:7a54bbca-2131-4a49-8ecc-e7b4ac86c4fdadd user
Adds a user to the Registry.
Synopsis
add user [-edit] [-loadfile] [-firstNamestring] [-lastNamestring] [-middleNamestring] [-aliasstring] [-keypassstring] [-post1.typestring] [-post1.citystring] [-post1.countrystring] [-post1.postalcodestring] [-post1.stateOrProvincestring] [-post1.streetstring] [-post1.streetNumberstring] [-post2.typestring] [-post2.citystring] [-post2.countrystring] [-post2.postalcodestring] [-post2.stateOrProvincestring] [-post2.streetstring] [-post2.streetNumberstring] [-post3.typestring] [-post3.citystring] [-post3.countrystring] [-post3.postalcodestring] [-post3.stateOrProvincestring] [-post3.streetstring] [-post3.streetNumberstring] [-telephone1.typestring] [-telephone1.areaCodestring] [-telephone1.countryCodestring] [-telephone1.extensionstring] [-telephone1.numberstring] [-telephone1.URLstring] [-telephone2.typestring] [-telephone2.areaCodestring] [-telephone2.countryCodestring] [-telephone2.extensionstring] [-telephone2.numberstring] [-telephone2.URLstring] [-telephone3.typestring] [-telephone3.areaCodestring] [-telephone3.countryCodestring] [-telephone3.extensionstring] [-telephone3.numberstring] [-telephone3.URLstring] [-email1.typestring] [-email1.addressstring] [-email2.typestring] [-email2.addressstring] [-email3.typestring] [-email3.addressstring]Description
The
add usercommand adds aUserobject. AUserobject contains at least onePostalAddress,TelephoneNumber, andEmailAddressobject. The information that you provide is checked for validity using the same criteria as when you add a new user using the Web Console or the JAXR API.Specify the information about the user either on the command line itself or by using the
-loadoption to specify a Java properties file with the information. The information options and the-loadoption are evaluated in the order they appear on the command line. For example, you can specify some properties on the command line, load others from a properties file, and then override information in the properties file with later command-line options.Specify at least one postal address, telephone number, and email address for the new user. You can specify up to three of each type. If you need more, you can add them later using the Web Console or JAXR.
When you specify a postal address, telephone number, or email address, you must provide a value for its type: for example,
-emailType OfficeEmail.You can use shorthand options (such as
-fn) on the command line for some of the common information that is required for every user, but you must use the longer form when providing the information in a properties file. For example, you can specify the user's first email address on the command line using either-email1.address,-emailAddress, oremail1.address=. Because there is only one option for the user's second email address, you must use-email2.addresson the command line andemail2.address=in a properties file.If you specify the
-editoption, the Admin Tool launches an editor so that you can edit the new user's information. See the option description for details.The properties files that you load with
-loador edit with-edituse the IS0-8859-1 charset, as do all Java properties files. See the documentation forjava.util.Properties.load(InputStream)for details on how to represent other characters not in ISO-8859-1 in properties files.Options
-editCauses the Admin Tool to launch an editor so that you can edit the new user's information. The tool launches the editor after evaluating the other command-line parameters, so editing starts with the result of evaluating any information specified on the command line or with a properties file. The editing program must terminate without error before the command can continue. (At the time of this writing, -edit currently works with emacsclient and the NetBeans command bin/runide.sh --open (but not very well), has not been shown to work with vi, and has not been tested on Windows.)
-loadSpecifies a Java properties file whose contents specify properties for the user. The property names are the same as those of the long form of the
-fn | -firstNameadd usercommand options (for example,lastNameandpost1.type).Specifies the first name of a user.
-ln | -lastNameSpecifies the last name of a user. A last name is required; it must be specified either on the command line or in a properties file.
-mn | -middleNameSpecifies the middle name of a user.
-aliasThe alias to use when accessing the user's certificate in the keystore.
-keypassThe password to use when accessing a user's certificate in the keystore.
-postalType | -post1.typeThe type of the first
-city | -post1.cityPostalAddress. The type is required; it must be specified either on the command line or in a properties file. It is an arbitrary string (for example,OfficeorHome).The city of the first
-country | -post1.countryPostalAddress.The country of the first
-postalcode | -postcode | -zip | -post1.postalcodePostalAddress.The postal code of the first
-stateOrProvince | -state | -province | -post1.stateOrProvincePostalAddress.The state or province of the first
-street | -post1.streetPostalAddress.The street name of the first
-streetNumber | -number | -post1.streetNumberPostalAddress. The street is required; it must be specified either on the command line or in a properties file.The street number of the first
-post2.typePostalAddress.The type of the second
-post2.cityPostalAddress. If a secondPostalAddressis specified, the type is required; it must be specified either on the command line or in a properties file. It is an arbitrary string (for example,OfficeorHome).The city of the second
-post2.countryPostalAddress.The country of the second
-post2.postalcodePostalAddress.The postal code of the second
-post2.stateOrProvincePostalAddress.The state or province of the second
-post2.streetPostalAddress.The street name of the second
-post2.streetNumberPostalAddress. If a secondPostalAddressis specified, the street is required; it must be specified either on the command line or in a properties file.The street number of the second
-post3.typePostalAddress.The type of the third
-post3.cityPostalAddress. If a thirdPostalAddressis specified, the type is required; it must be specified either on the command line or in a properties file. It is an arbitrary string (for example,OfficeorHome).The city of the third
-post3.countryPostalAddress.The country of the third
-post3.postalcodePostalAddress.The postal code of the third
-post3.stateOrProvincePostalAddress.The state or province of the third
-post3.streetPostalAddress.The street name of the third
-post3.streetNumberPostalAddress. If a thirdPostalAddressis specified, the street is required; it must be specified either on the command line or in a properties file.The street number of the third
-phoneType | -telephone1.typePostalAddress.The type of the first
-areaCode | -telephone1.areaCodeTelephoneNumber. The type is required; it must be specified either on the command line or in a properties file. It can have any of the following values:Beeper,FAX,HomePhone,MobilePhone, orOfficePhone.The area code of the first
-countryCode | -telephone1.countryCodeTelephoneNumber.The country code of the first
-extension | -telephone1.extensionTelephoneNumber.The extension of the first
-number | -telephone1.numberTelephoneNumber.The telephone number suffix, not including the country or area code, of the first
-URL | -telephone1.URLTelephoneNumber. The number is required; it must be specified either on the command line or in a properties file.The URL of the first
-telephone2.typeTelephoneNumber(the URL that can dial this number electronically).The type of the second
-telephone2.areaCodeTelephoneNumber. If a secondTelephoneNumberis specified, the type is required; it must be specified either on the command line or in a properties file. It can have any of the following values:Beeper,FAX,HomePhone,MobilePhone, orOfficePhone.The area code of the second
-telephone2.countryCodeTelephoneNumber.The country code of the second
-telephone2.extensionTelephoneNumber.The extension of the second
-telephone2.numberTelephoneNumber.The telephone number suffix, not including the country or area code, of the second
-telephone2.URLTelephoneNumber. If a secondTelephoneNumberis specified, the number is required; it must be specified either on the command line or in a properties file.The URL of the second
-telephone3.typeTelephoneNumber(the URL that can dial this number electronically).The type of the third
-telephone3.areaCodeTelephoneNumber. If a thirdTelephoneNumberis specified, the type is required; it must be specified either on the command line or in a properties file. It can have any of the following values:Beeper,FAX,HomePhone,MobilePhone, orOfficePhone.The area code of the third
-telephone3.countryCodeTelephoneNumber.The country code of the third
-telephone3.extensionTelephoneNumber.The extension of the third
-telephone3.numberTelephoneNumber.The telephone number suffix, not including the country or area code, of the third
-telephone3.URLTelephoneNumber. If a thirdTelephoneNumberis specified, the number is required; it must be specified either on the command line or in a properties file.The URL of the third
-emailType | -email1.typeTelephoneNumber(the URL that can dial this number electronically).The type of the first
-emailAddress | -email | -email1.addressEmailAddress. The type is required; it must be specified either on the command line or in a properties file. It can have either of the following values:HomeEmailorOfficeEmail.The first email address. The first email address is required.
-email2.typeThe type of the second
-email2.addressEmailAddress. If a secondEmailAddressis specified, the type is required; it must be specified either on the command line or in a properties file. It can have either of the following values:HomeEmailorOfficeEmail.The second email address.
-email3.typeThe type of the second
-email3.addressEmailAddress. If a thirdEmailAddressis specified, the type is required; it must be specified either on the command line or in a properties file. It can have either of the following values:HomeEmailorOfficeEmail.The third email address.
Examples
The following command loads the User properties from the file
JaneSmith.propertiesin the user's home directory.The following command (all on one line) specifies the minimum properties required to create a User.
admin> add user -ln Smith -postaltype Office \ -street "Smith Street" -phonetype Office \ -number 333-3333 -emailtype OfficeEmail \ -emailaddress JaneSmith@JaneSmith.comcd
Changes the
RegistryPackagelocation.Synopsis
Description
Change directory (metaphorically) to the
RegistryPackageat the specified path or with the specified URN.Change to a specified URN when there are multiple
RegistryPackageobjects with the same path (for the current locale).Operands
locatorThe path of names of registry objects from the root of the repository to an object in the repository, with each name preceded by a forward slash (
/).For example, the locator for the
userDataRegistryPackagethat is a member of theregistryRegistryPackage(which is not itself a member of anyRegistryPackage) is/registry/userData, and the locator for thefolder1RegistryPackagethat is a member of theuserDataRegistryPackageis/registry/userData/folder1.If you used the
-rootoption to specify theRegistryPackagelocator when you started the Admin Tool, the locator value is relative to that root.URNThe URN of the
RegistryPackage, which must be a URN starting withurn:.Examples
The following command changes the directory to the
RegistryPackagewith the URNurn:uuid:92d3fd01-a929-4eba-a5b4-a3f036733017.The following command changes the directory to the location
/registry/userData/myData.chown
Changes the owner of a
RegistryObject.Synopsis
Description
The
chowncommand changes the ownership of the objects selected with a precedingselectcommand to the user specified by either the URN or the reference to the user's URN when listed by a precedinguserscommand.Only a user with the role of administrator can execute this command successfully.
Operands
URNThe User specified by the URN.
%indexA numerical reference to a URN for a user listed in a preceding
userscommand.Examples
The following command changes the ownership of the selected objects to the user specified by the URN
urn:uuid:26aa17e6-d669-4775-bfe8-a3a484d3e079.The following command changes the ownership of the selected objects to the user with the number 2 in a preceding
userscommand.cp
Copies files and folders into the Registry.
Synopsis
Description
The
cpcommand copies files and folders into the Registry asRegistryPackageandExtrinsicObjectobjects, respectively.The local directory on the local file system from which to copy files and folders defaults to the current directory from which you started the Admin Tool. You can use the
-localdiroption to change the local directory when you start the Admin Tool, or you can use thelcdcommand to change it after the Admin Tool has started. You can get the absolute path of the current local directory using theshow localdircommand.The command is recursive. That is, if you specify a directory, the command copies all the files and folders under the directory.
Options
-ownerSets the owner of the copied registry objects to the user specified by the
-excludeURNor%indexargument. See the description of thechowncommand for a description of these arguments. You must have the role of administrator to specify an owner other than yourself.Copies all files except those whose names contain the specified pattern, where
patternis a pattern comprising literal characters and the special characters asterisk (*) (representing zero or more characters) and question mark (?) (representing one and only one character).You can specify this option more than once.
Operands
patternThe files or folders to be copied, specified by a pattern comprising literal characters and the special characters asterisk (
*) (representing zero or more characters) and question mark (?) (representing one and only one character). You can specify more than onepattern.Examples
The following command copies the directory
mydirto the Registry, to be owned by the user with the number 4 in a precedinguserscommand.The following command copies the directory
mydirto the Registry, excluding files and directories that end with the string.zor.c.echo
Echoes a string.
Synopsis
Description
The
echocommand echoes the specifiedstringto the output. It is most useful when you specify it in the-commandoption when you run the Admin Tool in batch mode.Operand
Example
The following command prints the date and the result of the
lscommand into a log file.help
Displays information about commands.
Synopsis
Description
The
helpcommand displays information about the available commands or a specified command.For commands with subcommands, such as
addandshow, thehelpcommand displays information about the subcommands.If you do not specify an argument, the
helpcommand displays usage information for all commands.Operand
Examples
The following command displays usage information for all commands.
The following command displays usage information for the
lcdcommand.The following command displays usage information for the
addsubcommands.lcd
Changes the current directory on the local file system.
Synopsis
Description
The
lcdcommand changes the current local directory on the local file system.If you do not specify an argument, the
lcdcommand changes the current directory to your default home directory.Operand
Examples
The following command changes the current local directory to the
/usr/sharedirectory.The following command changes the current local directory to your default home directory on the local file system.
ls
Lists the objects in the current
RegistryPackage.Synopsis
Description
The
lscommand lists the objects in the currentRegistryPackageor, when apatternorURNis provided, list the objects in the currentRegistryPackagewhose names (in the current locale) or unique identifiers matchpatternorURN.Operands
patternA pattern comprising literal characters and the special characters asterisk (
*) (representing zero or more characters) and question mark (?) (representing one and only one character). You can specify more than onepattern.URNA URN starting with
urn:, for example,urn:uuid:4a6741e7-4be1-4cfb-960a-e5520356c4fd. You can specify more than oneURN.Examples
The following command lists all the objects in the current
RegistryPackage.The following command lists all the objects whose name matches the pattern
urn:bird:poultry:chickenor whose ID isurn:bird:poultry:chicken.The following command lists all the objects whose name matches the pattern
*bird*. (It would also list the objects whose ID is*bird*, if*bird*were a valid ID.)The following command lists all the objects whose name matches the pattern
*bird*or whose name matches the patternurn:bird:poultry:chickenor whose ID isurn:bird:poultry:chicken.pwd
Displays the path to the current
RegistryPackage.Synopsis
Description
The
pwdcommand displays the path (or paths) to the currentRegistryPackageusing the best-matching names for the current locale. Also displays the locale for the path.Example
quit
Exits the Admin Tool.
Synopsis
Description
The
quitcommand exits the Admin Tool.Example
rm
Removes objects from a
RegistryPackage.Synopsis
Description
The
rmcommand removes the member objects of the currentRegistryPackagewhose names (in the current locale) match the patterns specified by apatternorURN.When a matching
RegistryObjectis a member of multipleRegistryPackageobjects, this command removes only the association between the currentRegistryPackageand the object. The object is removed from the Registry only when the removal of the association leaves the object with no association with any otherRegistryObject.When a matching member object is itself a
RegistryPackagethat contains other objects, neither the object nor the association between the currentRegistryPackageand the memberRegistryPackageis removed unless either the-ror the-doption is specified.When both the
-dand-roptions are specified, the-doption is applied recursively, so all objects that would be selected by-r(and their associations) are removed whether or not they have other associations.Options
-dRemoves the association between the current
-rRegistryPackageand the specifiedRegistryPackage. Removes the specifiedRegistryPackageonly if its only remaining associations are to its member objects. Member objects of the now-removedRegistryPackagethat are not anchored by being the target of otherHasMemberassociations are now accessible as members of the root of the Registry.Removes the specified
RegistryPackageobject and all its descendant objects (except when an object has other associations).Operands
patternA pattern comprising literal characters and the special characters asterisk (
*) (representing zero or more characters) and question mark (?) (representing one and only one character). You can specify more than onepattern.URNA URN starting with
urn:, for example,urn:uuid:4a6741e7-4be1-4cfb-960a-e5520356c4fd. You can specify more than oneURN.Examples
The following command removes all
RegistryPackageobjects containing the string "stat" and all their descendants.select
Executes an SQL
selectstatement.Synopsis
Description
The
selectcommand selects and lists the objects specified by evaluating the entire command as an SQL query. If no argument is specified, the command lists any objects selected by a precedingselectcommand.Operand
SQLAn SQL
selectstatement (without the leadingselectbecause that is already present as the name of the command).Examples
The following command lists all
ClassificationSchemeobjects in the Registry:set
Sets a property value.
Synopsis
Description
The
setcommand sets the value of a property of the Admin Tool shell.The tool supports the following properties and values.
set debug {true | on | yes | false | off | no}Enables or disables output of debugging messages.
set editorstringSets the command to use when the Admin Tool launches an interactive editor. The default value is
set verbose {true | on | yes | false | off | no}/bin/vion UNIX and Linux systems, and isnotepad.exeon Windows systems.Enables or disables output of more verbose messages when executing commands.
Operands
propertyOne of the following properties:
debug,editor,verbose.valueA supported value of the specified property. See the Description section for details.
Examples
The following command sets the editor to
/usr/bin/viinstead of the default/bin/vi.show
Displays a property value.
Synopsis
Description
The
showcommand displays the value of a property of the Admin Tool shell.If no argument is specified, the command displays the values of all properties.
The command supports the following properties:
debugWhether or not debugging output is enabled.
editorThe editor to use when the Admin Tool launches an interactive editor.
exceptionThe exception stack trace, if any, from the immediately preceding executed command.
localeThe current locale.
verboseWhether or not verbose output is enabled.
Operands
propertyThe property whose current value is to be displayed. The properties
exceptionandlocalecan be displayed, but you cannot use thesetcommand to set them.Example
The following command displays the exceptions from the previous command.
users
Lists the current
Userobjects.Synopsis
Description
The
userscommand lists theUserobjects currently in the Registry.The output has the following format:
In the output, the index is a numeric value that you can use, including the percent sign
(%), to refer to a user when you run thechownorcpcommand. Thelastnameandfirstnameare the first and last names of the user.Examples
The following command displays the current users:
admin> users %0: urn:uuid:2702f889-3ced-4d49-82d1-e4cd846cb9e4 user, test %1: urn:uuid:85428d8e-1bd5-473b-a8c8-b9d595f82728 Parker, Miles %2: urn:uuid:921284f0-bbed-4a4c-9342-ecaf0625f9d7 Operator, Registry %3: urn:uuid:977d9380-00e2-4ce8-9cdc-d8bf6a4157be Brown, Arthur %4: urn:uuid:abfa78d5-605e-4dbc-b9ee-a42e99d5f7cf Guest, Registry