Friday, March 2, 2012

kerberos and openafs for stanford network in ubuntu

Stanford unix clusters do not allow public key authentication.
It is such a hassle having to type in the password when using ssh and scp.

Stanford offers information on installing kerberos here but openafs is not so straightforward.
The instruction is unnecessarily bloated because they try to cover too many variations of *nix.

If your username on local machine (client) is same as SUNETID (server), then the setup is dead simple.
  1. Install kerberos and afs related components
    sudo apt-get install krb5-user krb5-clients openafs-krb5 openafs-client
  2. Make sure /afs exists. If not, create it.
  3. Reboot to find /afs directory filled with pointers to afs volumes all over the world.
  4. Authenticate through kerberos and obtain AFS token by sequentially running
    kinit
    aklog
  5. Make soft link of your user directory to somewhere more convenient
    ln -s /afs/ir.stanford.edu/[path_to_afs_home_directory] ~/afs
That's it! Some more configuration needs to take place if you want the user name to be different and things like that, but I won't go into that. You are on your own for that part. :)

No comments:

Post a Comment