Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How do you view Mac OSX user id without having to boot into OSX? I can mount the drive, but I can't find the UID for my user, which would hopefully enable me to access files without being root.

share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted

I found my answer here. This is the UID that's tied to the user account.

According to this article, the user information can be found in this file

/var/db/dslocal/nodes/Default/users/{user-name}.plist

I verified and the UID was at the bottom of the file, in my case. There's also some business about a generateduid, but that's not what you want, so ignore that.

And to check ownership of the home folder, I used stat /media/OSX/Users/someone.

share|improve this answer
add comment

Your non-sensitive user information is stored in the /etc/passwd file on your Mac OS just as in other *nix systems. (This information is confirmed by this link). So you could use the following steps to retrieve the UID of a user.

  • Mount your Mac OS partition. In that look for a file called passwd in the etc folder of your Mac. In other words, open the /etc/passwd file of your Mac OS.
  • Scroll and find your username
  • The third number in the line corresponding to your username should be the UID of that user. For example, my username is nits and my UID is 1000 and my GID is 1000 too

    nits:x:1000:1000:nits,,,:/home/nits:/bin/bash

For more information on the /etc/password file, look into this blog post on *nixCraft

share|improve this answer
    
That's helpful, but I found my answer elsewhere and, in my opinion, it's a little more helpful and complete (I would like to find the UID on my homefolder as well). –  weberc2 Feb 24 '12 at 9:45
    
Cool :) Upvoted your answer, make sure you accept it by clicking on the tick-mark next to your answer :) –  nitstorm Feb 24 '12 at 10:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.