Problems mounting smb share

Hey,

I have difficulties mounting a samba share in osmc.

With raspbmc I used following entry in fstab to mount my share:
//192.168.178.1/fritz.nas/ /media/Fritz-Nas cifs username=xxx,password=yyy,uid=1000,gid=1000,iocharset=utf8 0 0

But trying this with osmc on a rpi2 leads to:

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

Can some give me advice on how to mount my share properly?

Thanks

Try add sec=ntlmv2 option. If this works I will make it default again

Sam

this worked :slight_smile:

Thanks for your quick response and constant good work !

Hi

I have patched this in the kernel and it will be enabled by default for the next build so you will not need to specify this manually in fstab or your mount command in the future:

I just noticed one more thing.
I’m now able to mount the share with
sudo mount -a

But when I restart my device there is an error warning and the share doesn’t get mounted automatically.

Here the dispayed warning:

CIFS VFS: Error connection to socket. Aborting operation.
CIFS VFS: cifs_mount failed w/return code = -101
Failed to mount /media/Fritz-Nas
systemctl status media-Fritz\x2dNAs.mount' for details

Maybe it’s trying to mount before the network is up?
Will this be solved with the kernel patch?

No, but measures have been taken to ensure the network is up early before mounting

alright, thanks!

Hi,

You are not using the correct fstab mount options to work properly with systemd. Please see the following post:

Summary: do not use _netdev or auto, do use noauto and x-systemd.automount.

1 Like

Thanks, I added noauto and x-systemd.automount and now it mounts the share after rebooting.

I am becoming crazy in properly configure /etc/fstab for accessing to my time capsule. I had success with openelec creating mount file with following Options=username=myusername,password=mypassword,sec=ntlm but with osmc I am not able to properly mount. I am trying with the following line in /etc/fstab: //ip_address/path cifs credentials=/etc/samba/credentials,uid=1000,gid=1000,x-systemd.automount,noauto,sec=ntlm,iocharset=utf8 0 0
I am able to access (and ls its contents as well) to my time capsule but transmission seems to be not able to write on the remote disk. Following error is displayed: error: permission denied after a couple of megabyte download … someone can help ?

I have found where the issue was … UID=1000 that is osmc could write in the time capsule but debian-transmission (uid=109) could not … so I changed uid=1000 to uid=109 and now it works … not sure if it is possible to enable write permission to both uid 1000 and 109 … it seems not because if I insert both only the last one is considered … any way to enable two UID ? thx