Renaming an Existing User on macOS®

Written by Zach DeMeyer on September 4, 2018

Share This Article

In this blog post, we will be discussing how to use JumpCloud®’s macOS® account rename utility to rename an existing macOS® user account as laid out in our tutorial video below.

This utility can be leveraged by Mac® admins in situations where existing local macOS account usernames need to be updated due to an employee’s marriage and legal name change, or in any other scenario where an existing macOS account username needs to be altered.

As it relates to JumpCloud, this script is designed to prescribe a clear path for admins who need to update an existing local account macOS username to an employee’s JumpCloud username prior to account takeover by the JumpCloud agent to ensure that account takeover will occur.

As a reminder in order for the JumpCloud agent to take over an existing local account on macOS, the JumpCloud username must match identically with an existing local account username on the system.

The Rename script for macOS can be found here.

After downloading the script on the system that has an account which needs to be renamed, fire up the terminal application using a local account with administrative privileges.

In the terminal, navigate to the location of the downloaded script using the ‘cd’ (change directory) command.

After navigating to the location of the downloaded script, run the below command and substitute the current username name and the new name of the user account into the respective parameter locations.  

sudo sh RenameMacUserNameAndHomeDirectory.sh CurrentUserame NewUsername

After the script is run, the JumpCloud system will restart, and the account can be accessed via the user’s existing password. After the username is updated, a JumpCloud admins can bind a JumpCloud user that has a matching username to the system and the agent will takeover the renamed local account and push down the users JumpCloud password to the system.

That completes the renaming of the existing user on macOS! You can find a more detailed article on the process, as well as general JumpCloud Directory-as-a-Service® naming conventions at our Knowledge Base. If you have any questions, feel free to contact us to learn more.

Zach DeMeyer

Zach is a Product Marketing Specialist at JumpCloud with a degree in Mechanical Engineering from the Colorado School of Mines. He loves being on the cutting edge of new technology, and when he's not working, he enjoys all things outdoors, music, and soccer.

Continue Learning with our Newsletter