p4 user

Create or edit Perforce user specifications and preferences.

Syntax

p4 [g-opts] user [-f] [username]
p4 [g-opts] user -d [-f | -F] username
p4 [g-opts] user -o [username]
p4 [g-opts] user -i [-f]

Description

Use the p4 user command to edit these settings or to create new user records. (By default, new users are created automatically. After installing Perforce, a Perforce superuser can control this behavior with the p4 configure command.)

There are three types of Perforce users: standard users, operator users, and service users. Standard users are the default, and each standard user consumes one Perforce license. The operator user type is intended for system administrators; they are subject to the same restrictions on permissions as any other user, but are further restricted in that they can run only a limited subset of Perforce commands. Service users are intended for inter-server communication in replicated and multi-server environments, and are restricted to an even smaller subset of Perforce commands. Neither operators nor service users consume Perforce licenses.

When called without a username, p4 user edits the specification of the current user. When called with a username, the user specification is displayed, but cannot be changed. The form appears in the editor defined by the P4EDITOR environment variable.

Perforce superusers can create new users or edit existing users' specifications with the -f (force) option: p4 user -f username.

Note that both the -f and -F options can be used to delete users, but the -F option has additional effects on protections and groups. See the description of command options below for more information.

The user who gives a Perforce command is not necessarily the user under whose name the command runs. The user for any particular command is determined by the following:

Form Fields

Field Name Type Description

User:

Read-only

The Perforce username under which p4 user was invoked. By default, this is the user’s system username.

Be aware of the Limitations on characters in filenames and entities.

Type:

Read-only

Type of user: standard, operator, or service.

Important

Once you set the type, you cannot change it.

AuthMethod:

Writable

One of the following: perforce or ldap. This field can only be changed when the -f option is specified for the p4 user command.

  • Specifying perforce enables authentication using Perforce’s internal db.user table or by way of an authentication trigger. This is the default unless it is overridden with the auth.default.method configurable.
  • Specifying ldap enables authentication against AD/LDAP servers specified by the currently active LDAP configurations.

Email:

Writable

The user’s email address. By default, this is user@client.

Update:

Read-only

The date and time this specification was last updated.

Access:

Read-only

The date and time this user last ran a Perforce command.

FullName:

Writable

The user’s full name.

JobView:

Writable

A description of the jobs to appear automatically on all new changelists (described in ).

Password:

Writable

The user’s password (described in ).

PasswordChange:

Read-only

The date and time of the user’s last password change. If the user has no password, this field is blank.

Reviews:

Writable List

A list of files the user would like to review (see ). This field can include exclusionary mappings.

Options

-d username

Deletes the specified user. Only user username, or a Perforce superuser, can run this command.

If you have set P4AUTH, no warning will be given if you delete a user who has an open file or client.

-f

Superuser force option; allows the superuser to modify or delete the specified user, or to change the last modified date.

-F

Superuser option; used only with -d: forces the deletion of the specified user, and also removes the user from the protections table and from all groups. The command fails if removing the user from a group causes the group to be deleted. In such a case, delete the group before deleting the user.

-i

Read the user specification from standard input. The input must conform to the p4 user form’s format.

-o

Write the user specification to standard output.

g-opts

See Global Options.

Usage Notes

Can File Arguments Use Revision Specifier? Can File Arguments Use Revision Range? Minimal Access Level Required

N/A

N/A

list