Mount a Mac Share from Linux

Note: All of this presumes you know how to create a Mac share and that you have cifs-utils installed on Linux.

The following syntax worked perfectly, for me, in 2020 – the Mac OS was Mavericks and the Linux OS was Zorin 15 (Ubuntu “Bionic” 18.04):

mount -t cifs //ServerName/ShareName /mnt/YourMountPointName -o username=ServerUsername,password=YourPassword,nounix,sec=ntlmssp,vers=1.0

If the above is difficult to read…again:

mount -t cifs //ServerName/ShareName /mnt/YourMountPointName -o username=ServerUsername,password=YourPassword,nounix,sec=ntlmssp,vers=1.0

Syntax Must Include Version Number

I found this syntax on the web, minus the “vers=1.0” at the end. And, without this at the end, the attempt to mount a Mac share failed with an error code (which I don’t recall, at the moment). I believe the error was “operation not supported”. Oddly, on the page where I found the syntax numerous people thanked the writer and said that it worked perfectly – apparently, without the version number tacked on the end. All I can say is that, in my experience, this had to be added for the share to be mounted successfully. The version number might have to be adjusted (eg. “vers=2.0”, etc.) – it’s unclear to me. All I know is that adding “vers=1.0”, from Zorin 15, worked for me.

This is from the web, regarding smb version numbers, and applys to Windows – just here for my own future reference (should I need this info):

I didn’t find a list of the allowed levels for smbclient. According to Marc Muehlfeld in this thread the versions used by Windows are:

  • SMB 2.0 was introduced by Vista/2008
  • SMB 2.1 by Win7/2008R2
  • SMB 2.2 aka 3.0 by Win8/2012
  • SMB 3.02 by 8.1/2012R2

There are several different mount error messages which can be traced back to mismatched protocol level.

Sub-folders

I don’t know if it was required but I gave read/write permissions to some sub-folders in the Mac share, and, I also used a terminal to recursively chmod the sub-folders to 777. Linux was able to write to the sub-foldsers without a problem.

Leave a Reply