Skip to main content
Question

Converting AD Mobile Accounts to Local

  • December 17, 2016
  • 58 replies
  • 348 views

Show first post

58 replies

stutz
Forum|alt.badge.img+5
  • Contributor
  • August 23, 2022

Worked on my test machine, macOS 12.5.1.  My AD environment is a bit dated though, 2012, not sure if that's a factor.

Updated the logging, now logs to /var/log/mobile.to.local.log.  Reviewing that may shed some light on what's (or what's not) going on.  How did you launch the app, what switches.


I've confirmed the Big-RAT solution is working on 12.5.1

https://github.com/BIG-RAT/mobile_to_local 

- Put the latest app version in /private/var/tmp, used composer to package the app.
- Created a Jamf policy, add the app package, and added the following command (with switches) to "Files and Processes" payload.
        - sudo /private/var/tmp/Mobile\\ to\\ Local.app/Contents/MacOS/Mobile\\ to\\ Local -mode silent -userType standard -unbind true; 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

Account switched from "mobile" to "standard".  No issues with account password, user was still FileVault enabled and the policy was ran while logged into the users account.

One thing I did notice is the Mobile to Local app window pops up for like 3 seconds, then goes away even though I had the "mode" switch set to "silent".  Not sure if thats is expected or not.


Forum|alt.badge.img+12
  • Valued Contributor
  • August 23, 2022

I've confirmed the Big-RAT solution is working on 12.5.1

https://github.com/BIG-RAT/mobile_to_local 

- Put the latest app version in /private/var/tmp, used composer to package the app.
- Created a Jamf policy, add the app package, and added the following command (with switches) to "Files and Processes" payload.
        - sudo /private/var/tmp/Mobile\\ to\\ Local.app/Contents/MacOS/Mobile\\ to\\ Local -mode silent -userType standard -unbind true; 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

Account switched from "mobile" to "standard".  No issues with account password, user was still FileVault enabled and the policy was ran while logged into the users account.

One thing I did notice is the Mobile to Local app window pops up for like 3 seconds, then goes away even though I had the "mode" switch set to "silent".  Not sure if thats is expected or not.


 

Getting the following when running it with your payload.

 

Running command sudo /Applications/Utilities/Mobile\\ to\\ Local.app/Contents/MacOS/Mobile\\ to\\ Local -mode silent -userType standard -unbind true; sleep 10; cat /private/var/log/mobile.to.local.log; sleep 5; rm -rf /Applications/Utilities/Mobile\\ to\\ Local.app sleep 3; rm -rf /private/var/log/mobile.to.local.log... Result of command: /bin/sh: - : invalid option Usage: /bin/sh [GNU long option] [option] ... /bin/sh [GNU long option] [option] script-file ... GNU long options: --debug --debugger --dump-po-strings --dump-strings --help --init-file --login --noediting --noprofile --norc --posix --protected --rcfile --restricted --verbose --version --wordexp Shell options: -irsD or -c command or -O shopt_option (invocation only) -abefhkmnptuvxBCHP or -o option

 

 


Forum|alt.badge.img+12
  • Valued Contributor
  • August 23, 2022

Nevermind I got to work but is there a way to add a script "After" to turn the logged in user into a Standard user into an Admin?

#!/bin/bash while read useraccount; do /usr/sbin/dseditgroup -o edit -a $useraccount -t user admin done < <(dscl . list /Users UniqueID | awk '$2 >= 1000 {print $1}')

But it doesn't seem to work.


Forum|alt.badge.img+12
  • Valued Contributor
  • August 23, 2022

Nevermind it required a Restart. All is well in the shire.

Thank You.


leslie_h
Forum|alt.badge.img+14
  • Employee
  • August 23, 2022

Nevermind it required a Restart. All is well in the shire.

Thank You.


Good to hear.  You can also set the migrated user as an admin by using:

-userType admin

If your goal is to make all users admins your script should be fine.


stutz
Forum|alt.badge.img+5
  • Contributor
  • August 23, 2022

I've confirmed the Big-RAT solution is working on 12.5.1

https://github.com/BIG-RAT/mobile_to_local 

- Put the latest app version in /private/var/tmp, used composer to package the app.
- Created a Jamf policy, add the app package, and added the following command (with switches) to "Files and Processes" payload.
        - sudo /private/var/tmp/Mobile\\ to\\ Local.app/Contents/MacOS/Mobile\\ to\\ Local -mode silent -userType standard -unbind true; 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

Account switched from "mobile" to "standard".  No issues with account password, user was still FileVault enabled and the policy was ran while logged into the users account.

One thing I did notice is the Mobile to Local app window pops up for like 3 seconds, then goes away even though I had the "mode" switch set to "silent".  Not sure if thats is expected or not.


duplicate post. sorry


Forum|alt.badge.img+12
  • Valued Contributor
  • August 23, 2022

Last time I tried to do this it did not work but I will try again with that switch also if I didn't want the mode to be silent what other switch can be used and what would it look like on the users end?


Forum|alt.badge.img+12
  • Valued Contributor
  • August 24, 2022

@leslie_h  Do you know or have you encountered an issue where the account was migrated successfully, you restart and login with no issues but when trying to change the password is completely locks you out of the machine and nothing works. Trying to reset the password via Recovery and there are no accounts present on the drive. This is an M1 mac.