Difference between revisions of "Accessing your Z drive"

From Applied Optics Wiki
Jump to: navigation, search
(changed the suggested mount point to ~/z)
(Added information for Kubuntu users (need to install the "cifs-utils" package))
 
Line 26: Line 26:
  
 
Maybe the 1-5 is related to how far along the alphabet your surname is, maybe it's random. I suspect the letter ("/s/" in my case) is just the first letter of your surname.
 
Maybe the 1-5 is related to how far along the alphabet your surname is, maybe it's random. I suspect the letter ("/s/" in my case) is just the first letter of your surname.
 +
 +
'''If you're using a Kubuntu distribution, you'll need to install the "cifs-utils" package - this will install the "mount.cifs" command.'''
  
 
The command to "mount" (ie access) my filestore is:
 
The command to "mount" (ie access) my filestore is:
Line 60: Line 62:
 
*Edit /etc/fstab (you will need to be root to do this). '''WARNING: if you mess this up you might well make your PC unbootable. If you don't know what you're doing, seek help!''' Append a line  such as the following:
 
*Edit /etc/fstab (you will need to be root to do this). '''WARNING: if you mess this up you might well make your PC unbootable. If you don't know what you're doing, seek help!''' Append a line  such as the following:
 
  //uon2.ad.nottingham.ac.uk/Users01/b/eezbob  /home/bob/z  cifs  users,username=eezbob,uid=bob 0 0
 
  //uon2.ad.nottingham.ac.uk/Users01/b/eezbob  /home/bob/z  cifs  users,username=eezbob,uid=bob 0 0
*Mark /sbin/mount.cifs as suid (as root):
+
*Mark /sbin/mount.cifs as suid (as root) (you don't need to do this on Kubuntu systems, but you do on SuSE Linux):
 
  chmod u+s /sbin/mount.cifs
 
  chmod u+s /sbin/mount.cifs
 
*After these 3 once-only setup steps, thereafter you (as a regular  user, not root) will be able to mount the shared disk using:
 
*After these 3 once-only setup steps, thereafter you (as a regular  user, not root) will be able to mount the shared disk using:

Latest revision as of 13:14, 7 June 2016

Back to Linux How-tos

Accessing your University "Z drive" storage from Linux - Introduction

The "Z drive" will be familiar to UoN Windows users. It's where you put files you want to access from any Windows PC. It's backed up, you don't have to worry about it.

You can now access this from a Linux PC. It involves a bit of trial and error (to get the right address) and once you've worked that out, then you can set things up so you can easily "mount" the directory without becoming root. But in doing this setting up bit, if you do it wrong, you can very easily make your PC unbootable, so this is only to be attempted if you're sure of what you're doing.

Finding your filestore

To do this, you need to be root. If you don't know how to do this, are scared of doing this, or don't know the password, then ask someone who does. You should know who that is. So:

  • Become root
  • cd /mnt
  • mkdir uondisk

Your filestore will probably be somewhere like:

//uon2.ad.nottingham.ac.uk/Users0[1-5]/[a-z]/eezXXX

(where "eezXXX" is your UoN username)

For me, it's:

//uon2.ad.nottingham.ac.uk/Users04/s/eezsds

Maybe the 1-5 is related to how far along the alphabet your surname is, maybe it's random. I suspect the letter ("/s/" in my case) is just the first letter of your surname.

If you're using a Kubuntu distribution, you'll need to install the "cifs-utils" package - this will install the "mount.cifs" command.

The command to "mount" (ie access) my filestore is:

mount //uon2.ad.nottingham.ac.uk/Users04/s/eezsds /mnt/uondisk -o user=eezsds

Note that the username after "user=" is your university username, which is probably different from your Linux username.

If you've got the filestore location wrong (but your password correct), then an error will appear:

mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Note you need to enter your correct password, otherwise (if you just press enter or enter rubbish) the response will be:

mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

...whether you've got the correct location or not.

If you get the right location (and correct password) then you'll get no error, and when you cd uondisk you'll be able to see your files.

Mounting the filestore as root - summary

As root:

  • Make a suitable directory eg /mnt/uondisk or /mnt/your_username
  • mount //uon2.ad.nottingham.ac.uk/Users0[1-5]/[a-z]/eezXXX /mnt/uondisk -o user=eezXXX

To unmount:

  • umount /mnt/uondisk

Setting it up so you can mount the filestore without being root

  • Make a new, empty directory in your home directory; if your Linux username is "bob", then the following would do it:
mkdir /home/bob/z
  • Edit /etc/fstab (you will need to be root to do this). WARNING: if you mess this up you might well make your PC unbootable. If you don't know what you're doing, seek help! Append a line such as the following:
//uon2.ad.nottingham.ac.uk/Users01/b/eezbob  /home/bob/z  cifs  users,username=eezbob,uid=bob 0 0
  • Mark /sbin/mount.cifs as suid (as root) (you don't need to do this on Kubuntu systems, but you do on SuSE Linux):
chmod u+s /sbin/mount.cifs
  • After these 3 once-only setup steps, thereafter you (as a regular user, not root) will be able to mount the shared disk using:
mount ~/z

or

cd; mount z

(cd on its own puts you in your home directory). To unmount:

umount /mnt/uondisk
  • More information about cifs can be found by typing:
man mount.cifs

Cheers,

Steve.