Solved

Disable Mobile Account on Mac OSX from command line

Posted on 2014-02-18
10
3,642 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 27

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 27

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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 27

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 27

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Information security is a multi-billion dollar industry. Just as lucrative is the black market industry which trades stolen identities, credit card numbers and software exploits all over the world. Nothing is hack-proof. The best one can do is make …
iCloud Drive was introduced after iOS 8 was launched last year. This drive is Apple’s online storage device that lets users sync their files and access them from all their Apple devices.   There is a lot of data that is not automatically backed up…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video discusses moving either the default database or any database to a new volume.

759 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

20 Experts available now in Live!

Get 1:1 Help Now