How to change the main user name of a used MacBook on macOS 10.13?
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.
Then Restart.
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.