This chapter describes the usage of psadmin command-line utility. All CLIs (Command-line Interface) are called from a single utility - psadmin. CLIs serve as one subcommand of psadmin.
This chapter describes the following topics.
Following options are provided with psadmin:
Prints a brief help page to the standard output. If no subcommand is present, a list of subcommands that are supported by psadmin is printed
Lists all subcommands that are supported by this component. Component name can be one of the following values: portal, desktop, logging, monitoring, portlet, rewriter, search, sra, ssoadapter, subscriptions, ubt, or wsrp. For example: psadmin --help component=portal
Following are the options common to all subcommands:
Prints specific psadmin subcommand help page. For example, psadmin list-portals --help.
Redirects output to the specified file. The flag is OFF by default, and the output is displayed in the console window.
The return value for psadmin is 0 if there is no error. Return value is 1 if there is error.
psadmin supports usage of the environment variables. The environment variables are defined with prefix string "PS_ADMIN_". For example, if a command has a required option "adminuser", users can set an environment variable, PS_ADMIN_ADMINUSER, with the adminuser value. Later, while executing the command, if this option is not presented, the value from the environment variable will be used.
psadmin supports multimode to allow executing subcommands in a batch file.
psadmin multimode [--adminuser uid] [--passwordfile passwordfile] [--input filename]
psadmin multimode [-u uid] [-f passwordfile] [-input filename]
If --adminuser and --passwordfile
are
given, the values will be saved in the environment variables, so that administrator
user and password file need not to be specified in the subcommands in the
input file. If --input is not specified, the command becomes
interactive and allows user to input the commands. The option --printprompt is used in a scripting environment, so that no output will be displayed.
The following example shows how to use the multimode in a script:
psadmin multimode -u amadmin -f passwordfile --printprompt=false --input=inputfile
Where input file will have:
set-attribute --portal portal_id -dn default_org -m desktop
set-attribute --portal portal_id --component desktop -attribute-name AuthorizedAuthlessUserIds --add authless_user_dn | authless_user_dn
set-attribute --portal portal_id --component desktop --attribute-name EnableAuthless true
set-attribute --portal portal_id --component desktop --attribute-name DefaultAuthlessUID authless_user_dn
Most of the psadmin subcommands requires --useradmin and --passwordfile options. For security reason, customers can choose not to specify the passwordfile, and psadmin will become interactive and prompt for the password.