Tuesday, July 25, 2017

Mac os create group command line

list group.

dscacheutil -q group
sudo dseditgroup -o edit -a $username_to_add -t user admin

Mac group:

sudo dscl . -create /Groups/groupname
sudo dscl . –create /Groups/groupname name groupname
sudo dscl . –create /Groups/groupname gid   groupid
sudo dscl . –create /Groups/groupname GroupMembership usershorname


list group members

dscacheutil -q group -a name pam_idq

sudo dscl . –delete /Groups/groupname GroupMemebership usershorname

sudo dscl . –delete /Groups/groupname

No comments:

Post a Comment