Skip to main content
Question

Name Changes

  • September 15, 2017
  • 4 replies
  • 24 views

Forum|alt.badge.img+9

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.

4 replies

Forum|alt.badge.img+12
  • Valued Contributor
  • September 15, 2017

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.


Forum|alt.badge.img+9
  • Author
  • Valued Contributor
  • September 15, 2017

@jbourdon , do you have a link to the guide?


Forum|alt.badge.img+9
  • New Contributor
  • September 20, 2017

@steve.summers This one perhaps? HT201548


Forum|alt.badge.img+9
  • New Contributor
  • September 20, 2017

You should be able to use dscl to define the new home folder location.