This page describes steps to get connectivity with DICE AFS on a non-DICE Debian (or derivative, e.g. Ubuntu) system.

Super-quick Summary

This should work for most Debian >=5 and Ubuntu >=10.x machines.

Run the following commands in a terminal. You might be prompted for some of the following:

  • Kerberos Servers: kdc.inf.ed.ac.uk
  • AFS Cell: inf.ed.ac.uk
  • AFS Cache size: whatever you wish. Try 500000 (500Mb) if you are unsure.
  • On the last line, [u/MA] is the first character(s) of your username/matric.

$ sudo -i
# apt-get install krb5-config krb5-user ntp
# apt-get install openafs-client openafs-krb5 openafs-modules-dkms
# echo "inf.ed.ac.uk" > /etc/openafs/ThisCell
# /etc/init.d/openafs-client start
# exit
$ kinit [DICE username]
$ aklog
$ cd /afs/inf.ed.ac.uk/user/[u]/[username]/ (for staff)
$ cd /afs/inf.ed.ac.uk/user/s[MA]/sMATRIC/ (for students)

Get required packages

Install at least the following using # apt-get install ...

krb5-config krb5-user ntp
openafs-client openafs-krb5 openafs-modules-dkms

(if you are using Ubuntu you may need to enable the Universe repository for Kerberos packages.)

These packages will likely request configuration. Depending on the distribution this may configure your system correctly, but some distributions do not modify the configuration sufficiently to work with DICE.

Example dpkg prompts:

AFS Cell
inf.ed.ac.uk
AFS Cache size
not too important. Try 200000 - 2000000, or as appropriate for the size of your dedicated AFS partition.
Kerberos Servers (any prompts)
kdc.inf.ed.ac.uk

Try filling in any other prompts using information extracted from the config files below, if you wish. Otherwise just replace the files as shown.

Extended Kerberos Configuration

'kinit' may probably work just by setting the kdc as above. If so, you can skip this step.

If it does not, or for more functionality, you may also set up /etc/krb5.conf to the following (and lose dpkg-managed configuration of the file):

[logging]
  default = FILE:/var/log/krb5libs.log

[libdefaults]
  default_realm = INF.ED.AC.UK
  dns_lookup_realm = true
  dns_lookup_kdc = true
  ticket_lifetime = 64800
  forwardable = yes

  default_tkt_enctypes = des3-cbc-sha1 des-cbc-crc
  default_tgs_enctypes = des3-cbc-sha1 des-cbc-crc

[realms]
  INF.ED.AC.UK = {
    admin_server = kdc.inf.ed.ac.uk:749
    default_domain = inf.ed.ac.uk
  }

[domain_realm]
  .inf.ed.ac.uk = INF.ED.AC.UK

[capaths]
  INF.ED.AC.UK = {
    ED.AC.UK = EASE.ED.AC.UK
  }
  ED.AC.UK = {
    INF.ED.AC.UK = EASE.ED.AC.UK
  }

[appdefaults]
  pam = {
    debug = false
    ticket_lifetime = 64800
    renew_lifetime = 64800
    forwardable = true
    krb4_convert = false
  }

If you are using openafs version 1.4.11 on Ubuntu 10.04, or for any other reason also have Kerberos 1.8 installed, you will also need to add the following to the libdefaults section.

allow_weak_crypto = true

From version 1.4.12 onwards this is not necessary as openafs knows how to ask kerberos 1.8 for the correct configuration.

Configure AFS

The dkms package should have built the openafs kernel module for your installed kernel versions. It will continue to do so whenever a new version becomes available.

First, prepare a partition for OpenAFS. This can be your root partition (no configuration required), if it is formatted using ext2 or ext3.

If you did not set your AFS client as belonging to the 'inf.ed.ac.uk' cell at dpkg configuration-time, configure it now:

# echo "inf.ed.ac.uk" > /etc/openafs/ThisCell

Now start OpenAFS:

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

Establish connection

Get your Kerberos credentials: type

$ kinit [DICE username]

and enter your password. Now establish your AFS credentials using

$ aklog

Your AFS home directory can be found in

/afs/inf.ed.ac.uk/user/[u]/[username]/ or /afs/inf.ed.ac.uk/user/s[MA]/sMATRIC/

where [u/MA] is the first character(s) of your username/matric.

Further Configuration

SSL Certificates

Installing the EUCS root certificates may be useful (though not required). A prepackaged certificate is available at:

http://homepages.inf.ed.ac.uk/gdutton/debian/eucs-sslcerts_1.0.2-5_all.deb

install using # dpkg -i ....

Sorry, the certificates packaged here have expired (but are still installable and remain available to demonstrate how the latest certificates might be installed).

SSH (outbound)

To allow AFS access even when connecting onto DICE machines, set your /etc/ssh/ssh_config file to include the following (before the Host * line):

Host *.inf.ed.ac.uk
  GSSAPIAuthentication yes
  GSSAPIDelegateCredentials yes

Now you are Kerberised...

Why not add Cosign Single-signon capability to your browsers?

Notes

Some Debian packages are compiled with Kerberos / GSSAPI support by default - you might be pleasantly surprised when applications no longer request your password. Other applications may need to be recompiled to take advantage of Kerberos authentication.

-- GrahamDutton - 20 Oct 2008, Feb 2011 -- StephenQuinney - 30 Apr 2010

Edit | Attach | Print version | History: r11 | r9 < r8 < r7 < r6 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r7 - 01 Feb 2011 - 11:12:14 - GrahamDutton
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
This Wiki uses Cookies