Page 1 of 1

mount.cifs sec=ntlm

Posted: 2019/11/15 08:06:23
by linuxlion
We use centos release 7.7.1908 (core)
I tried the mount command below:
mount.cifs -o,username=admin,password=password,iocharset=utf8,sec=ntlm //prod02/custom /mnt/share --verbose
According to the manual page mount.cifs the security mode "sec=" allowed the value "ntlm".
But the use of "sec=ntlm" result in "mount error(22): Invalid argument".

The use of "sec=none" result in "mount error(13): Permission denied".
The use of "sec=krb5" result in "mount error(126): Required key not available".
Without the use of "sec=", the mount succeed but is read-only.

On Ubuntu Linux the use of "sec=ntlm" succeed in a writable mount.

Is this a know restriction in Centos?

Re: mount.cifs sec=ntlm

Posted: 2019/11/15 22:48:55
by KernelOops
I think the default security mode, if you don't set it or if you set it empty (sec=) is ntlmssp

But that I don't see why that affects the share's ability to be writeable or not. Maybe that is the cause of another parameter? did you check for any SELinux errors just in case SELinux blocks write access?