Iowa State University IT

FAQ: How can I access my AFS home directory on Mac OS X if I don't log in to the machine with my Net-ID and password?

Keywords: macintosh | osx | openafs | afs | linux
 
This is a good thing to do if you're using a laptop, because you can't always be sure you'll have an Internet connection when you log in. You will want to create a user on your Mac with the same short name as your Net-ID--ask your Mac for help on "short name" for more information on this. (There are ways around doing this, but they're tedious and don't fit here.) Then do the following:

1. Configure Kerberos (see http://www.tech.ait.iastate.edu/macosx/h...eros.shtml).

2. Install OpenAFS (see http://www.tech.ait.iastate.edu/macosx/h...nafs.shtml).

3. Install attach (see http://www.tech.ait.iastate.edu/macosx/h...tach.shtml).

4. From /Applications/Utilities, start Terminal.

5. Enter the command: cd ~/Library/Scripts

6. Start editing a script with the command: nano MountAFS.command

7. In nano, enter the following lines:

#!/bin/bash
# Script to get AFS tokens and mount the home directory
echo Getting AFS tokens -- enter your ISU Net-ID password.
# Change "NetID" in this line to your ISU Net-ID
until klog -principal ; do
# Keep trying to get tokens until you actually get one
echo Try entering the password again. ;
done
# Now mount the home directory
open /Applications/attach.app

Be sure to change "NetID" in line 5 to your own Iowa State Net-ID. When you're finished, press {Ctrl/O}, then {Enter}, then {Ctrl/X} to save the file and leave nano.

8. Make the script executable with the command: chmod 755 MountAFS.command

9. Back in the Finder, locate the icon for the MountAFS.command file you just created and drag it into the Dock, or make aliases to it in appropriate places.

Now, when you want to mount your AFS home directory, just do this:

1. Make sure you have an Internet connection.

2. Open the MountAFS.command script from the Dock or from an alias.

3. A terminal window will appear. Enter your NetID password and press {Return}.

4. Close the Terminal window.

A folder with your Net-ID as the name will appear on your Desktop; this is your AFS folder.

A wired or wireless Internet connection on the Iowa State campus should almost always work for an AFS connection. From off-campus, depending on your Internet service provider, you may need to start a VPN connection first; see http://www.tech.ait.iastate.edu/macosx/h.../vpn.shtml for more information.


Was this information helpful?