Password administration

A P4 Server user with the super access level can manually set a user’s password:

p4 passwd username

When prompted, enter a new password for the user.

To learn more about the super access level, see Permission levels and access rights in P4 CLI Reference.

Password reset requirement

To force a user with an existing password to reset their own password the next time they use P4 Server:

p4 admin resetpassword -u username

This command forces specified users with existing passwords to change their passwords before they can run another command. This command works:

  • For users whose authMethod is set to perforce

  • In an environment in which both P4 Server-based and LDAP-based authentication are enabled

To force all users with passwords to reset their password:

p4 admin resetpassword -a

This applies, as well, to the superuser that invokes this command.

To require users provided with an initial password set by a super user to have to reset it before issuing their first command:

p4 configure set dm.user.resetpassword=1

Setting this configurable is a best practice if you create new users with a default password.

Password change requirement

To require users to change their passwords after a specified interval, use the p4 group command to assign your users to at least one group and set the PasswordTimeout: value for that group.

If a given user is a member of any group for which a PasswordTimeout value has been set, the default value of unset no longer applies to that user. Instead, that user is subject to the largest PasswordTimeout value that has been set across all that user's groups. The largest value that can be set is unlimited.