ResearchDrive - Connecting From a Linux Computer

This document describes how to connect to ResearchDrive storage from a Linux computer.

There are several ways to connect to ResearchDrive storage from a linux computer:

If you work with restricted data then you will need to consult your local IT support for assistance.

The smbclient method can be used by most linux user accounts, but the mount and /etc/fstab methods require root or sudo privledges so you may need to contact your system administrator or departmental IT person for assistance.

ResearchDrive storage accounts are named based on the PI's NetID such as //research.drive.wisc.edu/[pi netid] but collaborators will login to a ResearchDrive account with their own NetID credentials.

Connect to a file share with smbclient

  1. If you are off campus or using wifi then you will need to connect to WiscVPN. before using ResearchDrive.
  2. Connect to the ResearchDrive share with the smbclient command.
    • If your linux account uses NetID authentication then use the "smbclient -k" for kerberos single sign-on.
      user@host:~ smbclient -k //research.drive.wisc.edu/[pi netid] 
    • If your linux account does not use NetID authentication then omit "-k" and you will be prompted for your login credentials.
      user@host:~ smbclient //research.drive.wisc.edu/[pi netid] 
  3. Once connected to ResearchDrive, you will see a smb :\> prompt.
    Try "help" to get a list of possible commands.
    smb: \>
  4. Use smbclient commands "ls" and "cd" to navigate the folder structure on ResearchDrive.
    • If you need to transfer a single file then use the smbclient "get" or "put" commands to transfer data.
      smb: \>cd [directory]
      smb: \>put [filename]
      smb: \>get [filename2]
    • If you have multiple files to transfer then use the smbclient command "prompt" along with "mget" or "mput" to transfer files that match a pattern such as "*.tar.gz".
      smb: \>prompt
      smb: \>mget *.tar.gz
  5. See Refer to the Common Problems / Troubleshooting section if you have problems connecting.

Connect to a file share with the mount command on CentOS or Red Hat linux

Note: Samba performance is improved on CentOS/Red Hat v8 compared to v7. Consider upgrading to CentOS/Red Hat v8 for faster data transfer speeds.

  1. If you are off campus or using wifi then you will need to connect to WiscVPN. before using ResearchDrive.
  2. Install pre-requisite packages cifs-utils and smb-client.
    user@host:~ sudo yum install -y cifs-utils samba-client
  3. Create a folder on the local file system for the mount point
    user@host:~ sudo mkdir /mnt/researchdrive
  4. Connect with the mount.cifs command.
    user@host:~ sudo mount -t cifs -o user=[netid],domain=ad.wisc.edu,sec=ntlmssp,seal,vers=3.0 //research.drive.wisc.edu/[pi netid] /mnt/researchdrive/
  5. Refer to the Common Problems / Troubleshooting section if you have problems connecting.

Connect to a file share with /etc/fstab on CentOS or Red Hat linux

If multiple users need to access ResearchDrive from the same linux computer then the file share should be mounted by the root user in multiuser mode with an Active Directory service account that has minimal access to the contents of the share. Contact researchdrive@wisc.edu to request an Active Directory service account. Regular users can then provide their NetID credentials to the current session's kernel keyring using the cifscreds utility.

Note: Samba performance is improved on CentOS/Red Hat v8 compared to v7. Consider upgrading to CentOS/Red Hat v8 for faster data transfer speeds.

  1. If you are off campus or using wifi then you will need to connect to WiscVPN. before using ResearchDrive.
  2. Install pre-requisite packages cifs-utils and smb-client.
    user@host:~ sudo yum install -y cifs-utils samba-client
  3. Create a folder on the local file system for the mount point
    user@host:~ sudo mkdir /mnt/researchdrive
  4. Create a credentials file with a text editor to securely store the username and password to automate the login process
    user@host:~ vi ~/researchdrive.cred
    
    username=[netid]
    password=[netid password]
    domain=ad.wisc.edu
    (esc):wq
  5. Set the permissions to only allow the owner to access the credentials file.
    user@host:~ chown [user_name] ~/researchdrive.cred
    user@host:~ chmod 600 ~/researchdrive.cred
  6. Edit the /etc/fstab file to auto-mount the file share when the linux computer boots.
    //research.drive.wisc.edu/[pi netid] /mnt/researchdrive cifs multiuser,sec=ntlmssp,seal,vers=3.0,credentials=/home/[user_name]/researchdrive.cred  0 0
  7. If the file share is mounted with the multiuser option, users can provide their credentials for the server to the kernel's keyring:
    user@host:~ sudo cifscreds add -u [netid] research.drive.wisc.edu
    Password: [netid password]

Connect to a file share with the mount command on Ubuntu linux

  1. If you are off campus or using wifi then you will need to connect to WiscVPN. before using ResearchDrive.
  2. Install pre-requisite package cifs-utils.
    user@host:~ sudo apt-get install cifs-utils
  3. Create a folder on the local file system for the mount point
    user@host:~ sudo mkdir /mnt/researchdrive
  4. Connect with the mount.cifs command
    user@host:~ sudo mount -t cifs -o user=[netid],domain=ad.wisc.edu,sec=ntlmssp,seal,vers=3.0 //research.drive.wisc.edu/[pi netid] /mnt/researchdrive/
  5. Refer to the Common Problems / Troubleshooting section if you have problems connecting.

Connect to a file share with /etc/fstab on Ubuntu linux

If multiple users need to access ResearchDrive from the same linux computer then the file share should be mounted by the root user in multiuser mode with an Active Directory service account that has minimal access to the contents of the share. Contact researchdrive@wisc.edu to request an Active Directory service account. Regular users can then provide their NetID credentials to the current session's kernel keyring using the cifscreds utility.

  1. If you are off campus or using wifi then you will need to connect to WiscVPN. before using ResearchDrive.
  2. Install pre-requisite packages cifs-utils and smb-client.
    user@host:~ sudo apt-get install cifs-utils samba-client
  3. Create a folder on the local file system for the mount point
    user@host:~ sudo mkdir /mnt/researchdrive
  4. Create a credentials file with a text editor to securely store the username and password to automate the login process
    user@host:~ vi ~/researchdrive.cred
    
    username=[netid]
    password=[netid password]
    domain=ad.wisc.edu
    (esc):wq
  5. Set the permissions to only allow the owner to access the credentials file.
    user@host:~ chown [user_name] ~/researchdrive.cred
    user@host:~ chmod 600 ~/researchdrive.cred
  6. Edit the /etc/fstab file to auto-mount the file share when the linux computer boots.
    //research.drive.wisc.edu/[pi netid] /mnt/researchdrive cifs multiuser,sec=ntlmssp,seal,vers=3.0,credentials=/home/[user_name]/researchdrive.cred  0 0
  7. If the file share is mounted with the multiuser option, users can provide their credentials for the server to the kernel's keyring:
    user@host:~ sudo cifscreds add -u [netid] research.drive.wisc.edu
    Password: [netid password]

Common Problems / Troubleshooting

Contact researchdrive@wisc.edu to open a support case.

For more information on common problems that can occur when mapping drives and how to troubleshoot them, please refer to the following resources:

  1. Red Hat Mounting a SMB Share
  2. Ubuntu Mount Windows Shares Permanently
  3. SS64 mount Documentation