Changing a Group's Owner or Name

To change a group's owner, use the pts chown command. To change its name, use the pts rename command.

You can change the owner or name of a group that you own (either directly or because you belong to the owning group). You can assign group ownership to another user, another group, or the group itself. If you are not already a member of the group and need to be, use the pts adduser command before transferring ownership, following the instructions in To Add Members to a Group.

The pts chown command automatically changes a group's owner_name prefix to indicate the new owner. If the new owner is a group, only its owner_name prefix is used, not its entire name. However, the change in owner_name prefix command does not propagate to any groups owned by the group whose owner is changing. If you want their owner_name prefixes to indicate the correct owner, you must use the pts rename command.

Otherwise, you normally use the pts rename command to change only the group_name part of a group name (the part that follows the colon). You can change the owner_name prefix only to reflect the actual owner.

To Change a Group's Owner

Issue the pts chown command to change a group's name.

   % pts chown  <group name> <new owner>

where

group name

Specifies the current name of the group to which to assign a new owner.

new owner

Names the user or group that is to own the group.

Example: Changing a Group's Owner to Another User

In the following example, user pat transfers ownership of the group pat:staff to user terry. Its name changes automatically to terry:staff, as confirmed by the pts examine command.

   % pts chown pat:staff terry
   % pts examine terry:staff
   Name: terry:staff, id: -534, owner: terry, creator: pat,
     membership: 15, flags: SOm--, group quota: 0.

Example: Changing a Group's Owner to Itself

In the following example, user terry makes the terry:team group a self-owned group. Its name does not change because its owner_name prefix is already terry.

   % pts chown terry:team terry:team
   % pts examine terry:team
   Name: terry:team, id: -286, owner: terry:team, creator: terry,
     membership: 6, flags: SOm--, group quota: 0.

Example: Changing a Group's Owner to a Group

In this example, user sam transfers ownership of the group sam:project to the group smith:cpa. Its name changes automatically to smith:project, because smith is the owner_name prefix of the group that now owns it. The pts examine command displays the group's status before and after the change.

   % pts examine sam:project
   Name: sam:project, id: -522, owner: sam, creator: sam,
     membership: 33, flags: SOm--, group quota: 0.
   % pts chown sam:project smith:cpa
   % pts examine smith:project
   Name: smith:project, id: -522, owner: smith:cpa, creator: sam,
     membership: 33, flags: SOm--, group quota: 0.

To Change a Group's Name

Issue the pts rename command to change a group's name.

   % pts rename  <old name> <new name>

where

old name

Specifies the group's current name.

new name

Specifies the complete new name to assign to the group. The owner_name prefix must correctly indicate the group's owner.

Example: Changing a Group's group_name Suffix

The following example changes the name of the smith:project group to smith:fiscal-closing. The group's owner_name prefix remains smith because its owner is not changing.

   % pts examine smith:project
   Name: smith:project, id: -522, owner: smith:cpa, creator: sam,
     membership: 33, flags: SOm--, group quota: 0.
   % pts rename smith:project smith:fiscal-closing
   % pts examine smith:fiscal-closing
   Name: smith:fiscal-closing, id: -522, owner: smith:cpa, creator: sam,
     membership: 33, flags: SOm--, group quota: 0.

Example: Changing a Group's owner_name Prefix

In a previous example, user pat transferred ownership of the group pat:staff to user terry. Its name changed automatically to terry:staff. However, a group that terry:staff owns is still called pat:plans, because the change to a group's owner_name that results from the pts chown command does not propagate to any groups it owns. In this example, a member of terry:staff uses the pts rename command to change the name to terry:plans to reflect its actual ownership.

   % pts examine pat:plans
   Name: pat:plans, id: -535, owner: terry:staff, creator: pat,
     membership: 8, flags: SOm--, group quota: 0.
   % pts rename pat:plans terry:plans
   % pts examine terry:plans
   Name: terry:plans, id: -535, owner: terry:staff, creator: pat,
     membership: 8, flags: SOm--, group quota: 0.