Link to home
Start Free TrialLog in
Avatar of Ackles
AcklesFlag for Switzerland

asked on

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
Avatar of serialband
serialband
Flag of Ukraine image

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
Avatar of Ackles

ASKER

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.
SOLUTION
Avatar of serialband
serialband
Flag of Ukraine image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ackles

ASKER

Mountain Lion
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
I had to look it up again when man dsconfig didn't return results. :)
Avatar of Ackles

ASKER

Serialband,
Thanks a lot, but EdTechy had it right.
Still you helped me.

Cheers,
A
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.
Avatar of Ackles

ASKER

Thanks again for your help!