{"id":5286,"date":"2020-07-11T13:21:30","date_gmt":"2020-07-11T13:21:30","guid":{"rendered":"http:\/\/www.webputzer.com\/?p=5286"},"modified":"2023-09-05T19:55:26","modified_gmt":"2023-09-05T19:55:26","slug":"mount-a-mac-share-from-linux","status":"publish","type":"post","link":"http:\/\/www.webputzer.com\/?p=5286","title":{"rendered":"Mount a Mac Share from Linux"},"content":{"rendered":"<p><strong>Note: All of this presumes you know how to create a Mac share and that you have cifs-utils installed on Linux.<\/strong><\/p>\n<p>The following syntax worked perfectly, for me, in 2020 &#8211; the Mac OS was Mavericks and the Linux OS was Zorin 15 (Ubuntu &#8220;Bionic&#8221; 18.04):<\/p>\n<pre>mount -t cifs \/\/ServerName\/ShareName \/mnt\/YourMountPointName -o username=ServerUsername,password=YourPassword,nounix,sec=ntlmssp,vers=1.0<\/pre>\n<p>If the above is difficult to read&#8230;again:<\/p>\n<p>mount -t cifs \/\/ServerName\/ShareName \/mnt\/YourMountPointName -o username=ServerUsername,password=YourPassword,nounix,sec=ntlmssp,vers=1.0<\/p>\n<h2>Update 2023<\/h2>\n<p> Everything on this page &#8211; including paragraphs following this update &#8211; refer to <em><strong>a method which used to work<\/strong><\/em>.  When, precisely, this new syntax became a standard is something I don&#8217;t know &#8211; I know that as of High Sierra (a least) the above does not work and the following works as long as the remote samba server has user level shares enabled, and, a user with the same username as the local Mac with sharing privileges granted to that user for the specific share (in smb.conf on Linux):<\/p>\n<pre>mount_smbfs \/\/mac_username:remote_password@the_remote_domain.com\/share_name  \/Users\/guymerritt\/Desktop\/some_directory_on_mac<\/pre>\n<p><strong>RANDOM NOTE &#8211; MOUNT AS MAC USER:<\/strong>  Okay, I think this should be obvious but I just wasted 30-minutes surfing the web looking for an answer to a problem.  I had created a folder on my desktop (<strong>Mojave<\/strong>, if it matters) as a mount point and was opening a terminal, switching to the root account (which I enable), and was having all sorts of weirdness mounting a remote, Linux share. I would mount the share and the desktop folder would disappear.  I looked at the folders permissions, when it was mounted (it was still visible from a terminal), and they were &#8220;root:wheel&#8221;.  Doh.   This needs to be done, in a terminal, from the user account.<\/p>\n<hr \/>\n<p><strong>(Older notes, archived)<\/strong><\/p>\n<h2>Syntax Must Include Version Number<\/h2>\n<p>I found this syntax on the web, minus the &#8220;vers=1.0&#8221; at the end. And, without this at the end, the attempt to mount a Mac share failed with an error code (which I don&#8217;t recall, at the moment). I believe the error was &#8220;operation not supported&#8221;.  Oddly, on the page where I found the syntax numerous people thanked the writer and said that it worked perfectly &#8211; 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. &#8220;vers=2.0&#8221;, etc.) &#8211; it&#8217;s unclear to me.  All I know is that adding &#8220;vers=1.0&#8221;, from Zorin 15, worked for me.<\/p>\n<p>This is from the web, regarding smb version numbers, and applys to Windows &#8211; just here for my own future reference (should I need this info):<\/p>\n<blockquote><p>\nI didn&#8217;t find a list of the allowed levels for smbclient. According to Marc Muehlfeld in\u00a0<a href=\"http:\/\/samba.2283325.n4.nabble.com\/server-max-protocol-appropriate-values-td4682073.html\" rel=\"noreferrer\">this thread<\/a>\u00a0the versions used by Windows are:<\/p>\n<ul>\n<li>SMB 2.0 was introduced by Vista\/2008<\/li>\n<li>SMB 2.1 by Win7\/2008R2<\/li>\n<li>SMB 2.2 aka 3.0 by Win8\/2012<\/li>\n<li>SMB 3.02 by 8.1\/2012R2<\/li>\n<\/ul>\n<p>There are several different\u00a0<code>mount<\/code>\u00a0error messages which can be traced back to mismatched protocol level.  <\/p><\/blockquote>\n<h2>Sub-folders<\/h2>\n<p>I don&#8217;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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8211; the Mac OS was Mavericks and the Linux OS was Zorin 15 (Ubuntu &#8220;Bionic&#8221; 18.04): mount -t cifs \/\/ServerName\/ShareName \/mnt\/YourMountPointName -o username=ServerUsername,password=YourPassword,nounix,sec=ntlmssp,vers=1.0 If the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5294,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"h5ap_radio_sources":[],"footnotes":""},"categories":[21],"tags":[],"class_list":["post-5286","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"_links":{"self":[{"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/posts\/5286","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.webputzer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5286"}],"version-history":[{"count":0,"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/posts\/5286\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/media\/5294"}],"wp:attachment":[{"href":"http:\/\/www.webputzer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5286"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.webputzer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5286"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.webputzer.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}