Command Line Access To Windows Shares
Recently for work I had to access a Windows share on an office NAS. The box is a typical off-the-shelf NAS. The office workers use Windows desktops. The NAS is configured to share files through Samba.
The MATE Caja file manager provides a simple menu option to access remote servers. This works rather well. That is, after I searched the web and figured out that on CentOS 7 I had to install the
gvfs-smb package to get Caja to support Windows shares.
My challenge was I had a large VirtualBox vdi file to copy to the NAS. I did not want to do this through a GUI file manager. Using a terminal is much faster. The impression is that the mounted Windows share is specific to the file manager environment. Running the
mount command does not show the mounted Windows share.
I grudgingly used the GUI file manager to copy the file. Yes, that was the Jeopardy theme song playing in the background.
I let the matter rest for a day and then dug deeper.
The Caja file manager uses
gvfs-mount to mount a Windows share. The location of the mount point depends on the distro. For CentOS 7, which I am using to isolate personal and business work flows, the location is
After finding the mount point I now am able to access the Windows share from the terminal.
Using Caja I created a bookmark to the Office NAS. As my virtual machine environment is encrypted, I configured Caja to store the user name and password. The credentials are stored in a keyring at $HOME/.local/share/keyrings/login.keyring. Now I need only select the bookmark, pop open a terminal, and