With AFS client

With an AFS client on your local machine, transferring files between PDC and your local computer is as is as drag-and-drop, or, using a cp command. Follow the below instruction based on your OS to install an AFS client.

Using AFS client from Ubuntu (Linux)

Installing (Method 1)

Install the AFS client this way:

sudo add-apt-repository ppa:openafs/stable
sudo apt-get install openafs-client openafs-modules-dkms openafs-krb5

The last step will take quite some time, so please be patient! If asked about which AFS cell this workstation belongs to, answer pdc.kth.se. Please note that the openafs-kernel-module will be rebuilt automatically for you with every new openafs version and with every kernel upgrade. You do not need to do any manual work! To start, stop and use your AFS client, see instructions below.

Installing (Method 2)

Using the Synaptic Package Manager’s graphical user interface (GUI) to install these packages:

  • module-assistant

  • openafs-client

  • openafs-modules-source

This can also be done without the GUI:

sudo apt-get install module-assistant openafs-client openafs-modules-source openafs-krb5

If asked about which AFS cell this workstation belongs to, answer pdc.kth.se

Then, in a shell run:

sudo module-assistant

and do the following:

  1. Choose SELECT

  2. scroll down to and select openafs-modules (mark with space)

  3. Choose OK

  4. Choose GET

  5. Choose BUILD

  6. If asked - select YES to INSTALL the AFS kernel module

  7. If not asked - choose INSTALL

  8. Then, elect EXIT to exit the program.

An AFS client for your Ubuntu kernel is now installed on your computer.

Please note, the AFS client kernel module has do be rebuild every time a new openafs version is installed and every time the Ubuntu kernel is upgraded. This involves starting the module-assistant and following the steps 1 through 8 above.

Now, see instructions below on how to start, stop and use the AFS client.

Starting and using the installed AFS client

Start the AFS client on your local machine

sudo /etc/init.d/openafs-client start

Make sure that you have Kerberos installed, then get Kerberos tickets on your local machine

kinit --forwardable <username>@NADA.KTH.SE

Check that you have gotten Kerberos tickets and AFS tokens on your local computer

klist -Tf

The output should look like

Credentials cache: FILE:/tmp/krb5cc_1000
     Principal: username@NADA.KTH.SE
Issued           Expires        Flags    Principal
Dec  8 10:56:11  Dec  8 20:56:11  FPI    krbtgt/NADA.KTH.SE@NADA.KTH.SE
Dec  8 10:56:12  Dec  8 20:56:11         afs/pdc.kth.se@NADA.KTH.SE

Dec  8 10:56:12  Dec  8 20:56:11  User's (AFS ID 1000) tokens for pdc.kth.se

Now you should be able to go to your PDC home directory. On your local computer, simply do

cd /afs/pdc.kth.se/home/<1st letter username>/<username>

Using AFS client from Windows

Installing:

In order to access files in AFS you need an AFS client installed on your computer- in this case the OpenAFS Client. A Kerberos software is also required. Heimdal Kerberos for Windows can be used to authenticate you to the kerberos realm, which in turn will talk to the AFS client, allowing you to access your files. Kerberos grants you tickets which in turn enables you to get AFS tokens, and the two should not be confused for one another.

  1. Download the newest OpenAFS client for Windows from https://www.auristor.com/openafs/client-installer/ (32-bit or 64-bit depending on your computer’s architecture).

  2. Run the downloaded installer(s) for OpenAFS for Windows.

  3. Press Next.

../../_images/afs_windows_install_1.jpeg
  1. Agree and press next.

../../_images/afs_windows_install_2.jpeg
  1. Select to Complete installation and press next.

../../_images/afs_windows_install_3.png
  1. The AFS cell at PDC is called pdc.kth.se (written in lower case). Make sure that you only select the options chosen in the picture below:

../../_images/afs_windows_install_4.jpeg
  1. Press install.

../../_images/afs_windows_install_5.jpeg
  1. Wait a little.

../../_images/afs_windows_install_6.jpeg
  1. Press Finish and OpenAFS will be installed. Choose I want to reboot manually later when asked!

../../_images/afs_windows_install_7.jpeg
  1. At this point you can check if the AFS client has started. Open a folder window and type \\afs as the path, press enter and you should see (among other things):

../../_images/afs_windows_install_8.png

Setting up:

If you do not have a Kerberos software installed on your Windows computer, it is now time to do so. Follow the instructions at this page, and then return to these instructions to continue your setup of AFS!

After installing both OpenAFS and Heimdal Kerberos for Windows and rebooting the computer it is now time for using your software to access your files on AFS!

  1. Make sure that you have Kerberos tickets on your computer. If the OpenAFS installation was successful it should be started with the Network Identity Manager. You should now automatically receive AFS tokens from your Heimdal Kerberos tickets. In the down right corner of you screen this should be confirmed by an icon showing a small yellow padlock (whit NO rec cross on it, which it has if you have no AFS tokens). You should never need to state any passwords or in any other way trouble yourself with the OpenAFS program, it should be run by Heimdal Kerberos!

  2. Now, you should be able to access your home directory and AFS project volumes at PDC. The simplest way of doing this is to again open a folder window. Now, type:

    \\afs\pdc.kth.se\home\<1st letter username>\<username>
    

    where y should be replaced with the first letter in your PDC username and yourUsername should be replaced with your PDC username. Don’t forget the double backslashes at the beginning of the line!

    ../../_images/afs_windows_setup_2.png

    But, that was too easy, wasn’t it? Some of PDC’s users do not have their AFS home directories at PDC. Those who, at any time, have had an account at CSC (or NADA, a school at KTH), still have their AFS home there. The AFS path to your home directory then instead is:

    \\afs\nada.kth.se\home\<1st letter username>\<username>
    

Using:

After installing Kerberos and AFS properly, each time you login at your computer you will be asked by Heimdal Kerberos to state your PDC password in order to get Kerberos tokens. When you have typed your password in the dialog and clicked Ok, you will have both Kerberos tokens and AFS tickets and you will immediately have access to the AFS volumes you have mapped in your explorer Windows.

Using AFS client from OSX

With an AFS client on your local machine you can access your PDC home directory without logging in to PDC, and transferring files between PDC and your local computer can be done by drag-and-drop or using a cp command. How to install AFS on your mac depends on the Mac OS version.

Mac OS X 10.7 to 10.10

To install an AFS client, download the latest version from http://www.openafs.org. Then you need to edit the installable file. By double clicking on .dmg file it will be mounted under the “/Volumes/OpenAFS”

cp -r /Volumes/OpenAFS/OpenAFS.pkg ~/Desktop
vim ~/Desktop/OpenAFS.pkg/Contents/Resources/InstallationCheck

In this file, edit the following line from

if [ $majorvers -ne 13 ]; then

to

if [ $majorvers -ne 14 ]; then

and save it.

Now, on your desktop, double click on “OpenAFS.pkg” to open it. If you face this error: “OpenAFS.pkg” can’t be opened because it is from an unidentified developer you need to hold down “ctrl” button, right click on “OpenAFS.pkg” and choose “open” and you will see a dialog box. Click “Continue” to continue the installation and when you are asked about the default cell, enter:

pdc.kth.se

Finish the installation and reboot your computer.

After you installed and rebooted, check if you can see AFS as an icon on the desktop. If not, open Finder and Preferences. Make sure you have the “Connected servers” box ticked.

Use kinit to create Kerberos tickets as described in How to configure kerberos and SSH. You may also need to separately obtain AFS tokens with

aklog

Mac OS X 10.11 to 10.12

There were significant changes to the way software is set up, as the drivers need to be signed. It is possible, however, to download signed binaries from AuriStor.

Mac OS X 10.13 or later versions

Apple has made substantial changes which affect the AFS client. Any OpenAFS or AuriStorFS client prior to AuriStorFS v0.160 will panic a High Sierra OS when started, so make sure to install only versions above v0.160. For details, please read this email on the OpenAFS email list.