Supplies the current Perforce user's password for any Perforce command.
Used by Client?
Used by Server?
Can be set in P4CONFIG file?
Value if not Explicitly Set
Perforce passwords are set via p4
passwd, or in the form invoked by
p4 user. The setting of
P4PASSWD is used to verify
the user's identity. If a password has not been set, the value
P4PASSWD is not used, even
While it is possible to manually set the
variable to your plaintext password, the more secure way is to use the
p4 passwd command. On
UNIX, this will invoke a challenge/response mechanism which securely
verifies your password. On Windows, this sets
P4PASSWD to the encrypted
MD5 hash of your password.
On Windows platforms, if you set a password in P4V, the value of the
P4PASSWD is set for you.
Setting the password in P4V is like using
p4 passwd (or
P4PASSWD) from the MS-DOS
command line, setting the registry variable to the encrypted MD5 hash of
the password. The unencrypted password itself is never stored in the
If you are using ticket-based authentication, but have a script that
relies on a
setting, use p4 login
-p to display the value of a ticket that can be passed to
Perforce commands as though it were a password (that is, either from the
command line, or by setting
P4PASSWD to the value of
the valid ticket).