Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Apple > Operating Systems

  • Print
  • + Share This
This chapter is from the book

Customizing System Configuration

In this section, you will learn to perform advanced customizations to further optimize your system image for deployment. All the custom configurations demonstrated in this section are optional and can be used individually. However, including them in your system image allows you to present the user with a Mac system that is tightly integrated with your organization and its policies.

Rerunning the Setup Assistant

The Setup Assistant is the first interface most Mac OS X users see when they start a new Mac for the first time. The Setup Assistant guides the user through the process of configuring initial settings, including the creation of an administrative user account. However, after this initial setup is complete, the Setup Assistant no longer appears at startup. You can force the Startup Assistant to run at the next system startup to give users some control over their own computers, including the ability to create their own user accounts.

If you want to make the Startup Assistant run at the next system startup, simply remove the /var/db/.AppleSetupDone file. If you also want Setup Assistant to present the user with a choice to bind to a directory server, remove /var/db/.AutoBindDone. These files are protected by root access, so the quickest method to remove them is to enter sudo rm /var/db/.AppleSetupDone and sudo rm /var/db/.AutoBindDone at the command line. When a user restarts the computer, the Setup Assistant will launch, allowing the user to make several configuration changes. This potentially includes changes that are not ideal for your deployment, including the following:

  • The user will be allowed to set the default keyboard and language, enter registration information, his Apple ID, and MobileMe information, and reset the time zone.
  • If networking is already set up, the user will not be allowed to configure any network settings at this point.
  • If you remove the .AutoBindDone file, the user will be able to bind to a network directory service.
  • The user will be able to create an additional administrative user account.
  • The Setup Assistant will enable automatic login for the newly created user.
  • The Setup Assistant will change the computer’s name using the following convention: new user’s name followed by the computer model.

Unfortunately, you cannot limit what the Setup Assistant allows the user to configure. If you still want to use the Setup Assistant but you need to limit the changes, you can implement a script to automatically reset some of these items after the Setup Assistant finishes. Techniques for implementing such a script at first startup is covered in Chapter 6, “Postimaging Deployment Considerations.” If you change your mind about restarting the Setup Assistant, you can easily replace the appropriate files by entering sudo touch /var/db/.AppleSetupDone or sudo touch /var/db/.AutoBindDone at the command line.

Customizing the Setup Assistant

To customize your users’ new Mac experience, you can change the QuickTime video and MP3 audio files played at the introduction of the Setup Assistant. You can use any content-creation tool you like to create custom organization-specific replacements for these files. For instance, you could create a movie that reminds the user of your organization’s usage policies, or you could create replacements that essentially play nothing. When creating your custom introduction media, keep in mind that the video and audio files start playing simultaneously, but the video ends before the audio file to allow the user to continue the setup process accompanied by background music.

The files you must replace are located inside the Setup Assistant package, in the /System/Library/CoreServices/Setup Assistant.app/Contents/Resources/TransitionSection.bundle/Contents/Resources folder. In this folder you will need to replace the intro.mov and intro-sound.mp3 files. These files are protected by root access, and you should back them up just in case you need to return the Setup Assistant to its original state.

In the following example, Michelle uses the command line to back up the original audio and video files, and then replace them with two custom files that she has created on her desktop. Michelle first navigates to the appropriate folder inside the Setup Assistant package. Notice that she uses the sudo command to bypass the file-system permissions.

MyMac:~ michelle$ cd "/System/Library/CoreServices/Setup Assistant.app/Contents/
Resources/TransitionSection.bundle/Contents/Resources"
MyMac:Resources michelle$ sudo mv intro.mov intro.mov.old
MyMac:Resources michelle$ sudo mv intro-sound.mp3 intro-sound.mp3.old
MyMac:Resources michelle$ sudo cp /Users/michelle/Desktop/custommoive.mov intro.mov
MyMac:Resources michelle$ sudo cp /Users/michelle/Desktop/customsong.mp3 intro-sound.mp3

Customizing the Login Screen

You can also customize the login screen to meet your organization’s deployment needs; for instance, display information such as usage policies. Ideally, you should configure custom login screen settings using managed preferences settings hosted on a directory server. Workgroup Manager (WGM) includes a specific Login preferences interface for easily configuring the login screen behaviors and appearance. Using managed preferences is covered in the “Integrating with Managed Preferences” section previously in this chapter.

However, if you have decided against deploying managed preferences settings, you can configure login screen settings on your model system and make them part of your system image deployment. The login screen is managed by the loginwindow process, which references settings located in the /Library/Preferences/com.apple.loginwindow.plist preference file. You could edit this file using the Property List Editor application included with the Xcode Tools suite, but it’s much quicker to use the defaults write command to customize this file. Because the file is protected by root permissions, you would use the sudo command to bypass those restrictions.

Using the defaults command, you must add a new property key, LoginwindowText, to the loginwindow preference file. The value for this new key will be the string of text you want shown at the login window inside quotation marks. For example, to customize the login window text with a usage policy notice, you would enter the following at the command line:

sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText
"By logging in to this computer you are agreeing to the usage policies found in
Pretendco document UP-1052. Thank you, and have a nice day."

To test your custom configuration, log out of your current session and observe the login screen behavior.

Customizing the Desktop Background and User Template

Some deployments require a static desktop background as part of their deployment policy. It’s common in open or lab environments to maintain a consistent desktop background between sessions. Perhaps the desktop background includes instructive text or administrator support information that you have decided should always be easily available.

In Mac OS X the desktop background is a per-user preference, so every user is allowed to set her own background. This makes permanently setting the background for all users a bit more complex. There are two methods for accomplishing it; use managed preferences, or modify the user template on your model system. Again, as you’ll see, the best solution is to set the desktop background using managed preferences.

Set the Desktop Background

Either method you choose requires that the desktop picture be located on the local Mac and locked from editing. So the first step is to prepare and secure the desktop background image file on your model system.

To install, set, and protect a custom desktop background picture:

  1. Log in to your model computer with an administrative account.
  2. Place the image file you want to set as the desktop background in a location that all users will be able to access, such as the /Library/Desktop Pictures folder.
  3. Open the Desktop & Screen Saver preferences and set the desktop background for the administrative account to the desired image file. You will have to drag the image file from the desktop into the image well area at the upper-left corner of the preference pane.
  4. Set any additional desktop background features, and then close the Desktop & Screen Saver preferences.

    This creates a properly formatted desktop property list preference file in the administrator’s home folder.

  5. Protect the desktop image file from modification. This requires changing the files’ ownership to be writable only by root but still readable by everyone else.

    Again, because this image file will have root permissions, the quickest method is to use the command line. In the following example, Michelle changes the ownership for the pretendco.jpg image file.

    MyMac:~ michelle$ <font color="#658CA6">sudo chown root:wheel "/Library/Desktop Pictures/pretendco.jpg"</font>
    
  6. Now that you have set the desktop background and protected the selected image from changes, use one of the methods in the next two sections to permanently set the background for all users.

Use Managed Preferences to Force a Desktop Background

Once you have set the desktop background on a model system, it takes only a few steps to apply that setting as a custom managed preference. Again, this instruction assumes you are familiar with the topics outlined in the “Integrating with Managed Preferences” section earlier in this chapter.

To configure managed preferences to force a desktop background:

  1. Make sure you are logged in to your model Mac with the administrative account that you used previously to set the custom desktop background.
  2. Open /Applications/Server/Workgroup Manager.app and authenticate to the directory that will be hosting the custom managed preference.
  3. Select the account(s) that you wish to manage, click the Preferences button in the toolbar, and click the Details tab. This will reveal WGM’s preference editor interface.

    If you have previously configured managed preference settings using WGM’s normal graphical interface you will see those items in the preference editor list with a pointer icon adjacent to the items’ names.

  4. To import the desktop background preferences, click the small plus button at the bottom of the preference editor list and an import dialog will appear.
  5. Browse to and select the ~/Library/Preferences/com.apple.desktop.plist file.
  6. Make sure Always is selected as the management option and then click the Add button to import your desktop settings into WGM.
  7. You will return to the Details view, then double-click on the Desktop Picture preference. This will open the preference editor, allowing you to verify the desktop background setting.
  8. Click the disclosure triangle next to Always to reveal the imported key/value pairs. The import will have included many extraneous key/value pairs that you will need to delete.
  9. Select and delete all items except for Background > Default Image > Image Path. The results should look like the following screen shot.
  10. When you have completed the necessary managed preference modifications, click the Apply Now button to save the changes.

    Again, note the small arrow icon next to any preference that is being managed.

  11. To test the settings, log in to another user account and verify that your desktop background has been set and that you cannot change it from the Desktop & Screen Saver preferences.

Modify the User Template to Force a Desktop Background

Whenever a local or mobile user account is created, the system also creates a local home folder for that user. The contents of these created home folders are based on the system’s user template. You can customize this user template to prepopulate new users’ home folders with any items, including preference settings.

As always, the ideal solution to set specific user settings is to use managed preferences, as covered previously in this chapter. However, as an alternative solution, you can place user-specific preference files containing the settings in the user template on your model system and make them part of your system image deployment.

Thus, you can customize the user template to set a default background for every user. However, the desktop background is saved as a per-user setting, and the user can normally change it at any time from the Desktop & Screen Saver preferences. To prevent the user from making this change, you will have to set special permissions that lock the preference file from changes.

To modify the user template to force a desktop background:

  1. Make sure you are logged in to your model Mac with the administrative account that you used previously to set the custom desktop background.
  2. Copy the com.apple.desktop.plist file from the administrative account’s ~/Library/Preferences folder to the appropriate folder in the user template: /System/Library/User Template/English.lproj/Library/Preferences/.

    This folder is protected by root access, so you will have to use the command line to copy this file into the appropriate location. In the following example, Michelle uses her administrative account to copy the desktop preference file into the user template.

    MyMac:~ michelle$ sudo cp "/Users/michelle/Library/Preferences/com.apple.desktop.
    plist" "/System/Library/User Template/English.lproj/Library/Preferences/"
    
  3. Protect the desktop preference file from modification. This requires changing the files’ ownership and permissions to be writable only by root but still readable by everyone else, and then setting the lock flag.

    Again, because these items will have root permissions, the quickest method is to use the command line. In the following example, Michelle changes the ownership, permissions, and lock flag for the desktop preference file inside the user template.

    MyMac:~ michelle$ sudo chown root:wheel "/Library/Desktop Pictures/pretendco.jpg"
    "/System/Library/User Template/English.lproj /Library/Preferences/com.apple.
    desktop.plist"
    MyMac:~ michelle$ sudo chmod 644 "/Library/Desktop Pictures/pretendco.jpg" "/System/
    Library/User Template/English.lproj /Library/Preferences/com.apple.desktop.plist"
    MyMac:~ michelle$ sudo chflags uchg "/Library/Desktop Pictures/pretendco.jpg"
    "/System/Library/User Template/English.lproj /Library/Preferences/com.apple.
    desktop.plist"
    

Normally when the user template items are copied to create the new user’s home folder, the ownership and permissions are set so the items belong to the user. However, because you set the lock flag, the copied desktop preference file will retain the original ownership and permissions you have set here. Thus, users will not be allowed to change the desktop background setting even if they have access to the Desktop & Screen Saver preferences. The system preference will remain active and allow the user to interact with the settings, but the desktop background will never change.

Creating a Hidden Administrator

Perhaps the cleverest advanced customization you can make to your model image is hiding the local administrative user’s account from the primary users of the computer. If the administrator’s account isn’t hidden, users can view the local user list at the login window, the fast user switching menu, and the Accounts preference; they can also see other users’ home folders in the /Users folder from the Finder and command line and when connecting remotely to a Mac that has file-sharing services enabled.

The technique covered here will hide all these clues from every user and will even hide the account from other administrative users. Although an administrative user who knows exactly what to look for can easily uncover and delete your hidden administrator, the vast majority of users will have no idea that the account is even there.

To create a local hidden administrative account:

  1. Log in to your model computer with an administrative account.
  2. Open the Accounts system preference, click the Login Options button, and set “Display login window as” to “Name and password.” Disable automatic login if you haven’t done so already.
  3. While still in the Accounts system preference, create a new administrative user account. Choose an appropriate short name as this user’s primary login name. Also, do not activate FileVault for this user. Click Create Account when you are done.
  4. In the accounts list, right-click or Control-click the entry for your new administrative account and choose Advanced Options from the shortcut menu.
  5. In the Advanced Options dialog, change the user ID to 499 and the home directory location to any path that an average user would never navigate to. For instance, you could choose any folder normally hidden in the Finder. Then click OK.

    A good location to store the hidden administrator’s home folder is inside the /var folder. You can further “hide” the home folder by giving the home folder a name that begins with a period. For example, if your hidden administrator’s short name is hadmin, a good hidden home folder path would be /var/.hadmin.

  6. Move and rename the hidden administrator’s home folder and set the appropriate ownership.

    Step 5 changed the hidden administrator’s user record, but in doing so you effectively removed access to this account’s original home folder. You must move the original home folder to the new path you chose in step 5 and correct the ownership for the home folder items.

    Because you’re modifying another user’s home folder, the fastest method to restore access is to use the command line. In the following example, Michelle will move and rename the hidden administrator’s home folder, and then set the appropriate ownership.

    MyMac:~ michelle$ sudo mv /Users/hadmin /var/.hadmin
    MyMac:~ michelle$ sudo chown –R hadmin /var/.hadmin
    
  7. Remove the Public and Sites folders from the hidden administrator’s home folder.

    Even though we have moved the hidden administrator’s home folder, it may still show up when various network sharing services are enabled. This is easily remedied by removing the Public and Sites folders from this home folder.

    Again, because you’re modifying another user’s home folder, the fastest method is to use the command line. In the following example, Michelle will remove the shared folders in the hidden administrator’s home folder.

    MyMac:~ michelle$ sudo rm –R /var/.hadmin/Public /var/.hadmin/Sites
    
  8. Modify the loginwindow settings so the hidden administrator account and any account with user IDs below 500 are not shown. This will also prevent the Accounts preference and the fast user switching menu from showing accounts with user IDs below 500.

    The quickest method to set these custom settings is to use the defaults command. Note that you could also set this using custom managed preferences, as covered previously in this chapter. In the following example, Michelle will modify the loginwindow preferences to hide accounts with user IDs below 500, and then hide the hadmin account.

    MyMac:~ michelle$ sudo defaults write /Library/Preferences/com.apple.loginwindow
    Hide500Users -bool TRUE
    MyMac:~ michelle$ sudo defaults write /Library/Preferences/com.apple.loginwindow
    HiddenUsersList -array hadmin
    
  9. Test your work by logging out of your current account and then logging in as the hidden administrator.
  10. If everything is working properly, delete your initial administrator account because it’s not hidden.

    Aside from having an interesting location for the home folder, your hidden administrator account is identical in function to any other administrative account.

  • + Share This
  • 🔖 Save To Your Account

Peachpit Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Peachpit and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Peachpit products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email ask@peachpit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by Adobe Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.peachpit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020