Command Line - How do I change the order of a user's group memberships? I have a troublesome Mac OS X server to deal with. When I ask for my current group membership using this:

$ groups | perl -p -e 's/ /\n/g'


I get a list of 20+ groups!

cactuar
com.apple.sharepoint.group.4
com.apple.sharepoint.group.5
com.apple.sharepoint.group.3
... (etc) ...
chocobo
com.apple.sharepoint.group.2
com.apple.sharepoint.group.6


Now, because NFS is dated, it only makes use of the first 16 groups listed. Is there any way to change the order of the groups assigned to my user, while keeping all the other groups assigned? Basically, I need to have "chocobo" up near the top of that list and I don't know what administrative commands exist to accomplish this goal.

Since I'm ignorant of the what "sharepoint" is good for, I find it totally strange and useless that those strange "com.apple.*" groups are not assigned in /etc/group, so, while I'm asking about users and groups, what is the keyword (search term) for OS X's auxiliary user-groups system, so that I can research it more; or more directly, where is the manual for that? Would it be harmless to drop all those sharepoint group memberships, or should I assume that they are actually important for accessing some yet-unknown resource(s)?
The groups command is not showing the correct ordering of groups in your user context. It is sorting group ids by gid.

Use "id" the show your group set actually used by NFS.

See "man groups" for details.

Use the command "newgrp group" to change a group into the first place of the gid list.