Fixed: Unable to mount samba/cifs share on Pi Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
nugget
Posts: 5
Joined: Wed Jul 28, 2021 3:23 pm

Fixed: Unable to mount samba/cifs share on Pi

Post by nugget »

Fixed: see solution in my reply below

I am trying to mount samba share on my Pi running Dietpi. So I ran the drive_manager to add the file share but it always fails with mount errors 95 and 13. The share is hosted on a Mac running latest OS X 11.5 with the built in samba server. I tried to use drive_manager and get this error message. Here is the error message:
Screen Shot 2021-07-27 at 8.23.18 PM.png
I tried a whole bunch of commands using mount.cifs and mount -t cifs, many different combinations of sec= and vers=; all to no avail. Result being mount error 13, permission denied.

Here is a page from apple talking about SMB. https://support.apple.com/en-us/HT204021

Here are two messages from dmesg:

Code: Select all

[12945.107771] CIFS: VFS: \\192.168.1.158 Dialect not supported by server. Consider  specifying vers=1.0 or vers=2.0 on mount for accessing older servers


[ 7823.928905] CIFS: No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3.1.1), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3.1.1 (or even SMB3 or SMB2.1) specify vers=1.0 on mount.
Let me know what other information/logs are required and I am happy to provide them. I feel this is more difficult than it should be.


Solution: Requires the the "Windows File Sharing:" feature to be enabled on the host Mac. I don't know why the Mac needs this. It gives a message about this feature reducing security in the manner the password must be stored. Not sure how much less secure. I avoided this option before because of this message and just thinking that this wouldn't be needed for linux as it is for windows. I should have tried it earlier. If I were to want to use this feature for longer than just testing purposes, which is what I am; I would look into how much less secure this makes the system.

This feature is located in the system preferences/ sharing/ file sharing/options menu.
Last edited by nugget on Thu Jul 29, 2021 2:53 am, edited 1 time in total.
User avatar
Joulinar
Posts: 6035
Joined: Sat Nov 16, 2019 12:49 am

Re: Unable to mount samba/cifs share on Pi

Post by Joulinar »

Well this is a permission issue. Are you sure you specified correct user/password and used the correct server path/folder?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
nugget
Posts: 5
Joined: Wed Jul 28, 2021 3:23 pm

Re: Fixed: Unable to mount samba/cifs share on Pi

Post by nugget »

Hey thanks looking at this, it gave me energy to go back and look at it with fresh eyes. Turns out it is a stupid option on the host Mac that is required to make it work, "Windows File Sharing:". I describe it in an edit at the bottom of my original post. I was tired and broke two cardinal rules: exhaust all options and try the easiest thing first.
User avatar
Joulinar
Posts: 6035
Joined: Sat Nov 16, 2019 12:49 am

Re: Fixed: Unable to mount samba/cifs share on Pi

Post by Joulinar »

thx for sharing.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply