Adding and Removing Group Members

Users and machines can be members of groups; groups cannot belong to other groups. Newly created groups have no members at all. To add them, use the pts adduser command; to remove them, use the pts removeuser command.

To add users and machines to groups

  1. Verify that you belong to the system:administrators group, which enables you to add members to a group regardless of the setting of its fourth (a) privacy flag. By default the group's owner also has the necessary privilege. If necessary, issue the pts membership command, which is fully described in To display the members of the system:administrators group.

       % pts membership system:administrators
    
  2. Issue the pts adduser command to add one or more members to one or more groups.

       % pts adduser -user <user name>+ -group <group name>+
    

    where

    ad

    Is the shortest acceptable abbreviation of adduser.

    -user

    Specifies each username or machine IP address to add as a member of each group named by the -group argument. A group cannot belong to another group.

    group name

    Names each group to which to add the new members.

To remove users and machines from groups

  1. Verify that you belong to the system:administrators group, which enables you to remove members from a group regardless of the setting of its fifth (r) privacy flag. By default the group's owner also has the necessary privilege. If necessary, issue the pts membership command, which is fully described in To display the members of the system:administrators group.

       % pts membership system:administrators
    
  2. Issue the pts removeuser command to remove one or more members from one or more groups.

       % pts removeuser -user  <user name>+  -group <group name>+
    

    where

    rem

    Is the shortest acceptable abbreviation of removeuser.

    -user

    Specifies each user or machine IP address to remove from each group named by the -group argument.

    -group

    Names each group from which to remove members.