Test system: Ubuntu 16.04.4, date: 2018-03-13.
Note that these commands assume you’re using the root account to set things up.
Install Samba and CIFS Utils:
apt install smbclient cifs-utils
Create a directory to mount to (using “rs” here for Research Storage):
mkdir /rs
There are a few ways to finish setting things up.
For a shared system where a user (non root) can mount the share, first add the share path to your /etc/fstab file:
//storage1.ris.wustl.edu/WUSTLKey/Active /rs cifs domain=accounts,noauto,vers=2.1,mfsymlinks,users 0 0
Then the user that wishes to mount the share can then type this command:
USER=wustlkey mount /rs/path
Note that only the user that runs the command can access the share.
For having Research Storage mount on each boot, usable by all users:
Create a file to store your credentials:
vi /root/.creds
Inside that file, add your credentials:
username=WUSTLKey
password=password
domain=accounts
Protect the file so that only root can view it:
chmod 600 /root/.creds
Then add this to the bottom of /etc/fstab:
//storage1.ris.wustl.edu/WUSTLKey /rs cifs uid=1001,gid=1001,credentials=/root/.creds,vers=2.1,mfsymlinks 0 0
Run “mount -av” to mount the share.