Purpose
Creates an (empty) Protection Database group entry
Synopsis
pts creategroup -name <group name>+ [-owner <owner of the group>] [-id <id (negated) for the group>+] [-cell <cell name>] [-noauth] [-force] [-help] pts createg -na <group name>+ [-o <owner of the group>] [-i <id (negated) for the group>+] [-c <cell name>] [-no] [-f] [-h] pts cg -na <group name>+ [-o <owner of the group>] [-i <id (negated) for the group>+] [-c <cell name>] [-no] [-f] [-h]
Description
The pts creategroup command creates an entry in the Protection Database for each group specified by the -name argument. The entry records the issuer of the command as the group's creator, and as the group's owner unless the -owner argument names an alternate user or group as the owner.
There are two types of groups:
Creating a group lowers the issuer's group-creation quota by one. This is true even if the -owner argument is used to assign ownership to an alternate user or group. To display a user's group-creation quota, use the pts examine command; to set it, use the pts setfields command.
AFS group ID (AFS GID) numbers are negative integers and by default the Protection Server assigns a GID that is one less (more negative) than the current value of the max group id counter in the Protection Database, decrementing the counter by one for each group. Members of the system:administrators group can use the -id argument to assign specific AFS GID numbers. If any of the specified GIDs is lower (more negative) than the current value of the max group id counter, the counter is reset to that value. It is acceptable to specify a GID greater (less negative) than the current value of the counter, but the creation operation fails if an existing group already has it. To display or set the value of the max group id counter, use the pts listmax or pts setmax command, respectively.
Output
The command generates the following string to confirm creation of each group:
group name has id AFS GID
Cautions
Although using the -owner argument to designate a machine entry as a group's owner does not generate an error, it is not recommended. The Protection Server does not extend the usual privileges of group ownership to users logged onto the machine.
Options
A regular group's name must have the following format:
owner_name:group_name
and the owner_name field must reflect the actual owner of the group, as follows:
If this argument is used and the -name argument names multiple new groups, it is best to provide an equivalent number of AFS GIDs. The first GID is assigned to the first group, the second to the second group, and so on. If there are fewer GIDs than groups, the Protection Server assigns GIDs to the unmatched groups based on the max group id counter. If there are more GIDs than groups, the excess GIDs are ignored. If any of the GIDs is lower (more negative) than the current value of the max group id counter, the counter is reset to that value.
Examples
In the following example, the user pat creates groups called pat:friends and pat:colleagues.
% pts creategroup -name pat:friends pat:colleagues
The following example shows a member of the system:administrators group creating the prefix-less group staff and assigning its ownership to the system:administrators group rather than to herself.
% pts creategroup -name staff -owner system:administrators
In the following example, the user pat creates a group called smith:team-members, which is allowed because the -owner argument specifies the required value (smith).
% pts creategroup -name smith:team-members -owner smith
Privilege Required
The issuer must belong to the system:administrators group to create prefix-less groups or include the -id argument.
To create a regular group, the issuer must
Related Information