Chapter 13 Service Attribute Command Line Interfaces
This chapter describes the following commands:
psadmin list-attributes
Description
The list-attributes command will list the configuration attributes
for a specific Portal Server component.
Syntax
Long Format
psadmin list-attributes --adminuser uid --passwordfile password-filename [--portal portal-name] --component component-name [--consumerregistration] [--configuredproducer] [--debug] [--output output-filename]
Short Format
psadmin list-attributes -u uid -f password-filename [-p portal-name] --component component-name [--consumerregistration] [--configuredproducer] [--debug] [-O output-filename]
Options
The following options are required:
-
[--adminuser | -u] uid
-
Specifies the administrator's distinguished name (dn) or the user
identification name (uid).
-
[--passwordfile | -f] password-filename
-
Specifies the administrator's password in the password file.
-
[--component | -m] component-name
-
Specifies the component name. Valid names are: producer, consumer, desktop, mobilemail, mobilecalendar, mobileaddressbook, gateway, netlet, proxylet, netfile, and subscriptions.
The following options are optional:
-
[--portal | -p] portal-name
-
Specifies the portal name. The --portal option is
required when a portal-centric component attribute is being accessed. The following
components are portal-centric and you must provide the --portal option
for list, get, and set operations
while using the following components: desktop, producer, consumer, and subscriptions.
For all other components, do not use the -portal option since
they are common to all portals.
-
[--consumerregistration]
-
Specifies that the attributes of a producer's consumer registration
are listed instead of the attributes of a producer. This is used only when the component
is producer.
-
[--configuredproducer]
-
Specifies that the attributes of a consumer's configured producer
are listed instead of the attributes of a consumer. This is used only when the component
is consumer.
-
[--gateway-profile] gateway-profile-name
-
Specifies the gateway profile name. This is used only when the component
is gateway.
-
[--debug]
-
Specifies if debug mode is turned on.
-
[--output | -O] output-filename
-
Specifies if the output mode is used.
Examples
psadmin list-attributes -u amadmin -f password_file --component desktop
-p myPortal
psadmin get-attribute
Description
The get-attribute command gets the attribute value for a
specific component and attribute.
Syntax
Long Format
psadmin get-attribute --adminuser uid --passwordfile password-filename [--portal portal-name] --component component-name [--producer producer_id] [--registrationhandle handle] --attribute-name attribute-name [--dn dn] [--debug] [--output output-filename]
Short Format
psadmin get-attribute -u uid -f password-filename [-p portal-name] --component component-name [--producer producer-id]
[--registrationhandle handle] -a attribute-name [-d dn] [--debug] [-O output-filename]
Options
The following options are required:
-
[--adminuser | -u] uid
-
Specifies the administrator's distinguished name (dn) or the user
identification name (uid).
-
[--passwordfile | -f] password-filename
-
Specifies the administrator's password in the password file.
-
[--component | -m] component-name
-
Specifies the component name. Valid names are: producer, consumer, desktop, mobilemail, mobilecalendar, mobileaddressbook, gateway, netlet, proxylet, netfile, and subscriptions.
-
[--attribute-name | -a] attribute-name
-
Specifies the attribute name. For list of the attribute names for
a component, please run the command psadmin list-attributes --component component-name.
The following options are optional:
-
[--portal | -p] portal-name
-
Specifies the portal name. The --portal option is
required when a portal-centric component attribute is being accessed. The following
components are portal-centric and you must provide the --portal option
for list, get, and set operations
while using the following components: desktop, producer, consumer, and subscriptions.
For all other components, do not use the -portal option since
they are common to all portals.
-
[--producer] producer-ID
-
Specifies the producer id. This is the ID or the name of a producer
when the component is producer and it is the ID of a configured
producer when the component is consumer. This option is valid
only if the component is producer or consumer.
-
[--registrationhandle] handle
-
Specifies the registration handle of a producer's consumer registration.
The attribute of a producer's consumer registration is returned (not the attribute
of a producer itself). This option is valid only if the component is producer.
-
[--dn | -d]
-
Specifies the dn of the node. This must be an organization DN when
the component is consumer.
-
[--gateway-profile] gateway-profile-name
-
Specifies the gateway profile name. This is used only when the component
is gateway.
-
[--debug]
-
Specifies if debug mode is turned on.
-
[--output | -O] output-filename
-
Specifies if the output mode is used.
Example
psadmin get-attribute -u amadmin -f password-file --component desktop
-p myPortal --attribute-name AuthorizedAuthlessUserIds [uid=devauthlessanonymous,ou=People,o=DeveloperSample,dc=red,dc=iplanet,dc=com
|devauthlessanonymous, uid=authlessanonymous,ou=People,dc=red,dc=iplanet,dc=com |
authlessanonymous, uid=commauthlessanonymous,ou=People,o=CommunitySample,dc=red,dc=iplanet,dc=com
| commauthlessanonymous, uid=authlessenterprisesample,ou=People,o=EnterpriseSample,dc=red,dc=iplanet,dc=com
| authlessenterprisesample]
Successfully completed!
psadmin set-attribute
Description
The set-attribute command sets the attribute value for a
specific component and attribute.
Syntax
Long Format
set-attribute --adminuser uid --passwordfile password-filename [--portal portal-name] --component component-name [--producer producer-id] [--registrationhandle handle] --attribute-name attrribute-name [--dn dn] [--add add-values] [--remove remove-values] [--inherit]
set_values [--debug] [--output output-filename]
Short Format
set-attribute -u uid -f password-filename [-p portalName] --component component-name [--producer producer-id]
[--registrationhandle handle] -a attribute-name [-d dn] [-A add-values] [-E remove-values] [--inherit] set_values
[--debug] [-O output-filename]
Options
The following options are required:
-
[--adminuser | -u] uid
-
Specifies the administrator's distinguished name (dn) or the user
identification name (uid).
-
[--passwordfile | -f] password-filename
-
Specifies the administrator's password in the password file.
-
[--component | -m] component-name
-
Specifies the component name. Valid names are: producer, consumer, desktop, mobilemail, mobilecalendar, mobileaddressbook, gateway, netlet, proxylet, netfile, and subscriptions.
-
[--attribute-name | -a]
attribute-name
-
Specifies the attribute name. For list of the attribute names for
a component, please run the command psadmin list-attributes --component component-name.
The following is an operand:
-
set_values
-
A list of values to be set into the attribute. This can be specified
as '"v1" "v2"'. If the set_values operand is
used, the --inherit, --add, and --remove options
are not allowed. The set_values operand is used at the end of the
command.
The following options are optional:
-
[--portal | -p] portal-name
-
Specifies the portal name. The --portal option is
required when a portal-centric component attribute is being accessed. The following
components are portal-centric and you must provide the --portal option
for list, get, and set operations
while using the following components: desktop, producer, consumer, and subscriptions.
For all other components, do not use the -portal option since
they are common to all portals.
-
[--producer] producer-ID
-
Specifies the producer id. This is the ID or the name of a producer
when the component is producer and it is the ID of a configured
producer when the component is consumer. This option is valid
only if the component is producer or consumer.
-
[--registrationhandle] handle
-
Specifies the registration handle of a producer's consumer registration.
The attribute of a producer's consumer registration is modified (not the attribute
of a producer itself). This option is valid only if the component is producer.
-
[--dn | -d]
-
Specifies the dn of the node. This must be an organization DN when
the component is consumer.
-
[--inherit]
-
Specifies that the value should be inherited from parent. This option
can only be used for users. This option does not use any values. If the --inherit option is used, the --add option, the --remove option,
and the set_values operand are not allowed. The value is inherited
from the parent. The --inherit option is used only for user attribute.
-
[--gateway-profile] gateway-profile-name
-
Specifies the gateway profile name. This is used only when the component
is gateway.
-
[--add | -A] add-values
-
Specifies a list of values to add like '”value1“ “value2”'. If the add option is specified, the --inherit option and
the set_values operand are not allowed. The remove option is allowed,
but if it is not specified, the set is added to existing values. If the removed option
is specified, the result is that some values will be added and some values will be
removed. The options can be done in any order, but the operations are such that remove
done after add.
-
[--remove | -E] remove-values
-
Specifies a list of values to remove like '”value1“ “value2”'. If the --remove option is specified, the --inherit option and the set_values operand are not allowed. The --add option is allowed, but if it is not specified, the set is removed from
existing values. If the --add option is specified, some values are
added and some values are removed. The options can be done in any order, but the operations
are such that remove done after add.
-
[--debug]
-
Specifies if debug mode is turned on.
-
[--output | -O] output-filename
-
Specifies if the output mode is used.
Examples
Example for adding attributes:
psadmin set-attribute -u amadmin -f password-file --component desktop
-p myPortal --attribute-name AuthorizedAuthlessUserIds --add '"val1" "val2" "val3"'
3 values, val1, val2 and val3 will be added to the existing list
Example for removing attributes:
psadmin set-attribute -u amadmin -f password-file --component desktop
-p myPortal --attribute-name AuthorizedAuthlessUserIds --remove '"val1" "val2" "val3"'
The 3 values, val1, val2 and val3 will be removed from the existing
list.
Example for using the set_values operand:
psadmin set-attribute -u amadmin -f password-file --component desktop
-p myPortal --attribute-name AuthorizedAuthlessUserIds '"a1" "a2" "a3"'
The existing list will be replaced by 3 values, a1, a2 and a3.