Posted on 09-15-2017 10:56 AM
Greetings. I'm working on automating a very manual process and need to know if automating this one part is possible.
When a customer gets married and their name changes, there is a manual process involving the following:
-Unbind from AD
-Update computer name
-Create a new user account
-Move the data from the former home folder to the new
-Rebind the Mac
-Relaunch CrashPlan
I know all this can be automated and I have the computer renaming piece done, unbinding and re-binding complete and tested. What I am struggling with is adding to my script the ability to:
-Successfully create a new home folder (with the new name/proper permissions)
-Moving the customer's data from their old directory to the new
That's the piece I'm struggling with automating. If you have any nuggets of knowledge or tips/tricks, please send my way, it would be greatly appreciated.
Posted on 09-15-2017 11:51 AM
We've been working with name changes a bit as teachers return from the summer. You don't need to create a new account, as per this guide from Apple, you can just change the username while the user is logged out, and update their home folder name as well. In theory it's easily scriptable, but it all needs to happen with the user logged out.
Posted on 09-15-2017 12:10 PM
@jbourdon , do you have a link to the guide?
Posted on 09-20-2017 07:07 AM
@steve.summers This one perhaps? HT201548
Posted on 09-20-2017 07:08 AM
You should be able to use dscl to define the new home folder location.