Sun Java System Portal Server 7.2 Command-Line Reference

Multimode

psadmin supports multimode to allow executing subcommands in a batch file.

Long Format

psadmin multimode [--adminuser uid] [--passwordfile passwordfile] [--input filename]

Short Format

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 multi-mode 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

Prompt For Password

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.