Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4635
  • Last Modified:

Disable Mobile Account on Mac OSX from command line

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
Ackles
Asked:
Ackles
  • 4
  • 4
  • 2
2 Solutions
 
serialbandCommented:
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
 
AcklesAuthor Commented:
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
 
serialbandCommented:
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
Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

 
AcklesAuthor Commented:
Mountain Lion
0
 
EdTechyCommented:
dsconfigad -mobile disable
0
 
serialbandCommented:
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
 
EdTechyCommented:
I had to look it up again when man dsconfig didn't return results. :)
0
 
AcklesAuthor Commented:
Serialband,
Thanks a lot, but EdTechy had it right.
Still you helped me.

Cheers,
A
0
 
serialbandCommented:
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
 
AcklesAuthor Commented:
Thanks again for your help!
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 4
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now