Command-Line Utilities for Managing Communities
This technical note describes the command-line utilities for managing
the Sun JavaTM System Portal Server software communities.
Technical Note Revision History
|
Version
|
Date
|
Description of Changes
|
|
10
|
June 2007
|
First release of this technical note.
|
list-communities
Description
Lists all communities.
Syntax
Long Format
psadmin list-communities --adminuser uid [--passwordfile password-filename] --portal portal-ID [--search search-pattern] [--verbose]
Short Format
psadmin list-communities -u uid [-f password-filename] -p portal-ID [-s search-pattern] -v
Options
The following options are required:
-
--adminuser | -u uid
-
Specifies the administrator's distinguished name.
-
--portal | -p portal-ID
-
Specifies the portal ID.
The following options are optional:
-
--passwordfile | -f password-filename
-
Specifies the administrator's password in a temporary password
file. The password file is used to fetch and present password for authentication.
-
--search | -s search-pattern
-
Specifies a pattern for searching communities. To search for
communities, you can use the wildcard character *. For
example, to search through all community names that begin with the letter C, the search pattern can be specified as C*.
-
--verbose | -v
-
Specifies community properties in output.
list-community-templates
Description
Lists all available community templates in the specified portal. The
community template ID is needed for creating a community.
Syntax
Long Format
psadmin list-community-templates --adminuser uid [--passwordfile password-filename] --portal portal-ID
Short Format
psadmin list-community-templates -u uid [-f password-filename] -p portal-ID
Options
The following options are required:
-
--adminuser | -u uid
-
Specifies the administrator's distinguished name.
-
--portal | -p portal-ID
-
Specifies a portal ID.
The following option is optional:
-
--passwordfile | -f password-filename
-
Specifies the administrator's password in a temporary password
file. The password file is used to fetch and present password for authentication.
list-community-dps
Description
Lists all community display profile names. The community display profile
name (such as owner or member) is required to get the community display profile
XML fragment.
Syntax
Long Format
psadmin list-community-dps --adminuser uid [--passwordfile password-filename] --portal portal-ID
Short Format
psadmin list-community-dps -u uid [-f password-filename] -p portal-ID
Options
The following options are required:
-
--adminuser | -u uid
-
Specifies the administrator's distinguished name.
-
--portal | -p portal-ID
-
Specifies a portal ID.
The following option is optional:
-
--passwordfile | -f password-filename
-
Specifies the administrator's password in a temporary password
file. The password file is used to fetch and present password for authentication.
create-community
Description
Creates a community.
Syntax
Long Format
psadmin create-community --adminuser uid [--passwordfile password-filename] --portal portal-ID --name community-name [--description community-description] --owner user-DN [--category community-category] --template community-template [--unlisted true|false] [--membershiprestricted true|false] [--secured true|false]
Short Format
psadmin create-community -u uid [-f password-filename] -p portal-ID -N community-name [-D community-description] -O user-DN -G search-category -T community-template [-U true|false]
[-R true|false] [-S true|false]
Options
The following options are required:
-
--adminuser | -u uid
-
Specifies the administrator's distinguished name.
-
--portal | -p portal-ID
-
Specifies a portal ID.
-
--name | -N community-name
-
Specifies a name for the community.
-
--owner | -O user-DN
-
Specifies the distinguished name of the owner of the community.
-
--template | -T community-template
-
Specifies a community template.
The following options are optional:
-
--category | -G search-category
-
Specifies the search category.
-
--description | -D community-description
-
Specifies a description of the community.
-
--passwordfile | -f password-filename
-
Specifies the administrator's password in a temporary password
file. The password file is used to fetch and present password for authentication.
-
--unlisted | -U true|false
-
Specifies whether or not a community is unlisted. If a community
is unlisted, the user will not be able to find it from their desktop. Values
can be true or false.
-
--membershiprestricted | -R true|false
-
Specifies whether or not the community membership is restricted.
Values can be true or false.
-
--secured | -S true|flase
-
Specifies whether or not a community is secured. Secured communities
are completely private and membership is by invitation only. The user cannot
send a request to join a secured community. Values can be true or false.
enable-community
Description
Enables the specified community.
Syntax
Long Format
psadmin enable-community --adminuser uid [--passwordfile password-filename] --portal portal-ID --name community-name
Short Format
psadmin enable-community -u uid [-f password-filename] -p portal-ID -N community-name
Options
The following options are required:
-
--adminuser | -u uid
-
Specifies the administrator's distinguished name.
-
--portal | -p portal-ID
-
Specifies the portal.
-
--name | -N community-name
-
Specifies the name of the community to enable.
The following option is optional:
-
--passwordfile | -f password-filename
-
Specifies the administrator's password in a temporary password
file. The password file is used to fetch and present password for authentication.
disable-community
Description
Disables the specified community.
Syntax
Long Format
psadmin disable-community --adminuser uid [--passwordfile password-filename] --portal portal-ID --name community-name
Short Format
psadmin disable-community -u uid [-f password-filename] -p portal-ID -N community-name
Options
The following options are required:
-
--adminuser | -u uid
-
Specifies the administrator's distinguished name.
-
--portal | -p portal-ID
-
Specifies the portal.
-
--name | -N community-name
-
Specifies the name of the community to disable.
The following option is optional:
-
--passwordfile | -f password-filename
-
Specifies the administrator's password in a temporary password
file. The password file is used to fetch and present password for authentication.
undelete-community
Description
Undeletes the specified community.
Syntax
Long Format
psadmin undelete-community --adminuser uid [--passwordfile password-filename] --portal portal-ID --name community-name
Short Format
psadmin undelete-community -u uid [-f password-filename] -p portal-ID -N community-name
Options
The following options are required:
-
--adminuser | -u uid
-
Specifies the administrator's distinguished name.
-
--portal | -p portal-ID
-
Specifies the portal.
-
--name | -N community-name
-
Specifies the name of the community to undelete.
The following option is optional:
-
--passwordfile | -f password-filename
-
Specifies the administrator's password in a temporary password
file. The password file is used to fetch and present password for authentication.
delete-community
Description
This command marks the specified community as deleted and only the administrator
can see the community.
Syntax
Long Format
psadmin delete-community --adminuser uid [--passwordfile password-filename] --portal portal-ID --name community-name
Short Format
psadmin delete-community -u uid [-f password-filename] -p portal-ID -N community-name
Options
The following options are required:
-
--adminuser | -u uid
-
Specifies the administrator's distinguished name.
-
--portal | -p portal-ID
-
Specifies the portal.
-
--name | -N community-name
-
Specifies the name of the community to delete.
The following option is optional:
-
--passwordfile | -f password-filename
-
Specifies the administrator's password in a temporary password
file. The password file is used to fetch and present password for authentication.
destroy-community
Description
Removes the specified community permanently.
Syntax
Long Format
psadmin destroy-community --adminuser uid [--passwordfile password-filename] --portal portal-ID --name community-name
Short Format
psadmin destroy-community -u uid [-f password-filename] -p portal-ID -N community-name
Options
The following options are required:
-
--adminuser | -u uid
-
Specifies the administrator's distinguished name.
-
--portal | -p portal-ID
-
Specifies the portal.
-
--name | -N community-name
-
Specifies the name of the community to remove.
The following option is optional:
-
--passwordfile | -f password-filename
-
Specifies the administrator's password in a temporary password
file. The password file is used to fetch and present password for authentication.
get-community
Description
Gets the description, owner, and category for the specified community.
Syntax
Long Format
psadmin get-community --adminuser uid [--passwordfile password-filename] --portal portal-ID --name community-name
Short Format
psadmin get-community -u uid [-f password-filename] -p portal-ID -N community-name
Options
The following options are required:
-
--adminuser | -u uid
-
Specifies the administrator's distinguished name.
-
--portal | -p portal-ID
-
Specifies the portal.
-
--name | -N community-name
-
Specifies the name of the community.
The following option is optional:
-
--passwordfile | -f password-filename
-
Specifies the administrator's password in a temporary password
file. The password file is used to fetch and present password for authentication.
get-community-dp
Description
Gets the community display profile XML fragment for the specified display
profile name (such as owner or member).
Syntax
Long Format
psadmin get-community-dp --adminuser uid [--passwordfile password-filename] --portal portal-ID --name community-name --dp dp-name
Short Format
psadmin get-community-dp -u uid [-f password-filename] -p portal-ID -N community-name -P dp-name
Options
The following options are required:
-
--adminuser | -u uid
-
Specifies the administrator's distinguished name.
-
--portal | -p portal-ID
-
Specifies the portal.
-
--name | -N community-name
-
Specifies the name of the community.
-
--dp | -P community-name
-
Specifies the display profile name (such as owner or member).
The following option is optional:
-
--passwordfile | -f password-filename
-
Specifies the administrator's password in a temporary password
file. The password file is used to fetch and present password for authentication.
modify-community
Description
Modifies the description, and category of the specified community.
Syntax
Long Format
psadmin modify-community --adminuser uid [--passwordfile password-filename] --portal portal-ID--name community-name [--newdescription community-description] [--newcategory community-category] [--newunlisted true|false]
[--newmembershiprestricted true|false]
Short Format
psadmin modify-community -u uid [-f password_filename] -p portal-ID -N community-name [-D community-description] [-G community-category] [-U true|false] [-R true|false]
Options
The following options are required:
-
--adminuser | -u uid
-
Specifies the administrator's distinguished name.
-
--portal | -p portal-ID
-
Specifies the portal ID.
-
--name | -N community-name
-
Specifies the name of the community to modify.
The following options are optional:
-
--passwordfile | -f password-filename
-
Specifies the administrator's password in a temporary password
file. The password file is used to fetch and present password for authentication.
-
--newdescription | -D new-description
-
Specifies a new description for the specified community.
-
--newcategory | -G new-category
-
Specifies the new search category for the specified community.
-
--newunlisted | -U true|false
-
Specifies whether or not the community is unlisted. If a community
is unlisted, the user will not be able to find it from their desktop. Values
can be true or false.
-
--newmembershiprestricted | -R true|false
-
Specifies whether or not the community membership is restricted.
Values can be true or false.
list-community-users
Description
Lists the members of the specified community.
Syntax
Long Format
psadmin list-community-users --adminuser uid [--passwordfile password-filename] --portal portal-ID --name community-name
Short Format
psadmin list-community-users -u uid [-f password-filename] -p portal-ID -N community-name
Options
The following options are required:
-
--adminuser | -u uid
-
Specifies the administrator's distinguished name.
-
--portal | -p portal-ID
-
Specifies a portal ID.
-
--name | -N community-name
-
Specifies the name of the community.
The following option is optional:
-
--passwordfile | -f password-filename
-
Specifies the administrator's password in a temporary password
file. The password file is used to fetch and present password for authentication.
list-community-pending-users
Description
Lists the users awaiting membership approval to a community.
Syntax
Long Format
psadmin list-community-pending-users --adminuser uid [--passwordfile password-filename] --portal portal-ID --name community-name
Short Format
psadmin list-community-pending-users -u uid [-f password-filename] -p portal-ID -N community-name
Options
The following options are required:
-
--adminuser | -u uid
-
Specifies the administrator's distinguished name.
-
--portal | -p portal-ID
-
Specifies a portal ID.
-
--name | -N community-name
-
Specifies the name of the community.
The following option is optional:
-
--passwordfile | -f password-filename
-
Specifies the administrator's password in a temporary password
file. The password file is used to fetch and present password for authentication.
add-community-users
Description
Adds users to the specified community.
Syntax
Long Format
psadmin add-community-users --adminuser uid [--passwordfile password-filename] --portal portal-ID--name community-name [--user user-DN]
[--users userDN-list]
[--search search-pattern]
[--dryrun]
Short Format
psadmin add-community-users -u uid [-f password-filename] -p portal-ID -N community-name [-y user-DN] [-Y userDN-list] [-s search-pattern]
[-n]
Options
The following options are required:
-
--adminuser | -u uid
-
Specifies the administrator's distinguished name.
-
--portal | -p portal-ID
-
Specifies the portal.
-
--name | -N community-name
-
Specifies the name of the community.
The following options are optional:
-
--passwordfile | -f password-filename
-
Specifies the administrator's password in a temporary password
file. The password file is used to fetch and present password for authentication.
-
--user | -y userDN
-
Specifies the distinguished name of the user to add.
-
--users | -Y userDN-list
-
Specifies a pattern to search for distinguished name of users
to add. The search pattern is a regular expression for directory node search.
-
--search | -s search-pattern
-
Specifies a pattern for searching distinguished name of users.
-
--dryrun | -n true|false
-
Performs a dry run, typically, for testing the search pattern.
Values can be true or false.
remove-community-users
Description
Deletes users from the specified community.
Syntax
Long Format
psadmin remove-community-users --adminuser uid [--passwordfile password-filename] --portal portal-ID --name community-name [--user user-DN] [--users userDN-list]
[--search search-pattern]
[--dryrun]
Short Format
psadmin remove-community-users -u uid [-f password-filename] -p portal-ID -N community-name [-y user-DN] [-Y userDN-list] [-s search-pattern] [-n]
Options
The following options are required:
-
--adminuser | -u uid
-
Specifies the administrator's distinguished name.
-
--portal | -p portal-ID
-
Specifies the portal.
-
--name | -N community-name
-
Specifies the name of the community.
The following options are optional:
-
--passwordfile | -f password-filename
-
Specifies the administrator's password in a temporary password
file. The password file is used to fetch and present password for authentication.
-
--user | -y user-DN
-
Specifies the distinguished name of the community user to
remove.
-
--users | -Y userDN-list
-
Specifies a list of distinguished name of users.
-
--search | -s search-pattern
-
Specifies a pattern to search for distinguished name of users
to remove. The search pattern is a regular expression for directory node search.
-
--dryrun | -n
-
Performs a dry run, typically, for testing the search pattern.
approve-community-users
Description
Approves community membership requests from users.
Syntax
Long Format
psadmin approve-community-users --adminuser uid [--passwordfile password-filename] --portal portal-ID --name community-name [--user user-DN] [--users userDN-list]
[--search search-pattern]
[--dryrun]
Short Format
psadmin approve-community-users -u uid [-f password-filename] -p portal-ID -N community-name [-y userDN] [-Y userDN-list] [-s search-pattern]
[-n]
Options
The following options are required:
-
--adminuser | -u uid
-
Specifies the administrator's distinguished name.
-
--portal | -p portal-ID
-
Specifies the portal.
-
--name | -N community-name
-
Specifies the name of the community.
The following option is optional:
-
--passwordfile | -f password-filename
-
Specifies the administrator's password in a temporary password
file. The password file is used to fetch and present password for authentication.
-
--user | -y userDN
-
Specifies the distinguished name of the user.
-
--users | -Y userDN-list
-
Specifies the distinguished name of a list of users.
-
--search | -s search-pattern
-
Specifies a pattern to search for distinguished name of users.
The search pattern is a regular expression for directory node search.
-
--dryrun | -n
-
Performs a dry run, typically, for testing the search pattern.
deny-community-users
Description
Denies membership requests from users to the specified community.
Syntax
Long Format
psadmin deny-community-users --adminuser uid [--passwordfile password-filename] --portal portal-ID --name community-name [--user userDN]
[--users userDN-list [--search search-pattern]
[--dryrun]
Short Format
psadmin deny-community-users -u uid [-f password-filename] -p portal-ID -N community-name [-y userDN] [-Y userDN-list] [-s search-pattern]
[-n]
Options
The following options are required:
-
--adminuser | -u uid
-
Specifies the administrator's distinguished name.
-
--portal | -p portal-ID
-
Specifies the portal.
-
--name | -N community-name
-
Specifies the name of the community.
The following options are optional:
-
--passwordfile | -f password-filename
-
Specifies the administrator's password in a temporary password
file. The password file is used to fetch and present password for authentication.
-
--user | -y user-DN
-
Specifies the distinguished name of the user.
-
--users | -Y userDN-list
-
Specifies the distinguished name of a list of users.
-
--search | -s search-pattern
-
Specifies a pattern to search for distinguished name of users.
The search pattern is a regular expression for directory node search.
-
--dryrun
-
Performs a dry run, typically, for testing the search pattern.
ban-community-users
Description
Ban users from the specified community. Banned users cannot see the
content of the community.
Syntax
Long Format
psadmin ban-community-users --adminuser uid [--passwordfile password-filename] --portal portal-ID --name community-name [--user user-DN]
[--search search-pattern]
[--dryrun]
Short Format
psadmin ban-community-users -u uid [-f password-filename] -p portal-ID -N community-name [-y user-DN] [-Y userDN-list] [-s search-pattern]
[-n]
Options
The following options are required:
-
--adminuser | -u uid
-
Specifies the administrator's distinguished name.
-
--portal | -p portal-ID
-
Specifies the portal.
-
--name | -N community-name
-
Specifies the name of the community.
The following options are optional:
-
--passwordfile | -f password-filename
-
Specifies the administrator's password in a temporary password
file. The password file is used to fetch and present password for authentication.
-
--user | -y user-DN
-
Specifies the distinguished name of the user to ban.
-
--users | -Y userDN-list
-
Specifies the distinguished name of a list of users.
-
--search | -s search-pattern
-
Specifies a pattern to search for distinguished name of users.
The search pattern is a regular expression for directory node search.
-
--dryrun | -n
-
Performs a dry run, typically, for testing the search pattern.
unban-community-users
Description
Removes the ban for users from joining the specified community.
Syntax
Long Format
psadmin unban-community-users --adminuser uid [--passwordfile password-filename] --portal portal-ID --name community-name [--user userDN] [--users userDN-list]
[--search search-pattern]
[--dryrun]
Short Format
psadmin unban-community-users -u uid [-f password-filename] -p portal-ID -N community-name [-y userDN] [-Y userDN-list] [-s search-pattern]
[-n]
Options
The following options are required:
-
--adminuser | -u uid
-
Specifies the administrator's distinguished name.
-
--portal | -p portal-ID
-
Specifies the portal.
-
--name | -N community-name
-
Specifies the name of the community.
The following option is optional:
-
--passwordfile | -f password-filename
-
Specifies the administrator's password in a temporary password
file. The password file is used to fetch and present password for authentication.
-
--user | -y user-DN
-
Specifies the distinguished name of the user to ban.
-
--users | -Y userDN-list
-
Specifies the distinguished name of a list of users.
-
--search | -s search-pattern
-
Specifies a pattern to search for distinguished name of users.
The search pattern is a regular expression for directory node search.
-
--dryrun
-
Performs a dry run, typically, for testing the search pattern.
add-community-owners
Description
Add owners to the specified community.
Syntax
Long Format
psadmin add-community-owners --adminuser uid [--passwordfile password-filename] --portal portal-ID --name community-name [--user userDN]
[--users userDN-list]
[--search search-pattern]
[--dryrun]
Short Format
psadmin make-community-owners -u uid [-f password-filename] -p portal-ID -N community-name [-y userDN] [-Y userDN-list] [-s search-pattern]
[-n]
Options
The following options are required:
-
--adminuser | -u uid
-
Specifies the administrator's distinguished name.
-
--portal | -p portal-ID
-
Specifies the portal.
-
--name | -N community-name
-
Specifies the name of the community.
The following options are optional:
-
--passwordfile | -f password-filename
-
Specifies the administrator's password in a temporary password
file. The password file is used to fetch and present password for authentication.
-
--user | -y user-DN
-
Specifies the distinguished name of the user to add.
-
--users | -Y userDN-list
-
Specifies the distinguished name of a list of users.
-
--search | -s search-pattern
-
Specifies a pattern to search for distinguished name of users.
The search pattern is a regular expression for directory node search.
-
--dryrun | -n
-
Performs a dry run, typically, for testing the search pattern.
remove-community-owners
Description
Removes the specified community owners. If you remove the owner role
from a user, the user is still a member.
Syntax
Long Format
psadmin remove-community-owners --adminuser uid [--passwordfile password-filename] --portal portal-ID --name community-name [--user userDN] [--users userDN-list]
[--search search-pattern]
[--dryrun]
Short Format
psadmin remove-community-owners -u uid [-f password-filename] -p portal-ID -N community-name [-y userDN] [-Y userDN-list] [-s search-pattern]
[--dryrun]
Options
The following options are required:
-
--adminuser | -u uid
-
Specifies the administrator's distinguished name.
-
--portal | -p portal-ID
-
Specifies the portal.
-
--name | -N community-name
-
Specifies the name of the community.
The following options are optional:
-
--passwordfile | -f password-filename
-
Specifies the administrator's password in a temporary password
file. The password file is used to fetch and present password for authentication.
-
--user | -y user-DN
-
Specifies the distinguished name of the user to add.
-
--users | -Y userDN-list
-
Specifies the distinguished name of a list of users.
-
--search | -s search-pattern
-
Specifies a pattern to search for distinguished name of users.
The search pattern is a regular expression for directory node search.
-
--dryrun | -n
-
Performs a dry run, typically, for testing the search pattern.
Accessing Sun Resources
Online
The docs.sun.comSM web site enables you to access Sun technical documentation
online. You can browse the docs.sun.com archive or search for a specific book
title or subject. Books are available as online files in PDF and HTML formats.
Both formats are readable by assistive technologies for users with disabilities.
To access the following Sun resources, go to http://www.sun.com:
-
Downloads of Sun products
-
Services and solutions
-
Support (including patches and updates)
-
Training
-
Research
-
Communities (for example, Sun Developer Network)
Third-Party Web Site References
Third-party URLs are referenced in this document and provide additional,
related information.
Note –
Sun is not responsible for the availability of third-party web
sites mentioned in this document. Sun does not endorse and is not responsible
or liable for any content, advertising, products, or other materials that
are available on or through such sites or resources. Sun will not be responsible
or liable for any actual or alleged damage or loss caused or alleged to be
caused by or in connection with use of or reliance on any such content, goods,
or services that are available on or through such sites or resources.
Sun Welcomes Your Comments
Sun is interested in improving its documentation and welcomes your comments
and suggestions. To share your comments, go to http://docs.sun.com and click Send Comments. In the online form, provide the
full document title and part number. The part number is a 7-digit or 9-digit
number that can be found on the book's title page or in the document's URL.
For example, the part number of this book is 819-7602.