BIG-RAT / mobile_to_local

Migrate mobile Active Directory account to a local account
MIT License
55 stars 4 forks source link

Unbind option even if local account is detected? #5

Closed tomsy-bb closed 1 year ago

tomsy-bb commented 3 years ago

I love this script / app !!! thanks so much for making this easy!

however I am missing one small feature that would solve a lot of things for me. A large amount of the macs we have are bound to AD, but on some, instead of logging in to a mobile account, the user is actually logging in with a local account (I inherited this set up, so no idea what the thought was behind it). Would it be trivial enough, when the unbind option is specified, to implement something like (and please forgive my layman's language!):

if local account is detected, check if AD binding exists - if yes, perform the unbind from AD - else nothing to see here.

(my script-fu goes as far as googling for stuff and flagrantly plagiarising with appropriate credit recognition, but have no experience in turning those in to apps)

Looking forward to any response!

Tom

BIG-RAT commented 1 year ago

Well this is long overdue. In case it helps someone you can unbind using something like this: sudo dsconfigad -force -remove -u whoever -p whatever

Username/password don't need to be valid and since they're in plain text should not be valid.