Solved

Disable Mobile Account on Mac OSX from command line

Posted on 2014-02-18
10
3,821 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
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
 
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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Create a default user profile for Mac OS X 10.7/10.8 Create a user account on OS X that will be a template for every other user of that computer. I usually call it “profile” and make it an administrator account for the time being. 1. Install a…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
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 …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

777 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