Andrew Deason wrote:
On Thu, 22 Apr 2010 19:47:33 -0400
Jason Edgecombe <[email protected]> wrote:

Hi,

What is the difference between the new -expandgroups and -supergroups
options to the pts mem command? That seem identical in my reading.

-expandgroups just expands the listing of the normal pts output. So, if
you have 'foo' is a member of 'bar' is a member of 'baz', 'pts mem baz'
would just list 'bar'. Running 'pts mem baz -expandgroups' will list
'bar' and 'foo'.

-supergroups lists the "parent" groups of a group. Normally if you run
'pts mem groupname' for a group, it lists the members of the group.
'pts mem groupname -supergroups' lists the groups that contain
'groupname'.

Yes, said another way, -supergroups only gives you an addition stanza of
information (and only for groups), where -expandgroups gives you a
completely different stanza by traversing the group nesting (for groups
and for users).

pts mem -supergroups adds the list of groups the group belongs to (the
supergroups) to the output. It has no effect when getting the membership
of a user, because pts already lists the groups a user belongs to.  pts
mem -supergroups does not recurse, it only lists the direct supergroups
of a group.

The -expandgroups recurses to find all the users in a group, and
recurses to find all the groups a user belongs to.


The documentation could probably stand to have some examples.

Yes, it could.  Is the following clear and helpful?


The following example shows how to list the groups to which nested groups
belong. In this example the group C<executives> is a member of the group
C<management> and the group C<management> is a member of the group C<staff>.
The group C<management> is called a supergroup of the group C<executives> and 
the
group C<staff> is called a supergroup of the group C<management>.

   % pts membership executives
   Members of executives (id: -208) are:
     jane

   % pts membership executives -supergroups
   Members of executives (id: -208) are:
     jane
   Groups executives (id: -208) is a member of:
     management

   % pts membership management -supergroups
   Members of management (id: -207) are:
     executives
     mary
     sarah
     carol
   Groups management (id: -207) is a member of:
      staff

   % pts membership staff -supergroups
   Members of staff (id: -206) are:
     sales
     marketing
     engineering
     management
   Groups staff (id: -206) is a member of:


The following example shows how to find all the users which belong
to a group, including users of nested groups. In this example, the
user C<jane> is listed as an expanded member of the group C<management>
instead of the group C<excutives>.

   % pts membership management -expandgroups
   Expanded Members of management (id: -207) are:
     jane
     mary
     sarah
     carol


The following example shows how to find all the groups a user
is a member of, including membership due to nested groups.  In
this example the user C<jane> is a direct member of the group
C<executives>. The C<-expandgroups> flag shows all the groups
to which C<jane> has membership status.

   % pts membership jane
   Groups jane (id: 7) is a member of:
     executives

   % pts membership jane -expandgroups
   Expanded Groups jane (id: 7) is a member of:
     staff
     management
     executives

_______________________________________________
OpenAFS-info mailing list
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-info

Reply via email to