Mounting Windows WUR shares in Linux
Table of Contents
At Wageningen University & Research the Linux Operating System is supported on a best effort principle, meaning that it is supported as far as the knowledge of Facilities and Services Information Technology (FB-IT) reaches. FB-IT is supported by their colleagues maintaining the High Performance Computing Cluster Anunna, who have a lot of knowledge about the Linux Operating System, because it’s the Operating System used by Anunna.
On the other hand Linux users are generally users, who are very independent and know how to search for and implement solutions themselves. Being one of those Linux users within WUR myself, I want to share in this post, how I mount Windows shares from Wageningen University & Research within my Linux systems.
Mounting WURNET shares
The method of mounting Windows shares from Wageningen University & Research, described in this post, uses the Common Internet File System (cifs) via the
/etc/fstab file. This allows for automatic mounting of Windows shares during boot, when the computer is physically within WURNET.
A prerequisite for the described method is that the common internet file system utilities
cifs-utils are available on your Linux system. When in doubt, open a terminal and execute, one by one, the following commands:
sudo apt update sudo apt install cifs-utils
Create a credentials file in your HOME directory
The procedure described, using the
/etc/fstab file, requires a credentials file to store your WUR Windows username and password. This credentials files needs to be stored in the root of your HOME directory
localusername is your username on the Linux system.
Open a terminal and change the directory with:
Print the current directory with
pwd and confirm that you are in
localusername reflects the username on your Linux system.
Create a credentials file, e.g.
.smbpassword, with the following command:
Using your favorite editor, e.g. VIM, Emacs, nano or whatever editor your prefer, edit
.smbpassword and add the following lines:
username=user001 password=your-windows-password domain=WUR
user001 is your WUR username and
your-windows-password is the current WUR Windows password, which you would use to log into a WURclient computer or log in to get your WUR e-mail using Outlook Online (https://outlook.office365.com).
Create a mount point for the Windows share
For each Windows share you wish to mount during boot, you need to create a mount point.
For example I have created a mount point for my personal WUR Windows share (also known as the
M:-drive within WUR) under
wur-m. Creation of such a mount point is achieved with the following command:
sudo mkdir /mnt/wur-m
Add filesystems to
/etc/fstab contains descriptive information about the filesystems the system can mount. The file is only read by programs, and not written; it is your duty as system administrator to properly create and maintain this file.
Each filesystem is described on a separate line. Fields on each line are separated by tabs. Lines starting with
# are comments. Blank lines are ignored.
Retrieve user and group identifier
To properly mount a filesystem the values of the user (
uid) and group (
gid) identifiers are required. To retrieve the
gid values issue the following command in a terminal:
localusername should be your username on the Linux system.
In most Linux systems the first user will have
gid=1000. Do not assume these values are the same for your system, always check with before mentioned command!
/etc/fstab and add the filesystem
The file containing static information about the filesystems resides in
/etc and, therefore, can only be edited by the system administrator, also known as root.
/etc/fstab with administrator (root) privileges in your favorite text editor, e.g. VIM, Emacs, nano or whatever editor you prefer. As an example here the command to open the
/etc/fstab file with
sudo xed /etc/fstab
Start on a new line below everything already present in the
To add your Personal WUR Windows share add the following line:
# WUR Personal M-drive //fs01mixedsmb.wurnet.nl/DBL-STANDARD_HOMEDIR$/user001 /mnt/wur-m cifs credentials=/home/localusername/.smbpassword,user,uid=uidvalue,gid=gidvalue 0 0
- Make sure that there are tabs between each element in the line of the
user001with your WUR username
localusernamewith your username on the Linux system
gidvaluewith the values obtained from the
idcommand as described above.
Retrieving the address of the filesystem to be mounted
The easiest way to retrieve the address of the WUR filesystem to be mounted is via File Explorer on a Windows WURclient. A Linux user can alternatively use VMWare Horizon client to log into a virtual Windows desktop. Perform the following steps:
- Open File Explorer
- Navigate in the left column to
dfs-root (\\wurnet.nl) (W:).
- Locate the the folder you wish to mount as a filesystem in your Linux system, e.g. a project folder under
- Right-click the folder you wish to mount as a filesystem and open up the
- Click the tab
DFSand denote the path provided.
Convert the denoted path to be used in the
- Replace each
- Replace underscore characters in the folder name by
\137(octal ascii code)
- Replace whitspace characters in the folder name by
\040(octal ascii code)
W:\PSG\_Data Exchange (PSG-wide)becomes:
W:\PSG\PSG Biometris(also known as the Biometris
Mount a share after boot or setting up a VPN connection
When after booting your system a Windows share is not automatically mounted or you have set up a VPN connection to WURNET and want to mount a WUR Windows share from your
/etc/fstab file, this is done by issuing the following command:
# For example connect /mnt/wur-m after setting up a VPN connection sudo mount /mnt/wur-m
To disconnect a WUR Windows share, for example prior to breaking of a VPN connection, issue the following command:
# For example disconnect /mnt/wur-m prior to breaking a VPN connection sudo umount /mnt/wur-m