Installing and configuring AFS for Macintosh OS X
Getting started with AFS
Print these instructions before you begin.
To download and install the AFS client, you'll need the following:
- Your NetID and password.
- An active connection to DukeNet.
Read the following important information before you begin.
In order to access your AFS space within the Finder environment, you will need to make fundamental changes to your Mac OS X account. If you fail to follow these directions carefully you could cause serious problems to your computer. At one point during the process, Internet Explorer may not start.
You will need to grant permission as administrator for many of the steps in this document. These directions assume that you do not have root enabled. All changes can be done with the sudo parameter. You only need to provide your Mac OS X password before proceeding. However, you can execute these commands via root if you have enabled it.
Make sure you know your Mac OS X short name and password. You will need this information when entering commands. If you are setting up a new Mac OS X system, we suggest you make your short name the same as your NetID.
These instructions are geared toward Mac users who may not be familiar with using a command line interface. If you are an experienced Unix user, you may want to use a different editor to modify the configuration files.
Tip: It's not necessary to type many of these commands. Simply copy and paste the commands into the Terminal application. Use the right and left arrows to edit the commands.
Follow the instructions below.
Preparing Mac OS X
Because of a quirk in the Mac OS X Finder, you must make some fundamental changes to your Mac OS X account to have full access to your acpub AFS space.
CAUTION: Follow these directions carefully! Failure to do so could cause serious problems with your user rights in Mac OS X.
- In the Utilities folder, select Terminal.
- In the Terminal window, at the prompt, type id and press ENTER. Memorize or write down the displayed uid for your Mac OS X short name (it may be 501).
- Type (or copy and paste) the following, replacing username with your NetID: ssh -l username login.oit.duke.edu
- Press ENTER. You may see warnings about the authenticity of the host. Type Yes to continue connecting to the acpub system.
- When prompted for your password, type your NetID password and press ENTER.
- When you're connected to the acpub system, at the prompt, type id and press ENTER. Memorize or write down the displayed uid associated with your NetID.
- Type logout and press ENTER. You'll be disconnected from the acpub system but the Terminal application will remain open.
- At the prompt, type (or copy and paste) the following, replacing shortname with your Mac OS X short name and replacing newid with your NetID uid (from step 6): sudo niutil -createprop . /users/shortname uid newid
Example: If your short name is jdoe and your uid from step 6 is 2345, type:
sudo niutil -createprop . /users/jdoe uid 2345
- Press ENTER.
- When prompted, type your Mac OS X user password and press ENTER.
- From the Apple menu, select Logout.
- When prompted, quit the Terminal application.
- Log back in and start the Terminal application.
- At the prompt, type (or copy and paste) the following, replacing oldid with your uid from step 2 and replacing shortname with your Mac OS X short name:
sudo find / -xdev -user oldid -print0 | sudo xargs -0 chown -h shortname
Example: If your short name is jdoe and your uid from step 2 is 2345, type:
sudo find / -xdev -user 2345 -print0 | sudo xargs -0 chown -h jdoe
- Press ENTER. A blank screen may display for a few moments, but when the command is finished processing, the prompt will return.
Downloading and installing the AFS client
- Click here to download the AFS client for your version of OSX - you can check your version by clicking on the Apple in the upper right hand corner of your screen and selecting "About This Mac."
NOTE: If the file does not automatically decompress, use StuffIt Expander to extract OpenAFS Installer.
- Double-click the downloaded file.
- Click the lock button and authenticate as the administrative user.
- Click Continue and proceed through the installer program. When the installation finishes, close the installer and delete the OpenAFS.pkg files.
Next steps
Click here to learn how to use the AFS client.