Lesson 8. Manage User Home Folders


GOALS

Image Be able to describe user home folders

Image Delete users’ accounts and archive their home folder contents

Image Migrate and restore home folders


When you log in to your Mac, you can securely store documents in your home folder. You can store and access documents in other locations, but this lesson focuses on your home folder.

Reference 8.1 User Home Folders

The default location for a locally stored home folder is /Users/name, where name is the user account name. In the following example, johnny and jane are user account names.

A screenshot shows the user home folders, Jane and Johnny, which are the user account names.

When you create a new user account, macOS generates a home folder for that account. The home folder contains these default home folders: Desktop, Documents, Downloads, Movies, Music, Pictures, and Public.

A screenshot features the default home folders generated by macOS when creating a new user account. For a new user account, Jane, the following home folders are shown, desktop, documents, downloads, movies, music, pictures, and public.

Files you save to your desktop appear on your desktop and in the Desktop folder.

A snapshot shows the finder window displaying the files of the desktop folder opened over the desktop. The files displayed on the desktop and the finder are the same.

When you download content from the Internet, it goes into the Downloads folder by default.

The Library folder includes user-specific preference files, fonts, contacts, keychains, mailboxes, favorites, screen savers, and other app resources. The Library folder is hidden in the default Finder view.

The Documents, Movies, Music, and Pictures folders are the default locations for document, movie, music, and picture files.

Only you can view what’s in your folders—except for the Public folder. You and other local users can view each others’ Public folders and share files by putting them in a Drop Box (a folder that’s inside the Public folder).

The public folder of macOS is shown, which includes two items, dropbox, and Flyer.

Except for putting items in the Drop Box, other users can’t add items, make changes, or see file contents in your Public folder.

In the file system, the root folder (/) is the top folder. It contains folders—such as the Users folder that includes your home folder—and files. Other users can see what’s in your root folder.

A screenshot shows the file system, which includes the command lines that define the root folder, folders of user "Jane." Here, root folder "cd/" and a folder "users" are highlighted.

This figure illustrates that the Users folder is located in the root (/) folder, and it contains three folders.

A tree-like structure shows "/root" at the top, "users" at the middle, which are categorized as Jane, Johnny, and shared. This indicates users is located in the root folder.

You can change folder permissions as described in Lesson 13, “Manage Permissions and Sharing.”

You might see an Applications folder in your home folder. When you install some apps, they automatically create an Applications folder in your home folder. For other apps, you can choose to place them there. Only you have access to the contents of your Applications folder. See Reference 18.3, “Install Apps Using Software Packages and Drag-and-Drop,” for more information.

A screenshot of the Finder shows the installed apps in the Applications folder.

Reference 8.2 Delete User Accounts and Archive Their Home Folder Contents

You might need to delete a user account. If you do, you must decide what to do with the user’s home folder contents.

To delete a user:

1 Select the user from the list of users in Users & Groups preferences.

2 Click the Remove (–) button at the bottom of the list.

3 Select an option for the user’s home folder contents.

A dialog prompts the user to choose options for the home folder of an account before deleting the user account (Jill Appleseed).

Image Select “Save the home folder in a disk image” to save a user’s home folder as a disk image file. macOS saves the disk image file in the /Users/Deleted Users folder and gives it the user account name. You can copy it to other Mac computers or into another user’s home folder. You must have enough local disk space to duplicate the home folder. The process might take several hours.

Image Select “Don’t change the home folder” to leave a user home folder unchanged. macOS appends “(Deleted)” to the home folder name to signify that the user no longer exists. The deleted user home folder keeps the same access restrictions as a normal user home folder. If you want to access the deleted home folder contents, you must change folder and file ownership and permissions. Read Lesson 13 to find out more.

Image Select “Delete the home folder” to delete home folder contents. The content won’t be stored in the Trash, so you can’t easily restore it.

Reference 8.3 Migrate and Restore Home Folders

Migration Assistant enables you to transfer settings, user accounts, and content from a Mac or Windows computer to your new Mac.

You can move content over Wi-Fi or Ethernet. If you have a lot of content, the move could take several hours. Be sure to plug both computers into a power source before you start.

You can use a Time Machine backup to move your content. If you don’t have a Time Machine backup of the original Mac content, create one. Connect the external storage device that contains the Time Machine backup to your new Mac.

When you migrate content from another Mac, a Time Machine backup, or a startup disk, Migration Assistant scans the local network for Mac computers that are running Migration Assistant and are ready to transfer content. If you don’t have a local network, connect two Mac computers through Ethernet, FireWire, Thunderbolt, or USB-C, and create one. Migration Assistant also scans locally mounted disks and the local network looking for Time Machine backups. It scans locally mounted disks for a previous system too. Previous systems include external disks, or Mac computers in target disk mode, that are connected with FireWire, Thunderbolt, or USB-C. Using target disk mode is detailed in Lesson 11, “Manage File Systems and Storage.” Read Apple Support article HT204350, “How to move your content to a new Mac,” for detailed instructions.

When you migrate content from a Windows computer, Migration Assistant scans the local network for Windows computers that are running Migration Assistant and are ready to transfer content. This enables you to migrate content from Windows XP or later if the Windows computers are running Windows Migration Assistant. You can download Windows Migration Assistant from the Apple Support website. Read Apple Support article HT204087, “Move your data from a Windows PC to a Mac,” for detailed instructions.

Migration Assistant runs as part of macOS Setup Assistant on new or newly reinstalled Mac computers. You can use Migration Assistant anytime. It’s in /Applications/Utilities. Look for it with Spotlight or Launchpad.

1 Before you use Migration Assistant, check for Apple software updates on the source and destination computers. This ensures that you’re using the latest copy of Migration Assistant.

2 Open Migration Assistant.

A screenshot shows the installation window of the Migration Assistant. The window has "GO back" and "Continue" buttons at the bottom. The Go back button is disabled.

3 Click the Continue button to start Migration Assistant.

4 Authenticate as an administrator user.

Migration Assistant quits running apps and logs out users.

A screenshot of the Migration Assistant shows options for transferring information.

5 Select how you want to transfer information:

Image From another Mac, Time Machine backup, or Mac startup disk

Image From a Windows PC

Image To another Mac

If you select “From a Mac, Time Machine backup, or startup disk” or “From a Windows PC,” Migration Assistant scans attached disks and the local network for migration sources. If you select “To another Mac,” open Migration Assistant on the destination Mac too.

6 After you select a source, Migration Assistant scans the contents and presents you with a list of items you can migrate. If multiple disks are available, you can choose to migrate those contents too. Migration doesn’t create new volumes or partitions on the destination Mac. It creates folders that include the contents of the migrated disks.

Select the information to transfer.

A screenshot of the Migration Assistant shows the process of selecting the information to transfer.

6 After you make selections, begin the transfer. The more content you transfer, the longer it takes.

Manually Restore a User Home Folder

See Exercise 8.1, “Restore a Deleted User Account,” for information about how to restore a user’s home folder after you delete that user.

Exercise 8.1 Restore a Deleted User Account


Image Prerequisite

Image You must have created the Local Administrator account (Exercise 3.1, “Configure a New Mac for Exercises,” or Exercise 3.2, “Configure an Existing Mac for Exercises”).


In this exercise, you create a user account and populate the home folder for the user. Then, you delete the account, preserving the contents of the home folder. You also create a new account, ensuring that the new user gets the old user’s home folder contents. Besides showing you how to restore a deleted user account, you can use this technique to change a user account name (short name). This technique provides an alternative to Migration Assistant for moving user accounts between Mac computers.

The scenario for this exercise is that Emily Parker has recently married and now has the last name of Davidson. The company she works for uses the account naming convention first initial, last name. So her user name must be changed from eparker to edavidson.

Create Emily Parker’s Home Folder

1 If necessary, log in as Local Administrator (password: ladminpw, or whatever you chose when you created the account).

2 Open System Preferences, and select the Users & Groups pane.

3 Click the Lock icon, and authenticate as Local Administrator.

4 Click the Add (+) button under the user list.

5 Enter the account information for Emily Parker:

New Account: Standard

Full Name: Emily Parker

Account Name: eparker

Password: eparkerpw

Verify: eparkerpw

Don’t provide a password hint.

6 Click Create User.

7 Control-click Emily Parker’s account, and choose Advanced Options from the shortcut menu.

8 Take a screenshot of the System Preferences window to record Emily Parker’s account attributes for later reference.

9 Press Command-Shift-4, followed by the Space bar.

Your mouse cursor changes to a camera icon, and the region of the screen it is over is highlighted in blue. If you see a crosshair cursor, press the Space bar again.

10 Move the camera pointer over the System Preferences window, and click to record its contents.

This is one of several ways of taking screenshots in macOS. Command-Shift-3 records the entire screen, Command-Shift-4 (without the Space bar) enables you to select a rectangular region to record, and Command-Shift-4 with the Space bar enables you to select a single window.

The image is saved to your desktop and named “Screen Shot,” followed by the date and time you took it.

11 In the Advanced Options dialog, click Cancel, or press Command-Period, which is a way to select Cancel in most macOS dialogs.

12 Log out as Local Administrator.

13 Log in as Emily Parker (password: eparkerpw).

14 At the “Sign In with Your Apple ID” screen, select “Don’t sign in,” click Continue, and then click Skip in the confirmation dialog.

15 At the Siri screen, deselect Enable Ask Siri, and click Continue.

16 If you are prompted to set up Touch ID, click Continue, then click Set Up Touch ID Later, and then click Continue in the confirmation dialog.

17 In the Dock, click the Launchpad icon.

A screenshot of the dock displays five icons. A rocket symbol denoting the launchpad icon is highlighted.

Launchpad gives you an easy way to open apps that aren’t in your Dock. You don’t have to navigate to the Applications folder in the Finder.

18 In Launchpad, begin typing Text and TextEdit should become available.

The launchpad user interface is shown. "Text" is typed in the launchpad and the suggestions show the application "TextEdit."

19 Click the TextEdit icon to open TextEdit.

20 In the Untitled document, enter the text This is Emily Parker’s project document.

21 From the menu bar, choose File > Save (or press Command-S) to save the file.

22 Name the file Project, and save it to Emily Parker’s desktop. You can use the shortcut Command-Shift-D to select the desktop.

An untitled document is opened and text is entered in the document. A prompt shows the options for saving the document. In the "Save as" field (text field), the name Project is entered and the location for saving is selected as Desktop.

23 Quit TextEdit, and log out of the Emily Parker account.

Delete Emily Parker’s Account

You delete Emily Parker’s account, preserving her home folder in a disk image file. A disk image is a file that contains a file system.

1 Log in as Local Administrator.

2 Open Users & Groups preferences in System Preferences, and unlock the preferences pane.

3 Select Emily Parker’s account name and click the (Remove) button to remove her account.

4 In the dialog that appears, make sure “Save the home folder in a disk image” is selected.

A dialog verifies if the user wants to delete the user account "Emily Parker"?. The radio button option "Save the home folder in a disk image" is selected. Buttons "delete user" and "Cancel" are provided at the bottom.

5 Click Delete User.

While Emily Parker’s account is being archived, it is listed in the Users & Groups list as “Deleting Account.”

A pop-up shows three user accounts namely Mary Appleseed, Johnny Appleseed, and Emily Parker. The Emily Parker account is shown disabled.

6 Wait until the archiving process is complete and Emily Parker’s account to is no longer visible in the list, and quit System Preferences.

Restore Emily Parker’s Account for Emily Davidson

Emily Parker’s files (soon to be Emily Davidson’s files) are preserved in a disk image. Now you copy them to Emily Davidson’s new home folder so that when you create the new account, she gets her old (Emily Parker account) files.

Since disk images are portable and easy to store, you can use this technique to re-create the account on another computer at any time.

1 Navigate to the folder /Users/Deleted Users. Open Macintosh HD from your desktop, open the Users folder inside that, and open Deleted Users inside that.

If you don’t have permissions to open the Deleted Users folder, you might be logged in as a standard user. Log out, and log back in as Local Administrator.

2 Open eparker.dmg.

The disk image opens and displays the contents of the eparker account home folder. As Reference 14.1, “Examine Hidden Items,” discusses, an invisible subfolder named Library contains account settings and preferences for the eparker account. To fully restore this account, restore the entire home folder, not just the visible contents.

3 Close the “eparker” window (but don’t eject the disk image).

The disk icon is visible on your desktop.

4 Select (single-click) the “eparker” icon on your desktop.

5 From the Finder menu bar, choose File > Duplicate (or use the shortcut Command-D).

The Finder copies the contents of the image (including the hidden Library folder) to a folder named “eparker” on your desktop.

A folder icon named "eparker" overlapping another folder is shown.

6 After the copy finishes, unmount the “eparker” volume. Click the Eject button next to its entry in the Finder sidebar. You might need to scroll to view more of the sidebar to see the icon.

7 Select the new “eparker” folder on your desktop, and press Return.

This enables you to edit the folder’s name.

8 Control-click the eparker folder, choose Rename, change the folder name to edavidson, and press Return.

A folder icon named "edavidson" is shown.

9 In the remaining Finder window, navigate back to the /Users folder. You can do this is several ways:

Image Click the left arrow in the window toolbar.

Image Press Command-[ (left bracket).

Image Control-click the folder name in the window title bar and choose Users from the shortcut menu.

10 Drag the edavidson folder from your desktop to the /Users folder.

A screenshot of the Finder window lists the available files and folders in the Users folder. The folder named edavidson is dragged from the desktop to the Users folder.

The file permissions in the /Users folder don’t enable you to add items to it. The Finder asks you to authenticate as an administrator to override the permissions.

A screenshot of a dialog box represents the modification of users. The modification requires administrator name and password. Authenticate and Cancel buttons are present within the dialog.

11 Click Authenticate.

12 Enter the Administrator password, and click OK.

13 Open the edavidson folder and then the Desktop folder inside that.

You see Emily Parker’s Project document. Since you (Local Administrator) created this copy of Emily Parker’s home folder, you own it and have full permission to access it.

Create and Verify Emily Davidson’s Account

Now you create the Emily Davidson user account using the restored home folder as the new account home folder.

1 If necessary, open System Preferences, and select Users & Groups.

2 Click the Lock button, and authenticate as Local Administrator.

3 Click the Add (+) button to create another account:

New Account: Standard

Full Name: Emily Davidson

Account Name: edavidson

Password: If you are performing this exercise in a classroom environment, enter edavidsonpw in the Password and Verify fields. If you are performing this exercise on your own, select a more secure password for the Emily Davidson account. Remember the password. You reenter it periodically while you use this Mac. Provide a password hint if you want.

4 Click Create User.

A dialog appears and asks whether you want to use the edavidson folder for this account.

A dialog verifies if the user wants to use the existing folder (edavidson folder) for the account. Buttons "Use existing folder" and "Cancel" are provided at the bottom.

5 Click Use Existing Folder.

6 Control-click Emily Davidson’s account, and choose Advanced Options from the shortcut menu.

7 Open the Screen Shot file on your desktop, and compare the account attributes of Emily Davidson’s new account with her original account (Emily Parker). The user ID of the old account may have been reused for the new account, but the UUID will be different. Each account is assigned a completely new UUID when it is created.

8 Quit Preview.

9 In the Advanced Options dialog, click Cancel, and then quit System Preferences.

10 Try to reopen the Desktop folder in Emily Davidson’s home folder now. If your Finder window is still displaying the Desktop folder, click the back button, and then double-click the Desktop folder. You no longer have permission because the files are now owned by Emily Davidson’s new account.

A prompt displays a message while accessing the files owned by the new account. The prompt displays the following message: "The folder Desktop can't be opened because you don't have permission to see its contents."

11 Close the Finder window.

Verify Emily Davidson’s Home Folder

To make sure Emily Davidson’s files are available, explore her restored home folder.

1 Log out as Local Administrator, and log in as Emily Davidson.

2 Verify that the Project file is on the desktop.

3 In the Finder, open Emily Davidson’s home folder by going to the menu bar and choosing Go > Home (or by pressing Command-Shift-H).

4 Make sure you see the default subfolders: Desktop, Documents, Downloads, Movies, Music, Pictures, and Public.

5 Open the Desktop folder, and verify that you see the Project document.

6 Navigate back to the home folder, and then open the Public folder, where you see a Drop Box folder. For more information about these folders, read Lesson 13, “Manage Permissions and Sharing.”

In addition to the visible folders in Emily Davidson’s home folder, it should contain an invisible Library folder.

7 Press and hold the Option key, and from the menu bar, choose Go > Library.

The Library choice is hidden except when you hold the Option key.

Emily Davidson’s Library folder contains many subfolders. For more information about this folder and its contents, read Reference 14.1 and Lesson 15, “Manage System Resources.”

8 Close the Library folder, and log out as Emily Davidson.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.131.157.6