dsmemberutil.1   [plain text]

.Dd Jan 1, 2007
.Dt dsmemberutil 1
.Os Darwin
.Nm dsmemberutil
.Nd various operations for the membership APIs, including state dump, check memberships, UUIDs, etc.
.Op Fl v
.Op Fl h
.Ar command
.Op options
is a program that implements the membership API calls in a command line utility.  
A list of flags and their descriptions:
.Bl -tag -width -ident
.It Fl h
Lists the options for calling
.It Fl v
to operate in verbose mode.
The action of each command is described below:
.Bl -tag -width "xxxxxxxxxx"
.It Ar getuuid Fl ugUGsS Ar value
Takes any of the options and returns the associated UUID.
.It Ar getid Fl UGsSX Ar value
Takes any of the options and returns the associated UID or GID depending on option provided.
.It Ar getsid Fl ugUGX Ar value
Takes any of the options and returns the associated SID.
.It Ar checkmembership Fl uUxs Ar param Fl gGXS Ar param
Returns if a user or group with the associated option is a member of the group.
.It Ar flushcache
Flushes the current membership cache.
.It Ar dumpstate
Dumps the current state of the cache to /Library/Logs/membership_dump.log.
.It Ar statistics Op Fl f
Dumps the membership call statistics or optionally flushes them with the option
.Fl f .
A list of options available. In some cases 
.Fl xX 
.Fl sS
can be used synonymously due to nature of the value.
.Bl -tag -width "-x xxxxxxxxxxxx"
.It Fl u Ar uid
Using user with UID
.It Fl U Ar name
Using user with name
.It Fl s Ar sid
Using user with SID
.It Fl x Ar uuid
Using user with UUID
.It Fl g Ar gid
Using group with GID
.It Fl G Ar name
Using group with name
.It Fl S Ar sid
Using group with SID
.It Fl X Ar uuid
Using group with UUID
.Bl -tag -width -indent  \" Differs from above in tag removed 
.It Get a user's uuid:
.Dl % dsmemberutil getuuid -u 501
.Dl EEA4F2F6-B268-49E7-9C6F-E3C4A37DA4FD
.It Get a group's uuid
.Dl % dsmemberutil getuuid -g 0
.It Get a user's or group's id from a uuid
.Dl % dsmemberutil getid -X ABCDEFAB-CDEF-ABCD-EFAB-CDEF0000000C
.Dl gid: 12
.It Check a user's membership in a group (using UID and GID)
.Dl % dsmemberutil checkmembership -u 501 -g 0
.Dl user is not a member of the group
.It Check a user's membership in a group (using names)
.Dl % dsmemberutil checkmembership -U root -G wheel
.Dl user is a member of the group
.El                      \" Ends the list
.Xr DirectoryService 8 ,
.Xr dseditgroup 1 ,
.Xr dscacheutil 1