Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How would I get user information from a Mac such as user domain, etc. through a Terminal command?

I've tried dscl as well as dscacheutil, but they don't really have what I'm looking for. I was wondering if there any other options out there for retrieving user information. If not, I'll make do with these two commands.

share|improve this question
    
When you say "domain", what exactly are you referring to? An Active directory domain? LDAP? How is the system configured to be on the domain? –  Darth Android Oct 11 '12 at 15:18
    
An active directory domain. –  John Oct 11 '12 at 19:12

1 Answer 1

This can be accomplished by using ls -l /Users/

and will be returned something similar to:

drwxrwxrwt 5 root wheel 170 Feb 1 2012 Shared

drwxr-xr-x+ 12 DOMAIN\finalcuteditor staff 408 Sep 7 2011 finalcuteditor

drwxr-xr-x+ 19 local-admin staff 646 Sep 18 20:50 local-admin

...where DOMAIN\user will give you the information you are looking for.

Also, you may find value in this command: dscl . readall /users or for less verbose information you may find what you need using dscl . readall /users | grep username

...dscl tip taken from http://stackoverflow.com/a/1308064/805031

share|improve this answer
    
That will provide you with the Domain, as you asked. It seems you are looking for other information as well. If so, let me know and I will post back. I am currently investigating this as well, why I found your post, and have a post here: apple.stackexchange.com/questions/83943/… –  TryTryAgain Mar 1 '13 at 22:36

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.