p4 passwd
Synopsis
Change a user's Perforce password on the server.
Syntax
p4 [g-opts] passwd [-O oldpassword] [-P newpassword] [user]
Description
By default, user records are created without passwords, and any Perforce user can impersonate another by setting P4USER or by using the globally-available -u flag. To prevent another user from impersonating you, use p4 passwd to set your password to any string that doesn't contain the comment character #.
Once you have set a password, it must be provided to the Perforce server program when any Perforce client command is run. You can do this in one of three ways:
- Set the environment or registry variable P4PASSWD to the password value;
- Create a setting for P4PASSWD within the P4CONFIG file;
- Use the -P password flag on the Perforce client command line, as in p4 -u ida -P idaspwd edit .
Each of these three methods overrides the methods above it.
On Windows clients, p4 passwd stores the password for you by performing p4 set to change the local registry variable. (The registry variable holds only the encrypted MD5 hash, not the password itself.)
To delete a password, set the password value to an empty string.
Options
-O oldpassword
|
Avoid prompting by specifying the old password on the command line.
|
-P newpassword
|
Avoid prompting by specifying the new password on the command line.
|
user
|
Superusers can provide this argument to change the password of another user.
|
g-opts
|
See the Global Options section.
|
Usage Notes
Can File Arguments Use Revision Specifier?
|
Can File Arguments Use Revision Range?
|
Minimal Access Level Required
|
---|
N/A
|
N/A
|
list
|
- The p4 passwd command never sends plaintext passwords over the network; a challenge/response mechanism is used to send the MD5 hash of the password to the server.
- Passwords may contain spaces; command line use of such passwords requires quotes. For instance, to pass the password my passw, to Perforce, use p4 -P "my passw" command .
- If a user forgets his or her password, a Perforce superuser can reset it by specifying the username on the command line: p4 passwd username
- The maximum password length is 1024 characters on all platforms.
Related Commands
Please send comments and questions about this manual to
[email protected].
Copyright 1999-2003 Perforce Software. All rights reserved.
Last updated: 12/12/03