How to change username in mac os. Change username in Mac OS. How to change the account name

In cases where you're buying a used Mac or inheriting a family member's computer, you'll likely want to change the name of the user's folder (it might also be called the Personal folder or home directory). This desire seems logical, but how easy is it to do what you have planned? Of course, you may encounter certain problems, but with the right approach, you can achieve what you want without significant loss of time. The most important thing is to follow the recommendations.

Of course, you need to start with proper preparation. Before proceeding with active actions, you should take care of creating a backup copy. Yes, all further processes should not pose any threat to the system, but it must be understood that “should not” has never been a 100% guarantee. Separately, it is worth noting that iCloud does not always painlessly transfer the renaming of the home directory, so it is best to prudently disable the function for documents and the desktop.

Create an additional administrator

So, the preparations are completed, now you can begin to complete the task. Our initial goal is to create an additional administrator user on the computer (this part is skipped for those who do not need it).

Step #1. You need to open "Users and Groups" in the System Preferences panel.

Step #3. Click the plus button under the list of existing users.

Step #4. In the dialog box that appears, select the inscription "Standard" from the drop-down list, which you want to change to "Administrator".

Step #5. Enter a name for the new user account. It is worth noting that you can delete this account as soon as it is no longer needed, so the naming process should not be given significant attention.

Step #6. Click on the "Create User" button to get a user with administrator rights.

The task was completed, so now we are interested in the next stage - the transition from one even record to another. To do this, the user must be logged into their new or existing administrator account in order to be able to make changes to the main account's home directory.

Step #1. You need to log out of the current user account in the Apple menu - this is where the chain of successive actions begins.

Step #2. Login to an administrator user account. If this is the first time you're signing in to this account, you'll be prompted to sign in to iCloud - it's no different than when the Mac boots up for the first time. However, in no case do not do this, so ignore the offer.

Step #3. Open Finder and then navigate to the home folder you want to change. You will find it in the following path: "/Users/[username]".

Step #4. You should rename the folder, doing it in the same way as in the case of any other directory. Enter the administrator account password when prompted.

Step #5. Open "Users and Groups" - you need a settings panel.

Step #6. Right-click on your primary account name (located in the sidebar) and then select "More Options".

Step #7. In the window that appears, you need to change two things: the account name and the home directory. If you wish, you can also change the full name, but this is not strictly necessary. Enter the desired user data in the account name (and full name, if such a desire still arose), and then click the "Select ..." button to select the renamed user folder.

Step #8. Click the OK button and then close the System Preferences window.

Step #9. Sign out of the administrator account to your main account.

Step #10. After all the steps above, you can delete the created user with administrator rights. Select the administrator account in the "Users and Groups" panel, click the minus sign under the list of users. Make sure "Delete Personal Folder" is selected, and then click the "Delete User" button.

Problems and Pitfalls

It's time to write about possible problems that arise after changing the name of the user's folder. Since this action cannot be classified as regular, we have to state deviations from the norm that need to be corrected. Dock settings, entry points, keyboard shortcuts, iCloud - all of these are at risk, and this should be considered.

Something that is not directly related to the OS itself can also lead to flaws. Some programs on your computer indicate the location of the data using the full path to the file. An effective option is to reinstall the program that solves this problem, and you can implement your plan with Adobe software.

Dropbox Fix - This program is a great example of when it takes a little more effort to achieve the desired result. If your home directory name changes then Dropbox will "complain" if it is running. What exactly is this expressed in? An appropriate dialog box appears, notifying you of the problem - Dropbox will ask for a username and password in order to make corrections. However, the difficulties that arise are not as serious as it might seem at first. The real problem is that the Dropbox folder isn't looking for something that doesn't exist anymore.


Step #1. Download the latest Dropbox installer.

Step #2. Open "Terminal". If you have not come across it before, you can find it in "Applications / Utilities", the second option is to type "Terminal" in Spotlight, which helps with a quick search for the necessary objects.

Step #3. Type the following commands into the terminal. Note that you should enter them one at a time, pressing the Enter key after each one, but it is advisable to use copy and paste to avoid accidental typos. You will have to enter the password after the first command, but each subsequent one will work without it.

Command list:

sudo chown "$USER" "$HOME"

sudo chown -R "$USER" ~/Dropbox

sudo chmod -R u+rw ~/Dropbox

sudo mv ~/.dropbox ~/.Trash/dropbox.old

sudo mv ~/.dropbox-master ~/.Trash/dropbox-master.old

sudo chmod -N ~

sudo mv /Library/DropboxHelperTools ~/DropboxHelperTools.old

In case you're wondering, these are all commands to reset some permissions and unnecessary Dropbox installation files that refer to the old home directory.

Step #4. Reinstall Dropbox from the .dmg you downloaded earlier.

Conclusion: Renaming a user folder is easy, but you should be prepared for the fact that further steps will require a lot of effort. In some cases, fixing major and minor issues can take several hours, so it's best to think about the appropriateness of the intended renaming in advance.

With the release of new versions of Mac OS, interfaces change, including various settings. As a rule, there are no major changes, but there are updatesthat "hide" some functions or transfer them so that an inexperienced user is lost and does not know where to look for them. This situation is observed with user management in new versions of the operating system, so it would be useful to understand in more detail how to change the username in Mac OS.

In Macbooks, accounting can also be beautiful

First you need to figure out what exactly you want to change. The Mac divides the username into full and short. Both can be used to log in, but the short one also specifies the name of the user's folder where their data will be stored.

Change the full account name

  1. Be sure to exit the account that we are going to change. If this is the only administrator, then you need to create another one and delete it after the completion of the manipulations, if it turns out to be superfluous.
  2. We go into the boot disk and find the folder "Users". Inside is a folder that we need to rename. Do not forget that its name must match the desired username. For safety, write down both the old and new versions in a text document or on paper.
  3. Like last time, we go to "Users and Groups", we get administrative access.
  4. Like last time, we call the context menu with the right button on the user, we enter the interface of additional parameters.

  1. We are interested in the "Account" field, we fill it in based on the name of the folder that we recently renamed. Letter for letter. Please note that we cannot use spaces. If you have already typed a space, be sure to delete it, you will not be able to continue writing with it.
  2. We look at the "User folder" field, the full path to the folder is indicated there. Manually prescribe a new path with a new name.
  3. Confirm all changes with the "Ok" button.
  4. We reboot the device.

IMPORTANT. Don't touch other fields.

After all the manipulations, do not forget to remove the extra administrator if it is not useful to you, and make sure that our target account is functional and the attached folder is available.

Conclusion

Before you start changing anything, be sure to read the instructions in full and decide what exactly you are going to change. When you understand exactly what you want, start manipulating and be very careful, playing with system settings can lead to loss of necessary or important data. So, we figured out how to change the username on a MacBook.

If you have any questions - ask them in the comments.

The name and profile picture give your MacBook a personal touch and make it easy to find it in your device list when using AirDrop and Find My Mac. How to change the name and image of the MacBook, as well as where they will be displayed, read our instructions.

How to change the MacBook name

    Do not confuse the MacBook name with the account name. The former is displayed when transferring files via AirDrop and searching for a device via the Find My Mac app.
  • open SettingsGeneral access
  • In line Computer name name your mac whatever you want

How to Change MacBook Image

    The installed picture will be displayed when logging into the account, as well as to users who transfer files to their MacBook via AirDrop. There is a nuance: if a person added you to contacts and put a different image, when sending data, he will observe it.
  • open Settings → Users and groups
  • Click on the round frame with the avatar
  • In the window that appears, take a picture with the iSight camera, select an image from the standard ones or add it from the Finder, for this you need to close the window and drag the desired image onto the frame

How to change the account name

OS X has a name and a full name. They are used to sign in to an account, name a user's folder, and authenticate to perform certain actions on a MacBook (if you're an administrator).

  • Remove change protection. Click on the lock in the lower left corner and enter the administrator password
  • In the same section Users and groups click on the left column right-click the trackpad on the profile you want to change the name of. In the context menu, open the item Extra options
  • In the window that appears, enter the profile name in the line Account and full name in the corresponding field. Do not touch other items, changing them can harm the MacBook. After configuring the desired settings, click OK and restart your computer.

How to display your name in the menu bar (menu bar)?

    To quickly switch between accounts and just for beauty, you can display your name in the OS X menu bar.
  • In the settings section Users and groups open the menu Login options. If all items are inactive, remove the ban on changes (click on the padlock in the lower left corner of the window)
  • In the menu, check the box Show fast user switching menu and select display name from the list

All Macs are initially configured in such a way that at least one administrator user is present in the OS. But it happens that during global system changes (installing updates, changing access rights) or computer configuration from Mac OS, a user with administrative privileges “disappears”. That is, the account, for the most part, remains in the system (without any changes in the file hierarchy), but it loses the possibility of administration. This problem is quite infrequent, but in our practice it happens with enviable regularity.

We will consider two options for possible restoration of a user with administrative privileges. The first is used by the author of the English-language article, Topher Kessler, the second is used by us. Until now. The third part of this article will be a list of tips on what to do if enabling the administration option does not help. So,

Method one. Usage Single user mode(Single User Mode) and System Setup Assistant

Initially, the new Mac comes without created user. When you turn on your computer for the first time, it automatically starts System Setup Assistant, running with super-user (root) access rights. This program offers create administrator and configure the system. After its completion in Mac OS, a mark is made on the successful setup of the system and run again System Setup Assistant(present in Mac OS always and stored in the root folder System -> Libraries -> CoreServices) becomes impossible. The trick to Kessler's method is to remove this mark and re run the setup program, create a new administrator and use it to change the access rights of the previously created users.

A hidden mark of successful system setup is stored at /var/db and is called ".AppleSetupDone". At everyone Starting the computer, the operating system checks for its presence and if it does not find this file, it starts the setup assistant automatically. Let's get started.

  1. We start the computer in Single user mode(Single User Mode)
    To do this, we restart the computer and, when it is turned on, press and hold down two keys: ⌘ (Command) + S. The usual graphical shell will not loaded, don't be alarmed, you will be taken to the command line interface with super-user (root) access rights. This is a very powerful mode that gives you full unlimited access to all aspects of the system using terminal commands, you need to use it with understanding and some caution. With the right skill, many of your Mac's problems can be solved with it.
  2. Enable write access to the file system
    By default, when loaded into Single user mode you get access only to read information from the hard disk, without the possibility of changing it. This does not suit us, so we enter the command:
    mount -uw /
  3. We remove the hidden mark about the successfully completed system setup
    We enter a single command line to delete the file we need exactly as it is presented below. Be careful, the only space present in the code follows the "rm" command, there should not be any others.
    rm /var/db/.AppleSetupDone
  4. We restart the computer
    All necessary actions required by us to carry out in Single user mode produced. Reboot the computer by entering the command:
    reboot

All commands already entered

The result of all the operations performed will be the launch System Setup Assistant when you turn on your computer. Following his prompts, we create a new, different from existing users, administrator (that is, the name of the created user must be unique and different from the names already present in the user system). We boot into it and work in it.


This administrator user is temporary and will be deleted in the future, we only need it to enable administration for other accounts

Now opening  -> System Preferences -> everyone accounts present on your Mac. It is enough to find the necessary user and in its properties check the checkbox "Allow this user to administer the computer". Exactly what we wanted in the first place!


The required checkbox is highlighted in red

Method two. Enabling and working in the root superuser

This method is "transparent" for fans of the graphical interface, so many will be more comfortable using it. The logic of reasoning is similar to the one presented above: to enable the administrator on a Mac (provided that at least one administrative account is missing), work with super-user rights, root, is required. But this time we won't run System Setup Assistant, but elementarily turn on this account.

The superuser root is always present on the Mac, but initially the ability to log into this account is limited. To turn it on use Password reset utility.

    1. Starting the computer from the recovery partition
      To do this, we restart the computer and, when it is turned on, press and hold down two keys: ⌘ (Command) + R. After the recovery system has finished loading, a desktop will appear with the operating system menu bar and the program window Mac OS X Utilities.

    1. We launch Password reset utility
      In the menu bar, select Utilities -> Terminal. In the opened window Terminal enter the command exactly as shown below:




Just like in the instructions, enter the command "resetpassword"

    1. Enable superuser root
      In the opened Password reset utility select the root user and set the password for the account. This must be done, the root user cannot be without a password. At Apple, when creating images of diagnostic systems, by default, the root password is configured, which is equivalent to its short name - "root". Click the "Save" button, a message will appear indicating the success of the procedure.

By the way, using the recovery partition and Password reset utilities you can reset the password not only of the root user, but also of any other user presented in the system. If security is a concern for you, Apple recommends enabling FileVault 2 data encryption, which will make this operation impossible.

Close all windows, including window Mac OS X Utilities. In the dialog box, we will be prompted to "Restart the computer", which we helpfully agree to. When the system starts, a new entry will appear in the account login window, "Other". This is what you need. Select it, enter “root” in the username, “root” in the password field (if you entered your own password in the third step of this instruction, enter it). Now by opening  -> System Preferences -> Users & Groups, you can manage everyone accounts present on your Mac. It is enough to find the necessary user and in its properties check the checkbox "Allow this user to administer the computer".

But that's not all. We solved the original problem, but at the same time made the operating system less secure by including the root superuser. It should be turned off.

  1. Disable superuser root
    Being in the same "Users and Groups" settings System settings click on the "Login Options" tab and in the right part of the window we find the "Connect" button opposite the entry "Network account server". Click it and then, in the window that opens, click the "Open Directory Service" button. Launching a separate program Directory Service, in the menu bar of which we select Edit -> Disable root user.

Part three. When enabling an administrator is not enough

Yes, that happens sometimes too. You tick the checkbox "Allow this user to administer the computer" in System settings, but it does not lead to the desired effect. In this case, there is only one way out - deleting the user.

Very important. Make sure you have a backup all the data you need (if you make a small mistake in the next steps, you can part with all the information)!

    1. We delete the user with saving all data and settings
      Open  -> System Settings -> Users and Groups, select the "objectionable" user and delete it by clicking on the minus "-" button. The system will ask you what to do with the user's home folder. Important! Select "Do not change user folder".



    1. Checking the safety of the user folder
      Open the "Users" folder on your Mac and make sure that there is a folder of the deleted user step before it (the "Users" folder is stored in the root of the hard drive, for quick access to it in the menu bar Finder select Go -> Computer and open your hard drive, which is named "Macintosh HD" by default). Remember the name of this folder, it is equivalent to the name of the "account" (in the English interface, the more understandable term "short name" is used) of the remote user. In recent versions of the operating system, the label "Remote" is added to the name of the remote user. The name of the folder will be edited and this mark will be deleted.


The same label

    1. Creating a new user
      In the same settings "Users and groups" of the program System settings create a new user by clicking on the plus "+" button. It is very important at the creation stage to specify the same name of the “account” (short name) that the user had earlier, we remembered it with the item earlier, it is the same as the folder of the remote user. And of course, change the type of the new account you are creating from “Standard” to “Administrator”. If everything is done correctly, the operating system will report that it has found another user folder and offer to use it for the new administrator. Agree, this is what we started everything from. A new account with administrative privileges will be created, saving all your data and settings.

Despite the ambiguous title, the article will not be about hacking accounts in Mac OS X at all (you can read about this, if you wish, on specialized Internet resources). On the contrary, today we will consider a situation where, due to the circumstances the user forgets the login password and it is not possible to recover it.

RESET VIA APPLE ID

To begin with, we note that in a similar situation, Apple now offers reset your password with your Apple ID. This is an exclusive feature of OS X Lion, and there are two ways to enable it - either during the initial system setup, or in the "Accounts" panel in System Preferences.

After several unsuccessful attempts to enter your password, you will see a pop-up window on the login screen asking you to enter your Apple ID. The system will honestly warn you that it will reset your password, but the Keychain, where all the passwords you entered earlier are stored in encrypted form, will remain blocked until you remember the old password. Since the old Keychain can no longer be used, the system will create a new one.

RESET PASSWORD IN SINGLE-USER MODE

If the installation DVD is not at hand, and you can’t remember the password, the following password reset method can help.

After turning on the Mac, while the welcome screen is displayed, press and hold the key combination Cmd+S until the computer boots into single user mode and we see the command prompt. In fact, working in the command line is not much different from working in the Terminal, and therefore, users who have already had experience with this application will not seem unfamiliar with the proposed commands. Do not forget that after each command entered, you should press the key RETURN.

mount -uw /


launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist

The following command displays a list of all users on this Mac:

ls /users

Now the most interesting and important thing is to enter the command in which username replace with the username for which the password should be changed, and instead of password enter the desired new password.

dscl. -passwd /Users/username password

The final touch will be to restart the computer using the following command:

reboot

METHOD NUMBER THREE

This is an even funnier way of fooling Mac OS X and forcing a new user to be created on the system, bypassing all passwords.

As in the previous method, holding down the keys Cmd+S, boot into single user mode. Then we enter the following two commands, not forgetting to press after entering each command RETURN:

mount -uw /

rm /var/db/.AppleSetupDone

To restart the Mac, we use a command that is slightly different from the one we used in the previous version:

shutdown -h now

As a result of our actions, we made the system think that it had never been launched before. As a result, after the reboot, we will have to go through all the steps of setting up and registering the system again. In any case, the information on the hard drive will remain safe and sound, so feel free to go through all the setup steps, not forgetting to refuse data migration at the very end.

After the reboot, we log into the system under a new account and, by opening Settings panel, go to the section Accounts. In the screenshot, we see in the list of users the name Master(the old account we want to reset the password for) and Anjul(new admin account we created in single user mode).

In order to unlock the list and be able to make changes, click on the lock and in a new window specify the password for the account Anjul under which we logged in.

After access is obtained, click on the old account Master and press Reset the password. In the next window, specify a new password for this account and, if desired, a hint so that you can remember it if it is forgotten again.

Now you can restart your Mac and log in with your old account Master, and delete the new one, which has already become unnecessary.

That's all. We hope that our tips will help you regain access to your account. However, we wish that the tips described above would still not be needed for you :)

Share with friends or save for yourself:

Loading...