Perforce 2008.1 Command Reference
<< Previous Chapter
p4 unlock
Table of Contents
Index
Perforce on the Web
Next Chapter >>
p4 users

p4 user

Synopsis

Create or edit Perforce user specifications and preferences.

Syntax

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

Description

By default, any system user becomes a valid Perforce user the first time he uses any Perforce command that can update the depot or its metadata. Perforce automatically creates a user spec with default settings for the invoking user. Use the p4 user command to edit these settings or to create new user records. (After installing Perforce, use p4 protect as a Perforce superuser to prevent automatic creation of new users.)

When called without a username, p4 user edits 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 or registry variable.

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

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.

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 the Usage Notes below).

Password:

Writable

The user's password (described in the Usage Notes below).

Reviews:

Writable List

A list of files the user would like to review (see the Usage Notes below).

Options

-d username

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

-f

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

-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 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

Passwords can be created, edited, or changed in the p4 user form or by using the p4 passwd command. Setting your password in the p4 user form is only supported at security levels 0 or 1. You can p4 passwd to set passwords at any server security level, and you must use p4 passwd to set passwords at higher security levels. For more about how the various security levels, see the System Administrator's Guide.

If you edit a password in the p4 user form, do not use the comment character # within the password; Perforce interprets everything following that character on the same line as a comment, and does not store it as part of the password.

then the change review daemon sends joe email whenever any README file has been submitted, and whenever any file under //depot/main has been submitted.

in your Reviews: field, you will receive email when jobs are changed.

For example, suppose the jobs at your site have a field called Owned-By:. If you set the Jobview: field on your p4 user form to Owned-By=yourname&status=open, all open jobs owned by you appear on all changelists you create. See p4 jobs for a full description of jobview usage and syntax.

Examples

p4 user joe

View the user specification of Perforce user joe.

p4 user

Edit the user specification for the current Perforce user.

p4 user -d sammy

Delete the user specification for the Perforce user sammy.

p4 -u joe -P hey submit

Run p4 submit as user joe, whose password is hey.

This command does not work at higher security levels.

p4 user -f joe2

Create a new Perforce user named joe2 if the caller is a Perforce superuser, and joe2 doesn't already exist as a Perforce user. If user joe2 already exists, allow a Perforce superuser to modify the user's settings.

Related Commands

To view a list of all Perforce users

p4 users

To change a user's password

p4 passwd

To view a list of users who have subscribed to review particular files

p4 reviews


Perforce 2008.1 Command Reference
<< Previous Chapter
p4 unlock
Table of Contents
Index
Perforce on the Web
Next Chapter >>
p4 users
Please send comments and questions about this manual to [email protected].
Copyright 1999-2008 Perforce Software. All rights reserved.
Last updated: 07/08/08