In Mac OS X Lion, given a group's GeneratedUID, what command can I do a reverse lookup and find the group name? DSeditgroup (group name) will give me the GUID, but I'm looking for the reverse.
Thank you in advance.
Take a look at the getgrnam() or getgrgid() C functions included in Mac OS X.
See the getgrent manual page.
Also here is an example that needs some work, but something along these lines should allow given a GID number, lookup and print the group name.