Set the current user's password on the Perforce server.
Namespace: Perforce.P4Assembly: p4api.net (in p4api.net.dll) Version: 2015.1.103.4687 (2015.1.103.4687)
Syntax
C# |
---|
public bool SetPassword( string OldPassword, string NewPassword ) |
Visual Basic |
---|
Public Function SetPassword ( _ OldPassword As String, _ NewPassword As String _ ) As Boolean |
Visual C++ |
---|
public: bool SetPassword( String^ OldPassword, String^ NewPassword ) |
Parameters
- OldPassword
- Type: System..::..String
User's old password
- NewPassword
- Type: System..::..String
User's new password
Return Value
Success/Failure
Remarks
p4 help passwd
passwd -- Set the user's password on the server (and Windows client)
p4 passwd [-O oldPassword -P newPassword] [user]
'p4 passwd' sets the user's password on the server.
After a password is set for a user, the same password must be set on
the client in the environment variable $P4PASSWD to enable the user
to use all Perforce client applications on that machine. (On Windows,
you can use 'p4 passwd' to configure the password in the environment.)
'p4 passwd' prompts for both the old password and the new password
with character echoing turned off. To delete the password, set it to
an empty string.
The -O flag provides the old password, avoiding prompting.
The -P flag provides the new password, avoiding prompting.
If you are using ticket-based authentication, changing your password
automatically invalidates all of your tickets and logs you out.
Specifying a username as an argument to 'p4 passwd' requires 'super'
access granted by 'p4 protect'.