Current location - Quotes Website - Personality signature - How does MAC change the user account name or personal directory name?
How does MAC change the user account name or personal directory name?
Note: Although you can change the name of Personal in Mac OS X v 10.3 or later, you should not normally do so. About the abbreviation of Mac OS X, each user has a "full name" (called "name" in Mac OS X v 10.5.8 or earlier) and an "account name" defined in the Accounts panel of System Preferences (in Mac OS X v 10.5.8 or earlier) The account name can contain up to 255 lowercase letters (excluding spaces). This name is used to create the user's home directory (also called the user's home or home folder) in the Users folder. If you try to change the account name (or short name) in the Accounts (or Users) pane of System Preferences, the name may be dimmed and you cannot change it. Changing Short Names Although advanced users can change short names and related information in other ways, a simpler and safer solution is to create a new user with the required name, and then copy the contents of the old user's personal directory to the new user's personal directory. You'd better back up your important data before performing the following steps. Mac OS X 10.5 or later enables the root user. Log in as Root. Navigate to the /Users folder. Select the personal folder whose abbreviation you want to change and rename it in the same way as any other folder. Remember, short names must be all lowercase, with no spaces and only letters. Use the Accounts pane in System Preferences to create a new user with the account name or short name used in the previous step. When prompted that there is already a folder named Account Name in the Users folder. Do you want to use this folder as the personal folder for this user account? ",click OK. Note: This will correct the ownership of all files in the personal folder and avoid the permission problem of the folder contents. Choose Logout from the Apple menu. Log in as the newly created user. You should be able to access all original files (on the desktop, in documents and in other folders under this personal directory). After verifying that your data is correct, you can delete the original user account through the Accounts pane of System Preferences. Deactivate root user. Mac OS x v10.4.11and earlier optional steps: As a precautionary measure, you can disable automatic login before performing this step. You'd better back up important data, too. In case you restart your computer for some reason before completing this step, this operation can prevent complications caused by replacing users who choose to log in automatically. (In Mac OS X v 10. 1.5 or earlier, automatic login is located in the Login preference pane. In Mac OS X v 10.2 and v 10.3, automatic login is located in the Accounts preference pane. ) Mac OS X v 10.3 or later: If FileVault is enabled, please turn it off temporarily, which will cancel your account. Enable Root and log in as Root. Mac OS X v 10.2 or later: Open the Accounts pane of System Preferences. Mac OS X v 10. 1.5 or earlier: Open the Users pane of System Preferences. In the Name list, locate the user account whose short name you want to replace. This user account is called the original user. Note whether the original user is identified as an administrator, and this information is displayed in the Category column on the right. Click New User. For Mac OS X v 10.3 or later, this is the plus (+) button. Fill in the name and short name fields as required. Make sure that the "short name" filled in is exactly the same as the short name you want to display. For Mac OS X v 10.2: Fill in the fields "New Password" and "Verify". Applicable to Mac OS X v 10. 1.5. Or earlier: Click the password tab and fill in the password and verification fields. If the user you want to replace is an administrator user, select the "Allow users to manage this computer" checkbox. For Mac OS X 10.3, click the Security tab to find the settings. Note: If there are no other administrator users, the check box will be grayed out and selected. Mac OS X requires at least one administrator user. Click Save. (for Mac OS X v 10.3, please skip this step. ) Exit system preferences. Click the Finder icon in the Dock. Select Computer from the Go menu. Open the users folder on your Mac OS X disk. Open the folder with the short name of the new user you just created. Drag the contents of this folder to the Trash. Important: Don't empty the wastebasket. In case you accidentally move the contents of other folders, you can also recover these files from the wastebasket after you find the error. Choose New Finder Window from the File menu. Make sure to put the new window in the correct position so that you can see two Finder windows at the same time. In a new window, open the folder of the original user. Press the Option key and drag the contents of the original user folder to the new user folder (cleared in step 16). This will make a copy of the content. Close one of the Finder windows. Open the terminal application (located at/Applications/Utilities/). Type: chown -R /Users/ Important: Please replace ""with the actual short name of the new user you just created. For example, if the short name of a new user is "jacques", you should type: chown -R jacques /Users/jacques, and then press Return to exit the terminal. Choose Logout from the Apple menu. Log in as a new user. You should be able to access all the original files on your desktop and in your personal folder. Important: If you can't access the original project, please log out and log back in as Root, and then repeat step 22. Also, please make sure that in step 16, you didn't put the wrong file in the wastebasket. Select a person from the Go menu. Open the Library folder, and then open the keychain folder in it. Select the keychain, which should still have the original user's short name. Select Show Info from the File menu. In the Info window that appears, choose Name and Extension from the pop-up menu. Change the name to match the short name of the new user. Close the introduction window. Open the Keychain Access application in the Utilities folder. From the Edit menu, select Settings. For user jacques, this will be displayed as "Jacques Settings". Click Change Password. Enter the password you want to use, and then click OK. You can use the same password again or set it to match the login password of the new user. Note: This step can prevent you from discovering that the keychain keeps the old password in the future. Exit keychain access. Deactivate root user. If everything is all right, you don't need to log back in as Root to empty the trash can. Folders in the wastebasket take up very little disk space and can be ignored. Depending on the software you have installed, you'd better rename other files and folders created with the original user's short name to make them consistent with the new user's short name. If you are sure that everything is running normally, it is best to delete the original user's personal directory (folder), which should be empty. For instructions on how to do this, please refer to this article.