BIG-RAT / mobile_to_local

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

app not responding and account lockouts #10

Closed OUTOTS closed 3 months ago

OUTOTS commented 5 months ago

almost everytime that I've tried to use this app it freezes, goes into not responding and will stay there for 30 mins+ until I force quit. image not sure what damages if any this is doing as even when the app freezes it still migrates the account to standard/admin and unbinds just hangs indefinitely.

And when it does work the account gives an error that it's locked out or the password used to migrate the account doesn't work to login. Have to go into a different account and change the password of the acc that was migrated.

BIG-RAT commented 5 months ago

What switches are used when launching the app? Done through a scheduled policy or self service? What shows up in the logs (/private/var/log/mobile.to.local.log)?

OUTOTS commented 5 months ago

I've tried a variation of switches: sudo /Users/username/Downloads/Mobile\ to\ Local.app/Contents/MacOS/Mobile\ to\ Local sudo /Users/username/Downloads/Mobile\ to\ Local.app/Contents/MacOS/Mobile\ to\ Local -userType standard -unbind true sudo /Users/username/Downloads/Mobile\ to\ Local.app/Contents/MacOS/Mobile\ to\ Local -mode silent -userType standard

I have since reimaged the machine, will try the process again today and provide logs.

OUTOTS commented 5 months ago

using the silent switch "sudo /Users/username/Downloads/Mobile\ to\ Local.app/Contents/MacOS/Mobile\ to\ Local -mode silent -userType standard"

The migration was completed but the acc was then locked out after. mobile.to.local.log image

marcogrima93 commented 3 months ago

i am having the same thing when running with the below payload

sudo /private/var/tmp/Mobile\ to\ Local.app/Contents/MacOS/Mobile\ to\ Local -userType standard; sleep 10; cat /private/var/log/mobile.to.local.log; sleep 5; rm -rf /private/var/tmp/Mobile\ to\ Local.app; sleep 3; rm -rf /private/var/log/mobile.to.local.log

it goes not responding and i need to force quit, restart and log back in to the account. it seems then its a standard account but i dont know what has been broken.

also i was unbinded the device without me asking to be unbinded

please fix this

BIG-RAT commented 3 months ago

Can we have a look at the log to get an idea where it's stalling? Most curious if we see chown -R :staff /Users/<someUsername>

marcogrima93 commented 3 months ago

To be honest the app got hung up only once, and so far after force quitting its been ok.

i tested another few times and it worked but what always happened was the password isnt correct and i would need to go to an admin account and reset it from there.

i also modified the script with a line to reset the password but i am yet to test

/usr/bin/dscl . passwd /Users/$currentname "$password"

below is how the end of the script looks i always get the failed for home directory tho

Thu May 02 15:08:38 RAMB906 marco-sadmin[migrate]: chown -R :staff /Users/marco-sadmin
Thu May 02 15:12:30 RAMB906 marco-sadmin[migrate]: failed to updated group for home directory
Thu May 02 15:12:30 RAMB906 marco-sadmin[migrate]: marco-sadmin was added to the staff group
Thu May 02 15:12:30 RAMB906 marco-sadmin[migrate]: marco-sadmin was removed from the admin group
Thu May 02 15:12:30 RAMB906 marco-sadmin[migrate]: loginwindow restarted.
BIG-RAT commented 3 months ago

Issues have been addressed in v2.6.2