I just bought a used MacBook Air 2012 with High Sierra. I would like to change the user name to mine. I tried changing it in the address book or at the preference login but the old name is still stuck when I look at it from anywhere else such as in Terminal or on the side pane of finder. Any suggestions?
When you buy a secondhand Mac, you should ideally wipe the disk and reinstall the OS. This will give you a clean 'factory' system, and on first boot will walk you through setting up a new user.
You cannot be certain whether there is malware, or deleted system files, or out of date incompatible third-party software -- either through ignorance or malice on the part of the seller.
If you trust the seller, and they've already done a clean install, but created a user account, then you can re-run the Apple Setup Assistant, which is normally run on the first ever boot, and allows you to setup user accounts and other settings on your Mac.
Launch the Terminal.app (in /Applications/Utilities). Enter the following command:
sudo rm /var/db/.AppleSetupDone
You will be asked for the admin user's (i.e. your) password.
If you've already created files in the existing user account, then you'll need to back them up and then restore them to the new user account, before deleting the old one.
(You'll need to backup your files anyway, if you don't want to lose them.)
You can do the short name shuffle. I prefer this over trying to rename an existing account. Much better to make it “new” with the old files intact.
- Make a new admin - to rename the old account(s)
- Log out of the old and in to the new
- Use the new to delete the old account - answer “don’t change” the home folder when asked
- Open /Users and rename the deleted folder to be the new account short name of your choice
- Create a new account - specify the new short name from above step
The system sees the user folder is present and asks you to confirm to reuse it, answer yes. Log out of the new admin and test the old documents with the new renamed account. No need to delete the temp account, but you can now if you please.
Changing your username is very difficult once your operating system is installed and a user is set up, because that would involve having to change the path and corresponding file permissions of your home user folder, all without creating a new home user. With that being said,
the best way is to:
- Back up your current user to an external hard drive using bootcamp or the free app called SuperDuper!
- Completely reformat (optional) and reinstall (optional) MacOS (recommended for 2nd hand Macs).
- Create a new user from MacOS.
- Import your old user files into your new user account using Migration Assistant or SuperDuper,
Then you are done.