Invoking the psmgr Utility

There are two ways that you can run the psmgr utility. You can run the utility interactively, or you can run it in batch mode with an input file.

Running psmgr Interactively

In interactive mode, psmgr will accept either a full command or a partial command. For example, if you enter add, psmgr will prompt you one line at a time for information to add the user: the user ID, their password (twice to verify it), privilege, expiration time, and so forth, until all necessary information to add a user is collected. You can also enter the first few arguments. For example, enter add smith abc123 abc123, and the utility will prompt you for values for the remaining arguments.
The commands and arguments are positional and when entered, must be separated by blank spaces. If you specify an insufficient number of arguments, the utility prompts you for the remaining arguments. Two commands, ADD and GROUPMEM, have optional arguments. An optional argument is an argument that is not required to add a user or a group membership to SPD Server. An optional argument either has a default value, if a value is not specified, or the argument represents a useful attribute that can be added later, or not at all. An example of an optional argument is the ADD command’s ip-address argument.
Optional arguments are indicated in the syntax as follows:
 [argument-value | - ]
When using psmgr interactively, you can avoid entering a value for an optional argument in one of two ways:
  • If you are skipping a single argument, enter a carriage return in place of the argument value.
  • If you are skipping multiple arguments, enter a hyphen or minus “–” sign for each argument value. SPD Server either skips or populates each argument with its default value, depending on the argument.
    For example, the following command adds user smith with password abc123 (twice), and privilege=0, and opts out of specifying other SPD Server user attributes for user smith.
    add smith abc123 abc123 0 - - - - - -
Password operands, which are obtained with a prompt, are not echoed back to the computer.
To invoke psmgr interactively on both UNIX and Windows, enter the following command:
psmgr <full-path-specification-to-password-table> 
Tip
To avoid having to specify the path to the password database:
  • On Windows: Click the Windows Start button and select All Programsthen selectSASthen selectSAS SPD Server 5.3then selectAccount Manager. The SPD Server Account Manager is launched in a command window.
  • On UNIX, switch to the /site directory and execute the pwdb script.

Running psmgr in Batch Mode

To run psmgr in batch mode, you submit a command file to the psmgr utility. Here is the content of a command file named Pscmds:
groupdef group1
groupdef group2
groupdef group3

add spduser1 newpwd1 newpwd1 0 - - group1 - - -
add spduser2 newpwd2 newpwd2 0 - - - - - -
groupmem spdsuser2 group1 group2 group3 !
The command file defines three groups, named group1 through group3, and then adds two users. spduser1 is given privilege=0 and is assigned group 1 as the primary group. All other user attributes are left undefined. Spdsuser2 is given privilege=0. All other user attributes are left undefined. The GROUPMEM command is used to assign spduser2 membership to group1, group2, and group3.
In the input file, note the following:
  • Command arguments are separated by spaces.
  • Optional arguments are omitted by specifying a hyphen (-).
  • Commands are specified on one line.
Submit the command file to the psmgr utility on both UNIX and Windows as follows:
psmgr path-to-password-database < pscmds
Tip
On UNIX, to avoid specifying the path to the password database, switch to the /site directory and specify pwdb < pscmds
Last updated: February 3, 2017