[Top] [Prev] [Next] [Bottom]
Page 50 out of 69 total pages

p4 user

Synopsis

Create or edit Perforce user specifications and preferences.

Syntax

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

Description

By default, any system user becomes a valid Perforce user the first time they use any Perforce command. When Perforce is first used, a Perforce user specification with default settings is created for the invoking user. The p4 user command can be used to edit these settings, or to create the user record if the user has not used Perforce before.

Perforce superusers can prevent random users from accessing Perforce with p4 protect.

When p4 user is called, a form is brought up in the editor defined by the P4EDITOR environment or registry variable. Perforce expects the form's entries to be entered in Perforce's standard forms format.

When called without a username, p4 user will edit the specification of the current user. When called with a username, the user specification will be displayed, but can't be changed. Superusers can edit other users specifications with the -f superuser flag: p4 user -f username.

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

Form Fields

Field Name Type Description
User: Read-only The Perforce username that p4 user was invoked under. 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 that the user would like to review (described in the Usage Notes, below).

Options

-d username Deletes the specified user.
-f Superuser flag; allows the superuser to modify or delete the specified user.
-i Read the user specification from standard input. The input must conform to the forms format.
-o Write the user specification to standard output.
g_opts See global options.

Usage Notes

Can File Arg Use
Revision Specifier?
Can File Arg
Use Revision Range?
Minimal
Access Level Required
N/A N/A list

The -d flag may be used by non-superusers only to delete the user specification that the command runs as. Perforce superusers can delete any Perforce user.

User deletion will fail if the specified user owns any branches, labels, clients, jobs, or open files. Delete these objects first (submitting or reverting open files), and then delete the user.

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, set the value of the Password: field to any string that doesn't contain whitespace or the comment character #. Once a password has been set, it must be provided to each p4 command; this can be done in one of three ways:

No matter what the length of the Password: field's value, it will be displayed as six asterisks whenever you subsequently call p4 user.

The collected values of the Email: fields can be listed for each user with the p4 users command, and can used for any purpose.

The Perforce change review daemon uses the values in this field: when activated, it will send email to users whenever files they've subscribed to in the Reviews: field have changed. Files listed in this field must be specified in depot syntax; for example, if user joe has a Reviews: field value of

    //depot/foo/...
    //depot/.../README

then the change review daemon will send joe email whenever any README file has been submitted, and whenever any file under //depot/foo has changed.

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. Only user sammy, or a Perforce superuser, can run this command.
p4 -u joe -P hey submit Run p4 submit as user joe. If Joe has set a password, it must be provided.
ca

Related Commands

To view a list of all Perforce users

p4 users



[Top] [Prev] [Next] [Bottom]
Page 50 out of 69 total pages

Copyright 1998 Perforce Software.
Contact us at [email protected]
Last updated: 06/17/98