How to determine which UID is associated with which user

I"m running Mac Mini Snow Leopard Server 10.6.8, and have it using Open Directory and LDAP. I don't know much about this, so bear with me. I'm trying to deal with some permissions, and in the ACL listings for some folders, it identifies the user/group with a UID number. I don't know which users these numbers are associated with, so I don't know if I want to allow them access or not. How can I figure this out. Thanks.

Mac Mini and MacBook Air, Mac OS X (10.6.8)

Posted on Feb 27, 2012 9:01 AM

Reply
11 replies

Feb 27, 2012 9:53 AM in response to Stephen73

If the ownership is showing as numerics for the UID (or for the GID) for a Terminal.app "ls -al" command or related, then there likely isn't an associated user.


If the UID is 500 and up, it's probably a local user that's gone missing.


If 1000 or up, it was an OD/LDAP user.


If below 500, it's probably a system user that's a problem.


Exactly what has happened here, and why this has happened is probably more interesting. Encountering some sort of weird corruption in an LDAP configuration is No Fun. Some details on what you're seeing, please?

Feb 28, 2012 9:53 AM in response to Stephen73

Hi


On the Server launch Terminal and issue this command:


dscl /LDAPv3/127.0.0.1 -list /Users GeneratedUID


You'll see _krb users which you can ignore and everyone else will be listed. The above is for an OD Master. For users in the local directory:


dscl . -list /Users GeneratedUID


For a specific LDAP (shared directory) user:


dscl /LDAPv3/127.0.0.1 -list /Users/theusershortname GeneratedUID


or for a local (non-shared directory) user:


dscl . -list /Users/usershortname GeneratedUID


HTH?


Tony

Feb 28, 2012 11:04 AM in response to Camelot

I probably didn't describe very well what I'm looking for. When I'm in the shared folder in System Administrator, File Sharing, Permissions, it shows the owners or groups in the ACL and their permissions. One of the users is identified as "428D439A-3CED-47E2-8716-310306C6" and it has read and write permissions. There are a few other ACL entries like this, along with "Spotlight", "Everyone", an actual user short name and a group name. So I"m trying to figure out who the "428D..." user/group is.

Feb 28, 2012 12:21 PM in response to Stephen73

Hi


Strange that nothing should show up? Which one did you try and how did you try it exactly?


The name that precedes the user name you've used to log in (admin) will be the computer's (your server) name. Look in the Computer Name field in the Sharing Preferences Pane. To see the server's hostname simply key in the word "hostname" without the quotes in the Terminal window.


If you're not having any luck with dscl navigate to /System/Library/CoreServices and launch Directory Utility. Click on the Directory Editor icon. From there click on whichever directory node you're interested in - either /Local/Default or /LDAPv3/127.0.0.1 (assuming an OD Master). Once you've selected your node select which container you want to view from the Viewing selection. For Users select Users, for Groups select Groups. Use the filter option to find a user. Once you see a User (or Group) you're interested in you will see the GeneratedUID or GUID for that user on the right hand side. This will match up with what you're seeing for ACL entries.


HTH?


Tony

Feb 28, 2012 12:47 PM in response to Antonio Rocco

I tried the first two you have listed, and nothing was displayed. I'm running Snow Leopard Server 10.6.8. I also tried your suggestion using the Directory Utility, but it doesn't have a "Directory Editor" or any options to "view". There is no "Viewing" selection. It only has "Services" and "Search Policy". Sounds like this software is different that what you're talking about.

Feb 28, 2012 12:51 PM in response to Stephen73

Hi


Apologies. I was looking at a 10.7 System. On your Server Launch WorkGroup Manager and enable the Inspector option. WorkGroup Manager Menu > Preferences. You should see a small bullseye icon has been added to the interface. Click on the Users Icon, select a user and click on the Inspector Tab.


Do you see the GUID now?


I can assure you the commands do work on pretty much any OS (Client or Server) going back to at least 10.5. You must be doing something wrong perhaps?


HTH?


Tony

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to determine which UID is associated with which user

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.