When you share a directory from OSX Mountain Lion via SAMBA you can mount it from Linux but you cannot write into it.

This problem is related to a new authentication mode present into Mountain Lion (and also in Lion). To resolve this annoying problem, you have to add this parameter to the mount command: nounix,sec=ntlmssp.

sudo mount.cifs //SERVER_NAME/SHARE_NAME/ /home/LINUX_USERNAME/mnt/ -o username=SMB_USERNAME,rw,uid=LINUX_USERNAME,gid=LINUX_GROUPNAME,ip=SMB_SERVER_IP,noperm,nounix,sec=ntlmssp

Where:
SERVER_NAME = you Mountain Lion machine name
SHARE_NAME = you Mountain Lion SAMBA sharing name
LINUX_USERNAME = your Linux username
SMB_USERNAME = your Mountain Lion username with SAMBA permissions
LINUX_GROUPNAME = your Linux group
SMB_SERVER_IP = you Mountain Lion IP address

Share →

2 Responses to Mount a SMB share on Mountain Lion from Linux

  1. Dave Rensberger says:

    Has anyone else found that this method often results in authentication errors once you’ve upgraded to Mountain Lion?

    I say “often”, because I’ve found that with some newer versions of the kernel (3.2.0-29 in Ubuntu 12.04.1) it works marginally but the mount has stability problems, and with other recent kernel versions (2.6.39) it doesn’t work at all (fails with NT_STATUS_LOGON_FAILURE).

    I’m using a “guest” login with no username or password. This worked in Lion, but with Mountain Lion, I’m having lots of problems.

  2. Mike Garrett says:

    Dave,

    I just spent the last 2 hours trying all combinations of mount options. My Mac is running OSX 10.8.4 (which is the most current released software as of today) The linux machine that I’m using is a Centos 6.4 machine that is also yum updated to current.

    Even though I had -o nounix,sec=ntlmssp I constantly got -13 errors.

    The fix for me was filling in the “Computer Name” field on the Mac. (in “system preferences” / sharing) That sure didn’t look like a mandatory field, and for the first 2 hours of messing with it, I left that field blank. After filling it in, it mounted correctly.

    Hope this helps someone else out there that has hit the same brick wall that I did.

    -Mike

Leave a Reply

Your email address will not be published. Required fields are marked *

Looking for something?

Use the form below to search the site:


Still not finding what you're looking for? Drop us a note so we can take care of it!

Visit our friends!

A few highly recommended friends...

Set your Twitter account name in your settings to use the TwitterBar Section.