How to Map a Network Drive on Ubuntu 14
Overview
This document will explain what a Userspace is, and how to map it to your computer that is running Ubuntu 14. Mapping a userspace and mapping a network drive are the same process.
For Windows 7, click here.
For Windows 8 & 10, click here.
For macOS, click here.
What is a Userspace?
A Userspace is a defined amount space (500MB) on Asbury's servers that we allot for your personal use. This means that you can store files on your userspace and access them on any lab computer on campus. This means that you can access it if it is mapped to your computer as well. This is beneficial since all lab computer are wiped after logging out, or if you do not have a removable flash drive.
Please note that you will only be able to connect to your Userspace if you are on Asbury's Network. If you leave campus, an error will appear stating it cannot connect. Once you return to campus the connection will be restored.
What is a Shared Network Drive/Network Share?
Your department may have shared drives that they store files on. You will need to request access from the ITS department with permission from your supervisor to gain access to the drives. Once access has been granted, you can map the drive to your computer and access it when you are connected to Asbury's network on campus.
Mapping your Userspace/Shared Drive
Preparation:
There are a few preliminary actions we need to do before we can start mounting using cifs.
1. Press Ctrl+Alt+T on keyboard to open the terminal. Paste the command below and run to create a mount point, you can replace ‘Ji-share’ to what you want.
sudo mkdir /media/Ji-share

2. Install cifs-utils
, which provides support for cross-platform file sharing with Microsoft Windows, OS X and other Unix systems.
Install it from Ubuntu Software Center, or via below command:
sudo apt-get install cifs-utils
3. Edit the /etc/nsswitch.conf:
sudo gedit /etc/nsswitch.conf
Find the line looks like:
hosts: files mdns4_minimal [NOTFOUND=return] dns
change it into:
hosts: files mdns4_minimal [NOTFOUND=return] wins dns

4. Run below command so that your Ubuntu can resolve Windows computer name on a DHCP network.
sudo apt-get install libnss-winbind winbind
Reboot Ubuntu, or restart your network.
Mount (map) network drive:
Now edit the fstab file to mount network share on start up.
1. Make a backup by running the command below:
sudo cp /etc/fstab /etc/fstab_old
If you need to restore your backup, run:
sudo mv /etc/fstab_old /etc/fstab
2. Create a credentials file via:
gedit ~/.smbcredentials
insert the username and password for accessing the remote share. Replace “Ji” & “741852963” with yours and save the file.
username=Ji
password=741852963

3. Run command to get your gid and uid. Replace handbook with your user name.
id handbook

4. Now edit the fstab by running the command:
sudo gedit /etc/fstab
Add below line (one line) to the end and save it. REPLACE WORDS IN RED!
//192.168.1.5/share /media/Ji-share cifs credentials=/home/handbook/.smbcredentials,iocharset=utf8,gid=1000,uid=1000,file_mode=0777,dir_mode=0777 0 0

Finally run sudo mount -a in terminal and you’ll get the network share mapped in Unity Launcher and Nautilus file browser:
