Migrate a Local Account to Domain Account on macOS
May 19, 2022
A situation came up recently where a local account was created on a user's old MacBook and they wanted to migrate all of their data over to a new MacBook from their Time Machine backup.
When we setup new computers at my current company, we want to make sure the computer is linked to an Active Directory object in our organization. This caused an issue because the old MacBook was never linked to an Active Directory object, so all of the files and folders did not have the correct permissions set.
Below are the steps I took to make sure our user's files and folders were migrated successfully with the correct permissions.
Instructions
- Migrate using Time Machine as normal
- Log into the computer using the user's local account
- Make sure the files were migrated
- Logout of the computer
- Create a new computer object in Active Directory
- Add the user's account to the
User or Group
field of the new computer object - Make sure the computer is connected to the domain's internet
- Create or login to an account that is not being migrated with administrative access
- Change the computer name to match the computer name of the computer object in Active Directory in
System Preferences > Sharing
- Join the computer to the domain by going to
System Preferences > User and Groups > Login Options
and clickingJoin
- Make sure the
Computer ID
matches the computer name of the computer object in Active Directory - Change the user's local account's password to match their Active Directory domain account's password
- Delete the user's local account, but keep the local account's Home folder
- Rename the user's local account's Home folder to match the user's Active Directory domain account's username
- Open Terminal and run the following commands replacing
ADUSERNAME
with the user's Active Directory domain account's username andDOMAIN
with the domain:
- Logout and have the user login with their domain credentials
- Create a mobile/local account for the user's Active Directory domain account by going to
System Preferences > User and Groups
and clickingCreate
next toMobile account