Differences between revisions 1 and 24 (spanning 23 versions)
Revision 1 as of 2019-03-28 14:11:31
Size: 3187
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 ===
Line 7: Line 7:
 * 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 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"!
Line 9: Line 9:
 * 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!  * 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!
Line 13: Line 13:
'''sudo -s''' {{{
sudo -s
}}}
Line 18: Line 19:
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: 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:
Line 20: Line 21:
'''apt-get install samba''' {{{
apt-get install samba
}}}
{{{
apt-get install cifs-utils
}}}
Line 22: Line 28:
'''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):
Line 24: Line 30:
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:

//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
{{{
//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
}}}
Line 30: Line 36:
4) Enter the following command to create the folder where your file share will be mounted: 4) Back in your terminal window, enter the following command to create the folder where your file share will be mounted:
Line 32: Line 38:
'''mkdir /media/smithlab''' {{{
mkdir /media/smithlab
}}}
Line 38: Line 46:
'''touch /etc/network/if-up.d/fstab''' {{{
touch /etc/network/if-up.d/fstab
}}}
Line 43: Line 53:
#!
Line 49: Line 60:
'''chmod +x /etc/network/if-up.d/fstab''' {{{
chmod +x /etc/network/if-up.d/fstab
}}}
Line 51: Line 64:
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: 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:
Line 53: Line 66:
'''touch /etc/credentials''' {{{
touch /etc/credentials
}}}
Line 58: Line 73:
username=your_share_username
password=your_share_password
username=<special username provided by Chris>
password=<special password provided by Chris>
Line 65: Line 80:
'''chmod 0600 /etc/credentials''' {{{
chmod 0600 /etc/credentials
}}}

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