You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How to mount SMB shared folder (of a Mac) with Linux?

I am trying to mount a shared folder located on a Mac Mini using a machine running Ubuntu. On the Mac Mini, a specific user of type "Share Only" has been created with access permissions to the folder. I have tested the credentials and access to the shared folder from another Mac Mini, and everything works correctly.

While searching online, I found that it is possible to mount the folder on Linux using the "cifs-utils" package with the following command:


sudo mount -t cifs //192.168.1.2/Projects /root/projects/ -o noauto,user,credentials=/root/.smb-credentials,noperm,uid=501,gid=20,sec=ntlmssp,nounix


where the file /root/.smb-credentials contains the following lines:


username=user123
password=pass123
domain=WORKGROUP


However, when I attempt the connection, I receive the following response:


mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)


The following lines appear in the dmesg log:


[5715189.427134] CIFS: Attempting to mount \\192.168.1.2\Projects
[5715189.467070] CIFS: Status code returned 0xc000006d STATUS_LOGON_FAILURE
[5715189.467093] CIFS: VFS: \\192.168.1.2 Send error in SessSetup = -13
[5715189.468245] CIFS: VFS: cifs_mount failed w/return code = -13


The protocols supported by macOS Ventura are (test performed by Linux):


Host script results:
| smb-protocols: 
|   dialects: 
|     2.02
|     2.10
|     3.00
|_    3.02


Here are the important points:

  • The entered credentials are correct and have already worked on another Mac-to-Mac connection.
  • We are on an internal network, and firewalls have been completely disabled for testing purposes.
  • We have already tried disabling SMB 3.x to use only SMB 2.x, but the error persists.
  • All mount command options have been removed, leaving only the minimum required for the connection.


What is missing?


Mac mini, macOS 12.0

Posted on May 26, 2023 6:03 AM

Reply
Question marked as Top-ranking reply

Posted on May 26, 2023 6:47 AM

Sorry, I solved it on my own. It is a setting that can be found by clicking the "Options..." button and defining file sharing to include Windows. It needs to be enabled for each user that you want to grant access to via Windows OS (and then it will also work for Linux). Honestly, I find the reasoning a bit convoluted.

Similar questions

2 replies
Question marked as Top-ranking reply

May 26, 2023 6:47 AM in response to Semplitech

Sorry, I solved it on my own. It is a setting that can be found by clicking the "Options..." button and defining file sharing to include Windows. It needs to be enabled for each user that you want to grant access to via Windows OS (and then it will also work for Linux). Honestly, I find the reasoning a bit convoluted.

How to mount SMB shared folder (of a Mac) with Linux?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.