Differences between revisions 23 and 24
Revision 23 as of 2023-03-20 16:24:47
Size: 3534
Comment:
Revision 24 as of 2023-03-20 16:25:00
Size: 3533
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
=== Mounting an Opus NAS file share automatically on a Linux system === === Mounting a Tome NAS file share automatically on a Linux system ===

Mounting a Tome 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 Tome. 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 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. The wiki server has broken it up into two lines but when you type it in it should be entered exactly as it appears below and as a single continuous line (so it should be ...credentials=/etc/credentials... without the line break):

//tome.bcs.rochester.edu/smithlab /media/smithlab cifs credentials=/etc/credentials,rw,uid=1000,gid=1000,nounix,vers=3.0,iocharset=utf8,file_mode=0777,dir_mode=0777,user,auto 0 0

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

4) Back in your terminal window, 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:

#!/bin/sh
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 Tome 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=<special username provided by Chris>
password=<special password provided by Chris>
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