dsmemberutil

View user and group rights, including state dump, memberships, UUIDs, membership APIs.

Syntax
      dsmemberutil [-v] [-h] command [options]
      
Flags

  -h      List the options for calling dsmemberutil.
  -v      Verbose mode.
     
Commands

   getuuid -ugUGsS value
      Take any of the options and return the associated UUID.

   getid -UGsSX value
      Takes any of the options and return the associated UID or GID depending on option provided.

   getsid -ugUGX value
      Takes any of the options and return the associated SID.

   checkmembership -uUxs param -gGXS param
      Returns if a user or group with the associated option is a member of the group.

   flushcache  Flush the current membership cache.

Options

   -G name     Using group with name
   -g gid      Using group with GID

   -S sid      Using group with SID
   -s sid      Using user with SID

   -U name     Using user with name
   -u uid      Using user with UID

   -X uuid     Using group with UUID
   -x uuid     Using user with UUID

   In some cases -xX and -sS can be used synonymously due to nature of the value.

Legacy commands such as dumpstate and statistics are gone. See odutil(1) for show cache and statistics operations.

Examples

Get a user's uuid:

% dsmemberutil getuuid -u 501
EEA4F2F6-B268-49E7-9C6F-E3C4A37DA4FD

Get a group's uuid:

% dsmemberutil getuuid -g 0
ABCDEFAB-CDEF-ABCD-EFAB-CDEF00000000

Get a user's or group's id from a uuid:

% dsmemberutil getid -X ABCDEFAB-CDEF-ABCD-EFAB-CDEF0000000C
gid: 12

Check a user's membership in a group (using UID and GID):

% dsmemberutil checkmembership -u 501 -g 0
user is not a member of the group

Check a user's membership in a group (using names):

% dsmemberutil checkmembership -U root -G wheel
user is a member of the group

“The Theseus paradox confronts ideas of identity and change by raising the question of whether an object that has had all of its components replaced remains fundamentally the same object”

Related macOS commands

Local man page: dsmemberutil - Command line help page on your local machine.
dscacheutil - Query or flush the Directory Service/DNS cache.
dscl - Directory Service command line utility.
dsenableroot - Enable root access.
dseditgroup - Edit, create, manipulate, or delete groups.
profiles - Profiles Tool.
sysadminctl - Administer system user accounts.


 
Copyright © 1999-2026 SS64.com
Some rights reserved