You need to enable JavaScript to fully utilise this page.

Mounting CUBINlab drives under Linux

Overview

CUBINlab provides numerous shares to the network for MS-Windows users which can be accessed under Linux too. Authentication is on a per-user basis with passwords, rather than more primitive methods as used in NFS. For this reason, NFS access is not provided for machines where typically only one user logs in.

The shares accessible under Linux are the same as those under MS-Windows, so this document only describes how to mount those shares under Linux.

Mounting Samba shares under Linux

  1. Edit your /etc/fstab file and insert the following line, one for each share:

    $SHARE $PATH smbfs uid=$USER,gid=$GROUP,fmask=700,credentials=/etc/samba/smbmount.passwd 0 0
                

    where $SHARE is the share name (e.g. //samba-core/homes for the user home directories in the core network) noting that forward slashes are used rather than the MS-Windows backslashes.

    $PATH is the mount point where you wish to place the share (e.g. /home/j/jpap if I were to mount my home directory and keep it consistent with the path on other multiuser CUBINlab machines).

    $USER is your username (or equivalently, your CUBINlab user id), $GROUP is your groupname (or equivalently, your CUBINlab group id). This uid/gid pair is used to set the ownership of all files mounted by the smbfs. Otherwise, all files will be owned by root! For example, we might use uid=jpap,gid=pgrad for the user jpap in the postgrad group. Note: if you use the groupname rather than the id, then you must ensure it is listed in your /etc/group file.

    The credentials parameter tells smbfs where your username and password is located for that Samba share. This must specify the path (and filename) of a simple text file with two lines:

    username = $USER
    password = $PASS
                

    where $USER is replaced with your username, and $PASS$ with your password.

    Please ensure that you set the permissions of this file appropriately, just in case someone can read it by remotely accessing your machine. The safest method is to set the user:group to root:root, with read/write permissions for root, and no permissions for everyone else.

    As a complete example, here's the /etc/fstab entry that I use:

    //samba-core/homes /home/j/jpap smbfs uid=jpap,gid=pgrad,fmask=700,credentials=/etc/samba/smbmount.passwd 0 0
                
  2. Either reboot your machine to ensure the share is mounted on startup, or mount it manually on the command line as root:

    mount $PATH

    where $PATH is the path to the share that you placed in your /etc/fstab file above.

Further information

For further information on the smbfs, please read the smbmount man page.