Solved

Disable Mobile Account on Mac OSX from command line

Posted on 2014-02-18
10
3,726 Views
Last Modified: 2014-02-19
Hi,
I have few mac's where Mobile Account is enabled, I need a command so I can send it via Terminal to disable the Mobile account.

We have AD in the background.

Regards,
A
0
Comment
Question by:Ackles
  • 4
  • 4
  • 2
10 Comments
 
LVL 28

Expert Comment

by:serialband
ID: 39868025
What exactly do you mean?  AD logins are "Mobile Accounts".  They are not local accounts.  By joining your Mac to the AD, you enable Mobile Accounts.  You must be connected to the network to connect with AD/Mobile Accounts.  Did you want to unjoin the system from the domain?

sudo dsconfig -leave

Did you mean that you wish to delete the account from the local list of logins?  You can use dscl to do that.

sudo dscl . delete /users/USERNAME

You'll probably also want to delete the home folder that's been created there.
rm -r /Users/USERNAME
0
 
LVL 11

Author Comment

by:Ackles
ID: 39868033
In system preferences when u go to user, then AD, there is check box to enable Mobile accounts.
I just want that to be unchecked.
0
 
LVL 28

Assisted Solution

by:serialband
serialband earned 100 total points
ID: 39868071
That doesn't exist in Mavericks.  Which version of OSX is that?

You should be able to disable that with dsconfig.
sudo dsconfig -mobile disable


man dsconfig to see all the options
0
 
LVL 11

Author Comment

by:Ackles
ID: 39868141
Mountain Lion
0
 
LVL 10

Accepted Solution

by:
EdTechy earned 400 total points
ID: 39868800
dsconfigad -mobile disable
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 28

Expert Comment

by:serialband
ID: 39868996
Thanks for correcting my suggestion EdTechy.  I forgot the ad portion at the end when typing from memory.   :)

All the previous references by me to dsconfig, should be dsconfigad.
0
 
LVL 10

Expert Comment

by:EdTechy
ID: 39870165
I had to look it up again when man dsconfig didn't return results. :)
0
 
LVL 11

Author Closing Comment

by:Ackles
ID: 39870286
Serialband,
Thanks a lot, but EdTechy had it right.
Still you helped me.

Cheers,
A
0
 
LVL 28

Expert Comment

by:serialband
ID: 39870490
That's fine.  At least you solved your problem, and that's what matters.  I did make a mistake in my command.  Next time I'll type that into a Mac and get it right.  You'd think I would after typing it in so much before, but c'est la vie.  Besides, I got enough points already to view the answers from all the other topics I'm interested in.
0
 
LVL 11

Author Comment

by:Ackles
ID: 39870517
Thanks again for your help!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The error "There was an error performing the update" occurred on a Mac OS X client workstation running  Symantec AntiVirus for Mac (http://www.symantec.com/business/products/purchasing.jsp?pcid=pcat_security&pvid=825_1) - the Enterprise product vers…
In this article we have discussed about the OS X EI Capitan and how to fix Wi-Fi issue in OS X El Capitan. We have explained how to delete system level preferences and create a new Wi-Fi location to resolve Wi-Fi issue.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now