HP 3PAR Command Line Interface Administrator's Manual: HP 3PAR OS 3.1.2 (QR482-96525, September 2013)

Setting Your Name and Password
Your name and password can be provided when prompted, or read from a file that is specified
with the environment variable TPDPWFILE or the global option pwf (password file).
CAUTION: By setting the system name, user name, and password using environment variables,
you are not prompted for this information when running the CLI, which can be useful for scripting.
However, passwords must be kept secure. Using encrypted passwords in scripts, using an encrypted
pwfile, or the encrypted password on the command line raises the risk of password exposure. It
is imperative that the script, pwfile, or command line history file be strictly maintained to avoid
compromise of the encrypted password. Failure to do so can leave the user open to impersonation
by anyone with access to the encrypted string.
NOTE: LDAP users can save password files using the setpassword command. However, LDAP
users are limited to accessing only the system they were logged in to when they saved their
password.
The password file has a single line with your name and an encrypted six character minimum
password separated by a space. For example:
3paruser PPTpdJPDHuwnU
Additionally, you can also store your password using the setpassword command. Storing your
password is useful when you need to:
Establish sessions when using the individual commands. Otherwise, you are prompted for
user and password information each time you issue a command.
Allow unattended operations such as scheduled automatic tasks on the host.
Using the setpassword Command
To store a password on your system, issue the setpassword command to create a password file
as displayed in the following example. Substitute a valid password file for <filename>.
$ setpassword saveonly file <filename>
See the HP 3PAR Command Line Interface Reference for additional information about the
setpassword command.
After the file is written, use either the pwf global option or TPDPWFILE environment variable to
reference the stored password file.
Setting the TPDPWFILE Environment Variable
To reference a password stored using the TPDPWFILE environment variable, see the following
example:
$ TPDPWFILE=~/mypwfile
$ export TPDPWFILE
Using the -pwf Option
To reference a stored password using the pwf global option, see the following example:
$ showsysmgr pwf ~/mypwfile
46 Running the HP 3PAR Command Line Interface