Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How can I query account type information. Things like who and users don't show this. Also tried things like dscacheutil -q user

I'd like to know if a users account is a mobile account and I am doing this through SSH, inevitably I'd like to make a script so any network managed account can be made a mobile managed account using this command I found to make a current user's account a mobile account sudo /System/Library/CoreServices/ManagedClient.app/Contents/Resources/createmobileaccount -n userid -v

Any thoughts on how I can query that information? Account types I am aware of are Local, Networked Managed and Mobile Managed, but I cannot find any way to get this information via CLI.

share|improve this question

migrated from apple.stackexchange.com Mar 6 '13 at 22:19

This question came from our site for power users of Apple hardware and software.

    
Not sure but perhaps the dscl command can help you? I've not tried this before but it can do a lot with Directory Services query and commands. Good luck I'm curious about this too now. –  bispymusic Mar 2 '13 at 3:36
    
@bispymusic Unfortunately, I have tried quite a bit with dscl and nothing has been fruitful in providing the information I'm looking for. dscl . readall /users seems to give the most information overall as well, but still nothing of what I want. Thanks for the thought. I will keep everyone posted, if I find a solution. Still looking for one... –  TryTryAgain Mar 4 '13 at 18:20

2 Answers 2

If it's AD, you can use dsconfigad to see if the settings are set correctly

dsconfigad -show | grep Create\ mobile\ account

As for finding out if current users are mobile or not, I'm in the same boat and will post if I find something.

share|improve this answer

I'm not sure this answers completely the question, but I noticed that when I set an account to be a mobile account, file $HOME/.account is created. For local accounts and network accounts, this file doesn't exist

share|improve this answer
    
None of my, AD bound computers, mobile accounts, have that hidden file you mention. Could have been a little helpful. Which OS version do you see this on? I don't see this on anything 10.7+ –  TryTryAgain Dec 3 '13 at 19:20

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.