I needed to have a scheduled job to copy files from my MythTV server to my Open Media Vault server, but when I tried to mount the Samba/SMB share I got the following:
root@nas2:/mnt# mount -t cifs \\\\192.168.202.44\\public /mnt/192.168.202.44 -o domain=CANTABRIAN,user=backup,pass=mypassword
mount: block device \\192.168.202.44\public is write-protected, mounting read-only
mount: cannot mount block device \\192.168.202.44\public read-only
My Open Media Vault, OMV, server was running Debian with Samba version 3.6.6. This was trying to mount a share from my MythTV host which is running CentOS 7 and Samba 4.8.3.
Tried about a million things but just could not get past the error.
What worked was adding “sec=ntlmssp”. Looking at the RedHat docs it says:
If the server does not support the ntlmv2
security mode, use sec=ntlmssp
, which is the default. For security reasons, do not use the insecure ntlm
security mode.
So the working line is:
mount -t cifs \\\\192.168.202.44\\public /mnt/192.168.202.44 -o domain=CANTABRIAN,user=backup,pass=mypassword,sec=ntlmssp
Resources
RedHat: Mounting an SMB Share
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/storage_administration_guide/mounting_an_smb_share