1

On one (old OS X 10.4) server I'm tarring up some files which have ACLs. I'm then using ``tar -xp'' to untar the archive onto a new 10.6 server, which doesn't have any users/groups configured on it yet except the default admin (UID 501) (there's a reason for that, don't ask!). Obviously this means an "ls -lne" will list files and ACLs with numeric UIDs and GIDs.

Now for the normal file permissions it makes sense: you get UIDs like "1037". And for some ACLs, it also makes sense: you get things like "AAAABBBB-CCCC-DDDD-EEEE-FFFF00000402" for groups (0x402 = GID 1026) and "FFFFEEEE-DDDD-CCCC-BBBB-AAAA000001F5" for users (0x1F5 = UID 501).

However, some ACLs have a UIDs like "E51DA674-AE70-41BC-8340-9B06C243A262" or GIDs like "0A3FCD24-0012-46FA-B085-88519E55EF29" and I have absolutely no idea how to translate these IDs back into something that could be matched back to the original IDs (UID 1072 and GID 1047 respectively in this example).

Can anyone help me translate these weird long hex strings?

(Basically we're moving from local users to an Active Directory setup, so I want to move all files to the new server with permissions intact, then chmod, chgrp and set ACLs such that we translate old IDs to the new AD IDs. Hence needing some way to map between the sets. I don't believe there's an easier way to do this?)

Many thanks,

Oliver.

1 Answers1

3

The documentation states that "the computer generates" these UID's so I suppose there's no documented algorithm to translate between the two. You can, however, list user ids and generated uids and create a look-up-table to facilitate this translation.

To find the hex-string (among other things)for a user use this command: dscl /Search -read /Users/oliver GeneratedUID UniqueID 'dsAttrTypeNative:givenName'

To list all generated UID's:

  dscl  /Search -list  /Users GeneratedUID 

To list all unique id's ("normal" uids)

  dscl  /Search -list  /Users UniqueID

Hope these help (maybe not you anymore, but this comes up in Google so someone else might still find this usefull).

I.