p4 renameuser
Rename a user and modify all database records that mention the user.
Syntax
p4 [g-opts] renameuser [-f] --from=old --to=new
Description
The p4 renameuser
command renames a user and
modifies the following elements to reflect this change:
- the user record
- groups that include the user
- properties that apply to the user
- objects owned by the user: workspaces, labels, branches, streams, and so forth
- objects created by the user: all pending, shelved, and committed changes
- files the user has opened or shelved
- fixes the user made to jobs
The user name is not changed in descriptive text fields (such as job descriptions or change descriptions). It is only changed where the name appears as the owner or user field of the database record.
Protection table entries that apply to the user are updated only if the
Name
field exactly matches the user name. If the
Name
field contains wildcards, it is not modified.
The only job field that is processed is attribute code 103. If you have included the user name in other job fields, they will need to be changed manually.
The p4 renameuser
command does not modify anything
in the spec depot.
-
We recommend using this command during a maintenance or quiet period. Server performance might be affected while the command is running because a large number of database tables must be locked and revisions that have the ktext (
text+k
) file type also need to be processed. Those files that use the%Author%
RCS keyword (see File type modifiers) will require their MD5 digest stored in the database to be updated by using p4 verify. - For Helix Swarm, any reference to a renamed user will be broken.
- If you are renaming a user who is being authorized by means of a
P4AUTH
configuration, you must issue thep4 renameuser
command for every server that the user is authorized to use.
Usage and Limitations
For best results, follow these guidelines:
- Before you use this command, check to see that the user name you want
to specify for
new
does not already exist. Using an existing name might result in the merging of data for the existing and the renamed user despite the best efforts of the system to prevent such merges. - The user issuing this command should not be the user being renamed.
- The user being renamed should not be using the server when this command executes. After the command completes, the user should log out and then log back in.
-
The
p4 renameuser
command does not process unloaded workspaces: all the user’s workspaces should be reloaded (or deleted) first.A multi-serverinstallation might contain local workspaces or local labels owned by the user. These workspaces and labels, which are bound to Edge Servers, should be deleted or moved to the Commit Server first.
If a central authentication server has been configured using
P4AUTH
, the user must be renamed in both servers, using separate invocations ofp4 renameuser
. The commands can be run in either order. - If the user submitted files of type
+k
that contain the$Author$
tag, those files will have incorrect digests following this command. Usep4 verify -v
to recompute the digest value after the rename.
Options
|
The name of the old user. |
|
The name of the new user. |
|
Forces the command to execute without checking for accidental merge checks that might have happened if the new user had already been used in this server. If the new user name has never been used before, you can improve performance using this option. |
|
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 |
|
Related commands
To recompute digest values after the rename for certain files. |
|
To create a user or manage user preferences. |
|
To list existing users. |