p4 group
Add or delete users from a group, or set limits for the members of a group.
Syntax
p4 [g-opts] group [-a | -A] groupname
p4 [g-opts] group -d [-a | -F] groupname
p4 [g-opts] group -o groupname
p4 [g-opts] group -i [-a | -A]
Description
A group is a list of P4 Server users. Use groups to:
- Set access levels in the p4 protectform.
- Limit the maximum amount of data that can be retrieved from P4 Server by particular users with a single command.
- Set the timeout period for
      p4 logintickets.
- Provide information for the p4 ldapsynccommand.
To delete a group, use p4 group -d groupname,
      or call p4 group groupname and remove all the
      users from the resulting form. 
 To force deletion and remove the group from the
      protections table and from all groups, use the -F option with the
      -d option.
The same name can be used for a group and a user because user and group names occupy separate namespaces. For example, alexandria, charlotte, or victoria can refer both to:
- the group whose members are located in a city named Alexandria, Charlotte, or Victoria
- the user named Alexandria, Charlotte, or Victoria
As shown in Example of a group specification, service users required for inter-server communication should be a member of a group with the Timeout field set to unlimited. Otherwise, a service user's ticket can become invalid, which would prevent replication. For more information on service users, see Types of users in the p4 user topic.
MaxLimit fields
The "MaxLimit" fields are MaxResults,
	MaxScanRows, MaxLockTime,
MaxOpenFiles, MaxMemory,	and Timeout.
- To display the values for the "MaxLimit" fields, use p4 groups -vfor all groups, orp4 groups -v groupnamefor the specified group.
- For the list of
	commands that are affected by any the "MaxLimit" fields, see the output of the p4 help maxresultscommand.
Form Fields
| Field Name | Type | Description | 
|---|---|---|
| 
 | Read-only | The name of the group, as entered on the command line. | 
| Description: | Writable | A description about this group (optional). If your company has many groups, it might be useful to add a description. | 
| 
 | Writable | The maximum number of results that members of this group can
	      access from the service from a single command. The default value
	      is  | 
| 
 | Writable | The maximum number of rows that members of this group can scan
	      from the service from a single command. The default value is
	       | 
| 
 | Writable | The maximum length of time (in milliseconds) that any one
	      operation can lock any database table when scanning data. The
	      default value is  | 
| 
 | Writable | The maximum number of files that a member of a group can open using a single command. See Usage notes. | 
| MaxMemory:
 | Writable 
 | Maximum amount of megabytes of random-access memory that a command can use when run by any member of this group. See Usage notes. Limitations: 
 | 
| 
 | Writable | The duration (in seconds) of the validity of a session ticket
	      created by  If a user belongs to multiple groups, unset is ignored and the largest timeout value of the user's groups takes effect. To create a ticket that does not expire, set the
	       | 
| IdleTimeout | Writable | The duration (in seconds) after the last run command after which a p4 login ticket should be invalidated. A value of unset or unlimited disables the timeout. An individual's timeout is the highest of any group with a limit to which they belong, unlimited if any of their groups has unlimited for the timeout value, or unlimited if they belong to no group with a limit. Since the idle time is based on the user's access time, if an IdleTimeout is set of a user, but the value is lower than that of dm.user.accessupdate or dm.user.accessforce, the highest value is used. | 
| 
 | Writable | The length of time (in seconds) that passwords for users in this group remain valid. If the value is  
 See Usage notes. | 
| 
 | Writable | The LDAP configuration to use when populating the group’s user
	      list from an LDAP query. See  | 
| 
 | Writable | The LDAP query used to identify the members of the group. See  | 
| 
 | Writable | The LDAP attribute that represents the user’s username.  See  | 
| LdapUserDNAttribute: | Writable | The LDAP attribute in the group object that contains the DN (distinguished name) of the user object. | 
| 
 | Writable, multi-line | Names of other
	      P4 Server
	      groups. To add all users in a previously defined group to the group
	      you’re presently working with, include the group name in the
	       | 
| 
 | Writable, multi-line | Names of other P4 Server users. Group owners without  Group owners are not necessarily members of a group. If a group
	      owner is to be a member of the group, the userid must also be
	      added to the  The specified owner does not have to be a P4 Server user. You might want to use an arbitrary name if the user does not yet exist, or if you have deleted the user and need a placeholder until you can assign the spec to a new user. | 
| 
 | Writable, multi-line | The P4 Server usernames of the group members. Each user name must be typed on its own line and be indented. | 
Options
| 
 | Allow a (non-superuser) group owner to administer the group. The
	      user must be listed in the  | 
| 
 | Allow a user with  | 
| 
 | Delete group groupname. The members of the group are
	      affected only if their access level or  | 
| 
 | Used only with the  | 
| 
 | Read the form from standard input without invoking the user’s editor. The new group specification replaces the previous one. | 
| 
 | Write the form to standard output without invoking the user’s editor. | 
| 
 | 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 | 
 | 
- Referring to a (nonexistent) user in a group definition does not
	create the user, nor does it consume a license. To create
	users, use the p4 usercommand.
- Ticket TimeoutandPasswordTimeoutvalues for users who belong to multiple groups are calculated the same way asmaxresultsvalues: the largesttimeoutvalue for all the groups of which the user is a member (includingunlimited, but ignoringunset). A user that is not a member of any group has the default ticketTimeoutvalue of43200andPasswordTimeoutvalue ofunset. To create a ticket that does not expire, set theTimeouttounlimited.
- If you are using the PasswordTimeoutfield to implement password aging, a 30-day timeout is 2,592,000 seconds.
- 
                                                    If the number of files in the depot is large, certain commands might slow down the service if called with no parameters, or if called with non-restrictive arguments. For example, p4 print //depot/...
 prints the contents of every file in the depot on the user’s screen, andp4 filelog //depot/...
 attempts to retrieve data on every file in the depot at every revision.The P4 Server superuser can limit the amount of data that P4 Server returns to the user by setting the MaxResultsvalue for groups of users. The superuser can also limit the amount of data scanned (whether returned to the user or not) by setting theMaxScanRowsvalue, and the length of time any database table can be locked in by any single operation by setting theMaxLockTimevalue. Equally, theMaxOpenFilesfield can be set to specify the maximum number of files that a group member can open at any given time.If any of the "MaxLimit" fields limits are violated, the request fails and the user is asked to limit the query. If a user belongs to multiple groups, the service computes the user's MaxResultsvalue to be the maximum of theMaxResultsfor all the groups of which the user is a member (removing the limit if it encounters a setting ofunlimited, but ignoring any settings still at the default value ofunset). If a particular user is not a member of any group, the user'sMaxResultsvalue isunset.A user’s MaxScanRows,MaxLockTime, andMaxOpenFileslimits are computed in the same way.The speed of most hardware should make it unnecessary to set a MaxResultsvalue below 10,000, aMaxScanRowsvalue below 50,000, or aMaxLockTimevalue below 1,000.A user can also set these limits by specifying them on a per-command basis for some commands. Values set for individual commands override values set using p4 group. To disable overriding p4 group settings, set server.commandlimits =2For additional details about setting limits, see the output of p4 help maxopenfiles
- To unload a workspace or label, a user must be able to scan
	all the files in the workspace’s have list The list of file revisions most recently synced from the depot into the workspace. In other words, the list of files that the client workspace has. or all the files tagged
	by the label. Administrators should set MaxScanRowsandMaxResultshigh enough so that users will not need to ask for assistance withp4 unloadorp4 reloadoperations.
- The term "MaxLimit" fields means the following fields: MaxResults,MaxScanRows,MaxLockTime,MaxOpenFiles,MaxMemory,Timeout- To display the values for the "MaxLimit" fields, use p4 groups -vfor all groups, orp4 groups -v groupnamefor the specified group.
- For the list of
	commands that are affected by any the "MaxLimit" fields, see the output of the p4 help maxresultscommand.
 
- To display the values for the "MaxLimit" fields, use 
- See also the following topics in the P4 Server Administration Documentation:
Example of a group specification
This example shows the best practice of putting service users in a group, and making sure that the service users are never blocked by the expiration of their connection or password.
p4 group service_users
                                            Add service1 to the list of Users: in the
      group, and set the Timeout: and
      PasswordTimeout: values to
      unlimited.
Group:            service_users
Description:      This group is responsible for x,y,z and works in locations A and B
Timeout:          unlimited
PasswordTimeout:  unlimited
Subgroups:
Owners:
Users:
    service1Related commands
| To modify users' access levels | |
| To view a list of existing groups | |
| To synchronize LDAP and P4 Server groups |