There was a day in the Linux world of old where the idea of connecting to a remote network share was by NFS protocol only and was limited to connecting to the remote file system of another Linux Computer. Other methods of transferring files from host to host such as scp, ssh tunnels, ftp, etc, was and still is today, the commonly accepted methods of data transfer. The idea of “Mapping a Network Drive” had not yet existed in the general sense as we know it today.
About the same time period, Microsoft introduced the NetBEUI (NetBIOS Extended User Interface) a protocol much different from NFS. The NetBEUI protocol that provided a means for Windows Workgroup computers to share computer resources over a local network in a peer-to-peer manner. Each computer could create its’s own network shares and even share printers in the Workgroup on a local network. NetBEUI worked very well for local access but it was not initially designed transcend routers as the IP based NFS protocol could. NetBEUI would later be adapted to transport over TCP/IP however.
Microsoft, Linux and MacOS operating systems always had an ardent history of operating in a silo. This was indeed the problem with sharing and accessing computer resources and files between the OS platforms, then and even now to some degree. The idea of a Linux computer EVER needing access to a Windows Share and vice versa (Mac as well) was essentially prohibited. In fact, Linux was the red-headed step child nobody wanted around, so with that, the closed source file systems prevented any type of access other than ssh, ftp, etc.
We are now in the Modern Day of 2022. After more than 30 years of software development overall, modern operating systems homogenous data access has improved by leaps and bounds. Suffice to say that the internet explosion help drive the development of OS interoperability, in addition to Non-Microsoft OSes appearing in corporate cube-life and into production data centers. Today’s NAS filers can serve files in every protocol imaginable, therefore any OS is able to access any data type required on network attached storage. There is no question that interoperability is here to stay. Even after 30 plus years of software development, one thing remains the same.
Windows for Dummies – Right Click > Map Network Drive > Enter Drive Letter and Network Path > Enter User Credentials > BINGO. The Windows network share is connected and will remain that way even after a computer reboot. How easy was that? The way it ought to be. After all, computers access file systems, people access files, work with them, save them, others use them again. Simple right?
Not so fast, Linux OS. The 30 years of past software development come to mind again. Linux should be a formidable desktop to Windows, or at least be able to compete. Time and again, I have thought, “If Linux would just focus on what people need to be productive. You know, easily access network files, attach network printers and provide apps that can work with the data. But you have to be able to access the data, as a Windows Dummy first, not requiring Linux Coder skills, or needing ten Red Bull energy drinks to get through the process! Or maybe the dichotomy is supposed to ever remain on purpose, to never meld together, the Silo Effect.
Linux Coder skills for the Frustrated – Map Network Drive? How? No? I don’t see how, at least not in the GUI. No Right Click? Hmmm. OK, then here we go. First you have to know the Linux command line, that is to say the Linux Terminal, because that is the way its done. The “mount” command will do this for you, but you have to type it exactly. Oh wait, that does not work for network drives, we need to install a utility called cifs-utils because we are attempting to attach a network file system resource, but you did not know that since its not built-in. Once installed then the “mount.cifs” command must be invoked to map Windows Shares, but before that is done, you must created a local “mount point”, rather directory to where the eventual network resource will appear. OK, the manual background work is done so we want to “map that drive”, from the linux terminal, mount.cifs , then we have to put in something like > mount.cifs //192.168.1.100/files /home/brian/docs. That does not work because in order to mount a remote resource, you have to do it with local root access using sudo (super user do) in front of the terminal command, now the command looks something like >sudo mount.cifs //192.168.1.100/files /home/brian/docs. Well that does not work either because there were no credentials listed as options on the command line to pass authentication parameters to the destination resource. You are forgiven because you did not know that either. The new command looks something like >sudo mount.cifs -o username=brian password=somepassword //192.168.1.100/files /home/brian/docs. Alright! The network resource appears at the /home/brian/docs local computer location, but there is one problem. As a user, you try to create a spreadsheet and the return error is ACCESS DENIED. What? Problem here? Since the network resource was mounted by REQUIRING sudo, rather root, you are a normal user, silly! You are not authorized at access something that was created by the root account. Sheesh! How do we solve that? We reboot the computer and try again, because trying to figure out how to disconnect the drive that took you an hour to figure out how to connect, will easily disappear. The reason for a mount to be removed on a reboot is that you did not put the mapping information in the /etc/fstab file. You should have known that step too, if you get this far in the process. More on that in a minute. Trying again, we need to add more option arguments to the command line. That is Linux Coder Talk. This time its the UID and GID of you on the Linux system. What the heck is that, right? You will need to search forums now to figure that out. Now we have >>sudo mount.cifs -o username=brian,password=somepassword,uid-1000,gid=1000,forceuid,forcegid //192.168.1.100/files /home/brian/docs. There we have it. Now I can write files because my UID and GID are on the mount point. There is another hurdle or two to cross if the desire is to automatically mount the same thing after a computer reboot. The file called /etc/fstab is a file that contains all file system mounts and is accessible only to the root account. A manual edit of the file >sudo nano /etc/fstab will open the file. Then add some of the contents of what was typed on the command line, but know that not all the info will be in the file as it was typed on the command line. You knew this right? Who wouldn’t, is my guess. By now I am ready to throw in the towel! Then there is another option to specify looking into a file called “credentials” that can be created and the username and password can be in this file. When the computer boots and the user logs on, the information in the /etc/fstab creates the share map in the background, looking for the “credentials” file to parse out the user and password information in order to authenticate the share mapping.
Linux, 30 years in the making and this is the best “Map Network Drive” option that a new user has to access remote files. Really? Yes, there are some GUI tools to help, but they differ between Linux Distributions. Then in the so called “Lite” Linux distros, many tools are stripped out for the sake of a lean-n-mean light distribution that can run from any storage device, that even the underlying programs are not installed to even be able to do this on the command line after a fresh install.
I purposely created the “Linux Coder skills for the Frustrated” paragraph talking about something as basic as connecting a network resource, and crowded that paragraph with all the required nonsense to get the job done. It was a run-on paragraph of frustration on a simple required task that should be able to be completed in less that 30 seconds on any other operating system. Thirty years, and no headway into the obvious.
As a seasoned Linux user, I still have look up references on how to accomplish various tasks. Code base changes, utilities are renamed, distributions are different in how things are accomplished. Yes, Mapping A Network Drive will become second nature in Linux and can be made permanent on a specific computer if you choose to do so. This example is a red herring revealing the inherent lack of vision open source developers have when it comes to, at the very least, competing on the same level as other operating systems. Just the same level is all. The ask is to not exceed, just meet the basic need, in a basic way, by a basic method so new users are not shunned away after the first 10 minutes of using the bright new shiny install of a cool Linux Distribution.
There is no Linux for Dummies, well there is a book called that, but in practice, Dummies will never run a Linux Desktop Distribution without running into major problems at times.
When all else fails, fire up Windows, right click and “Map Network Drive…” in less than 20 seconds…
