Difference between revisions of "Accessing your Z drive"
m (Corrected the error response for wrong location, right password) |
(changed the suggested mount point to ~/z) |
||
Line 56: | Line 56: | ||
== Setting it up so you can mount the filestore without being root == | == Setting it up so you can mount the filestore without being root == | ||
− | *Make | + | *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: | *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 / | + | //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): | ||
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 | + | *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 / | + | mount ~/z |
+ | '''or''' | ||
+ | cd; mount z | ||
+ | (cd on its own puts you in your home directory). To unmount: | ||
umount /mnt/uondisk | umount /mnt/uondisk | ||
*More information about cifs can be found by typing: | *More information about cifs can be found by typing: |
Revision as of 12:56, 5 October 2012
Back to Linux How-tos
Contents
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.
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):
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
- There is also some useful (technical) information at: http://kernel.org/doc/readme/fs-cifs-README
Cheers,
Steve.