HP 3PAR StoreServ 7400 2-node HP 3PAR Command Line Interface Administrator& - Page 46

Setting Your Name and Password, Using the setpassword Command

Page 46 highlights

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 . $ setpassword -saveonly -file 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=~/my-pwfile $ export TPDPWFILE Using the -pwf Option To reference a stored password using the -pwf global option, see the following example: $ showsysmgr -pwf ~/my-pwfile 46 Running the HP 3PAR Command Line Interface

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204

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=~/my
pwfile
$ export TPDPWFILE
Using the -pwf Option
To reference a stored password using the
pwf
global option, see the following example:
$ showsysmgr
pwf ~/my
pwfile
46
Running the HP 3PAR Command Line Interface