?
Solved

Disable Mobile Account on Mac OSX from command line

Posted on 2014-02-18
10
Medium Priority
?
4,183 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
10 Comments
 
LVL 30

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 30

Assisted Solution

by:serialband
serialband earned 400 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
Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

 
LVL 11

Author Comment

by:Ackles
ID: 39868141
Mountain Lion
0
 
LVL 10

Accepted Solution

by:
EdTechy earned 1600 total points
ID: 39868800
dsconfigad -mobile disable
0
 
LVL 30

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 30

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A common question or need, when setting-up a new Mac for someone would be to make all of the applications, installed, available from the dock. Many people often do not realize an application is installed unless it is in the dock. Creating a custo…
We could spend the next millennium discussing the differences of the Mac and Windows platforms. The next century will continue to have fanatics on both side of the equation and neither side will win the war. However, that’s not why we are here. W…
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 …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

752 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