Difference between revisions of "Windows network share integration for linux"
Line 14: | Line 14: | ||
It can be accessed though, from console, as the same user that is in the windows session. | It can be accessed though, from console, as the same user that is in the windows session. | ||
nicole@Acronix:/run/user/1001/gvfs/smb-share:server=athena,share=media$ | nicole@Acronix:/run/user/1001/gvfs/smb-share:server=athena,share=media$ | ||
− | Again, this is ugly. | + | Again, this is ugly. To solve the ugliness problem a process called gvfs-fuse-daemon is supposed to create a pretty symlink to a subfolder of the user home folder. It should be under |
+ | /home/nicole/gvfs | ||
+ | It should be accessible when typing something like this: |
Revision as of 14:58, 3 June 2015
Samba was developed in the early 1990s as a way for Linux users to access windows shares as well as enabling the use of a Linux file server to emulate a Windows file server. In over 20 years a lot of exciting things have happened in the development of SMB/CIFS networking protocol support in Linux. However, one major achievement has been completely neglected. If a user wishes to have seamless mounting and access to a Windows share, under his own linux desktop login name to the windows network share of the same login name, independent of each login, and persistent after reboot, then there is no simple solution.
It is easy to setup a persistent mount of a network share upon boot by adding an entry into /etc/fstab. This is fine for a single user computer where network security concerns are not present, such as in a home network. However, with this approach, no matter who logs into the linux workstation, he will have access to the network shares under the login privileges of the static mount provided in /etc/fstab. So if Nicole logs into Tom's desktop computer under her Linux username nicole, she will have access to the network shares with Tom's network authority since he created entries in /etc/fstab to connect to the shares with his username and password.
So it is possible in operating systems such as Ubuntu 14.04 to use the built in file manager Nautilus (Nautilus is the name of the file manager in Ubuntu identified only as "Files" from the desktop GUI - and it should also be noted that Ubuntu devs plan to replace Nautilus in a future distro release) and browse the Microsoft Network with native CIFS support - no need to install Samba. Furthermore, when using this method, the user is prompted for a username and password to access the Windows CIFS share. This way now Nicole can access her own shares on the network and not as Tom. However, the access is not persistent after reboot, even when the option to make the mount saved. It is buggy. Also, the mount path is ugly!
- Files -> Browse Network -> Windows Network -> WINDOWS DOMAIN
Here is where you will see the desktop systems with windows file shares and/or the network file server, be it a Windows server or a Samba based file server such as a NAS device. However, about half the time absolutely nothing appears. Again, it is buggy. In testing on Ubuntu 14.04 it was necessary, sometimes, to close and open the Browse Network option several times in order to have visibility of the NAS file server and network shares.
Once the share is selected in Nautilus the user is prompted for a username and password. The files are now visible in Nautilus and look all nice and neat. However, when attempting to access the mount using console, or another program directly such as an mp3 player, it is difficult to find the mount. It is not in /mnt and it is not in /media. Rather it is ugly, like the following example:
/run/user/1001/gvfs/smb-share:server=[name],share=music/mp3/my favorite song.mp3
What the hell is that? Who's going to want to find that or type all that in? It cannot be accessed directly in console as root.
bash: cd: gvfs: Permission denied
It can be accessed though, from console, as the same user that is in the windows session.
nicole@Acronix:/run/user/1001/gvfs/smb-share:server=athena,share=media$
Again, this is ugly. To solve the ugliness problem a process called gvfs-fuse-daemon is supposed to create a pretty symlink to a subfolder of the user home folder. It should be under
/home/nicole/gvfs
It should be accessible when typing something like this: