Computer Extension for local group on mac and membership

Rich_C
New Contributor III

Hi,  I am looking for some help to see if there is an existing JAMF Brand Computer Extension for reporting all local groups on a computer and\or a particular group name.  I would also like it to report all of its membership.  ANy help is appreciated.  Thanks!!

4 REPLIES 4

A_Collins
Contributor

Basically listing all groups is "dscl . list /Groups"  if you looking for particular group 

if dscl . -read /Groups/"the_group_you_looking_for" &> /dev/null; then
  echo "yup group exist"
else
  echo "nope it does not exist."
fi

AJPinto
Honored Contributor III

It would be better to ask what you are trying to do any why, what is the problem you are trying to solve? Jamf already natively reports on who is in the admin group, but do you really care who is a member of something like _appserverusr?

Rich_C
New Contributor III

What we are looking to do is to create a local group on the computer and add the current logged in user.    This group will be used for internal purposes.  We would like to report this because it will not be on all computers and we would like to be able to see who has this group and who is assigned.  

A_Collins
Contributor

dscl command would be enough to perform what you want. you can use man dscl to see how to use it