- Reference 8.1 User Home Folders
- Reference 8.2 Delete User Accounts and Preserve Their Home Folder Contents
- Reference 8.3 Migrate and Restore Home Folders
- Exercise 8.1 Restore a Deleted User Account
Exercise 8.1 Restore a Deleted User Account
In this exercise, you create a user account and create files in the user’s home folder. 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 and changing the user account name. What you learn in this exercise provides an alternative to Migration Assistant for moving user accounts between Mac computers.
The scenario for this exercise is that Karina Rossi changed her name and now has the last name of Cavanna. The company she works for uses the account naming convention first initial, last name. So, you must change her account name from krossi to kcavanna.
Create Karina Rossi’s Home Folder
Log in as Local Administrator.
Open Users & Groups preferences.
Authenticate as Local Administrator.
Click the Add (+) button under the user list.
Enter the account information for Karina Rossi:
New Account: Standard
Full Name: Karina Rossi
Account Name: krossi
Password: Apple321!
Verify: Apple321!
Don’t provide a password hint.
Click Create User.
You can optionally change the account picture.
Control-click Karina Rossi’s account, then choose Advanced Options from the menu.
Take a screenshot of the System Preferences window to record Karina Rossi’s account attributes for later reference.
Press Shift-Command-5, followed by the Space bar.
Your pointer changes to a camera icon, and the region of the screen it is over is highlighted in blue. If you see a crosshair, press the Space bar again.
Move the camera pointer over the System Preferences window, then click to record its contents.
This is one of several ways of taking screenshots in macOS. Shift-Command-3 records the entire screen, Shift-Command-4 enables you to select a rectangular region to record or a single window if you hold down the Space bar, and Shift-Command-5 gives you the ability to do timed captures, record the screen, and select destinations for your screenshots. Refer to support.apple.com/guide/mac-help/mh26782 in the macOS User Guide for more information on taking screenshots or screen recordings on a Mac.
The image is saved to your desktop and named “Screen Shot,” followed by the date and time it was taken.
In the Advanced Options dialog, click Cancel, or press Command-Period, which is a way to select Cancel in most macOS dialogs.
Log out as Local Administrator.
Log in as Karina Rossi (password: Apple321!).
In the Accessibility pane, turn on any assistive needs, then click Continue. If you don’t want to configure Accessibility at this time, click Not Now.
In the Data & Privacy pane, carefully review Apple’s privacy policy, then click Continue.
In the Sign In with Your Apple ID pane, click Set Up Later, then click Skip in the confirmation dialog.
If the Find My pane appears, click Continue.
In the Screen Time pane, select Set Up Later.
If the Siri pane appears, deselect Enable Ask Siri, then click Continue.
If you’re asked to set up Touch ID, select Set Up Touch ID Later, then click Continue in the confirmation dialog.
At the Choose Your Look pane, choose your preferred appearance, then click Continue.
In the Dock, click the Launchpad icon.
In Launchpad, begin typing text.
TextEdit should become available.
Click the TextEdit icon to open TextEdit.
In the Untitled document, type the text This is Karina Rossi’s project document.
From the menu bar, choose File > Save (or press Command-S) to save the file.
Name the file Project, then save it to Karina Rossi’s desktop. You can use the shortcut Command-D to select the desktop.
Quit TextEdit.
Open System Preferences, then click Desktop & Screen Saver preferences.
Select a different desktop picture.
Quit System Preferences, then log out of the Karina Rossi account.
Delete Karina Rossi’s Account
Next, you delete Karina Rossi’s account without removing the files in her home folder.
Log in as Local Administrator.
Open Users & Groups preferences, then unlock the pane.
Select Karina Rossi’s account name, then click the Remove (–) button to remove her account.
In the dialog that appears, select “Don’t change the home folder.”
Click Delete User.
Karina Rossi’s account is no longer visible in the list.
Quit System Preferences.
Navigate to /Users. Open Macintosh HD from your desktop and open the Users folder.
Karina Rossi’s home folder still exists, and (Deleted) is appended to the end of the name.
Restore Karina Rossi’s Account for Karina Cavanna
Karina Rossi’s files (soon to be Karina Cavanna’s files) still exist in the Users folder. Now you rename the home folder so that when you create the new account, she gets the files and settings from her previous account (the Karina Rossi account).
If necessary, navigate to the folder /Users.
Control-click the krossi (Deleted) folder, choose Rename, and change the folder name to kcavanna.
Press Return.
The file permissions in the /Users folder don’t enable you to modify items within it. The Finder asks you to authenticate as an administrator to override the permissions.
Enter the Administrator password and click OK.
Open the kcavanna folder, and then attempt to open the Desktop folder.
You are prohibited from viewing the contents because the owner of the folder is still the old krossi account.
Control-click the Desktop folder and choose Get Info. Click the Sharing & Permissions disclosure triangle if necessary to inspect the item permissions.
Notice that macOS attempts to find krossi (the process is shown as Fetching), who no longer exists. Also notice that no one but the old owner (who was krossi) has permissions to view anything inside the Desktop folder.
Click the lock and authenticate as Local Administrator.
Click Add (+).
Choose Local Administrator, and click Select.
Notice that you are granted Read Only permissions by default. You could change this to Read & Write, or become the owner of the folder, but for the purposes of this exercise, Read Only is sufficient.
Also notice that the prohibitive badge is no longer displayed on the Desktop folder.
Open the Desktop folder.
You see Karina Rossi’s Project document. After you create Karina Cavanna’s account, she retains this document, along with all the other settings pertaining to her account.
Now you will remove Local Administrator’s permissions to see the Desktop folder.
If necessary, right-click the Desktop folder and choose Get Info.
Authenticate as Local Administrator, and remove “ladmin (Me).”
It’s no longer necessary for the Local Administrator user to have permissions to view the Desktop folder and its contents. If you leave Local Administrator’s permissions to see Karina’s Desktop folder, the user will be able to see files that are not intended for the Local Administrator to view.
Create and Verify Karina Cavanna’s Account
Create the Karina Cavanna user account using the renamed home folder as her new account home folder.
Open Users & Groups preferences.
Authenticate as Local Administrator.
Click the Add (+) button to create another account:
New Account: Standard
Full Name: Karina Cavanna
Account Name: kcavanna
Password: Apple321!
Don’t provide a password hint.
Click Create User.
A dialog appears asking whether you want to use the kcavanna folder for this account.
Click Use Existing Folder.
Control-click Karina Cavanna’s account, then choose Advanced Options from the menu.
Open the Screen Shot file on your desktop, then compare the account attributes of Karina Cavanna’s new account with her original account (Karina Rossi).
macOS assigns each account a new UUID (Universally Unique Identifier) when you create it.
Quit Preview.
In the Advanced Options dialog, click Cancel, then quit System Preferences.
Try to reopen the Desktop folder in Karina Cavanna’s home folder. If your Finder window is still displaying the Desktop folder, click the Back button, then double-click the Desktop folder. You no longer have permission to see the files because they are owned by Karina Cavanna’s new account.
Close the Finder window.
Verify Karina Cavanna’s Home Folder
Explore Karina Cavanna’s home folder to confirm the files are available.
Log out as Local Administrator, then log in as Karina Cavanna.
Verify that the Project file is on the desktop and that the desktop picture is the one you chose previously.
In the Finder, open Karina Cavanna’s home folder by choosing Go > Home (or by pressing Shift-Command-H).
Make sure you can see the default subfolders: Desktop, Documents, Downloads, Movies, Music, Pictures, and Public.
Open the Desktop folder, then verify that you see the Project document.
Navigate back to the home folder, then open the Public folder, where you see a Drop Box folder. For more information about these folders, read Lesson 13.
In addition to the visible folders in Karina Cavanna’s home folder, the folder should contain an invisible Library folder.
Press and hold the Option key, then choose Go > Library.
The Library choice is hidden except when you hold the Option key.
Karina Cavanna’s Library folder contains many subfolders. For more information about this folder and its contents, read Reference 14.1, “Examine Hidden Items,” and Lesson 15, “Manage System Resources.”
Close the Library folder, then log out as Karina Cavanna.