Differences between revisions 2 and 3
Revision 2 as of 2019-03-28 14:15:15
Size: 3295
Comment:
Revision 3 as of 2019-03-28 14:15:34
Size: 3297
Comment:
Deletions are marked like this. Additions are marked like this.
Line 26: Line 26:
//opus.cvs.rochester.edu/smithlab /media/smithlab cifs //opus.cvs.rochester.edu/smithlab /media/smithlab cifs

Mounting an Opus NAS file share automatically on a Linux system

Notes:

  • These instructions were written using Linux Mint 19.1 but should work for Ubuntu and other distributions as well.
  • For this document we will use "smithlab" as the (fictitious) name of the file share on Opus. Be sure to substitute the name of your file share for "smithlab"!

  • For step 6, a special username/password used only for these automounts will be provided to you by me (Chris). Do *not* use your personal login credentials for this!

1) Most (all?) of this process involves typing in commands in a terminal window so open one up using the "Terminal" application. Type in this command to give you the root access necessary to make the needed changes:

sudo -s

(enter the password for your computer account when requested)

2) We first need to make sure the Samba/CIFS file sharing protocols are installed on the computer...not all Linux distributions ship with them. In your terminal window and enter the following commands:

apt-get install samba

apt-get install cifs-utils

3) We now need to edit the "/etc/fstab" file to add the command necessary for the computer to be able to mount your file share. Open this file in your preferred text editor and add this line to the end of the file. It should be entered exactly as it appears below and as a single continuous line...not as 2 lines:

//opus.cvs.rochester.edu/smithlab /media/smithlab cifs

credentials=/etc/credentials,rw,uid=1000,gid=1000,nounix,vers=1.0,iocharset=utf8,file_mode=0777,dir_mode=0777,user,noauto 0 0

(remember, substitute the name of your file share for "smithlab")

4) Enter the following command to create the folder where your file share will be mounted:

mkdir /media/smithlab

(remember, substitute the name of your file share for "smithlab")

5) We now need to create an executable file Linux can use to mount the file share at startup. First, create the necessary file by typing this command into your terminal window:

touch /etc/network/if-up.d/fstab

Now edit the file you just created using your preferred text editor. Enter the following text into the file:

mount -a

Now make this file executable by typing this command into your terminal window:

chmod +x /etc/network/if-up.d/fstab

6) Now we need to create a file that contains the username/password Linux will use to log into Opus so it can mount the file share. Type the following command into your terminal window to create this file:

touch /etc/credentials

Now edit the file you just created using your preferred text editor. Enter the following text into the file:

username=your_share_username
password=your_share_password
domain=CVS

Now set the permissions on the file you just created to restrict access to it:

chmod 0600 /etc/credentials

7) Now reboot your computer. Once restarted the file share MAY appear on your desktop automatically. If not, go to "Computer" (or whatever allows you to see the drives on your computer)...an icon for your file share should appear. Double-clicking on it will mount it on the desktop and open a file selector window.

LinuxShareMount (last edited 2023-03-20 16:25:00 by WikiAdministrator)

MoinMoin Appliance - Powered by TurnKey Linux