I'm maintaining a heterogeneous network of mac and linux so I decided to create a little perl script to unify mounting strategies across machines.
The current implementation in linux is in /etc/fstab works fine:
//myserverhere.com/cifs_share /mnt/cifs_share cifs user,uid=65001,rw,workgroup=DEV,credentials=/root/.cifs 0 0
and /root/.cifs contains
username=ouruser
password=ourpassword
I tried translating that to a non-fstab format as follows:
mount.cifs //myserverhere.com/cifs_share /mnt/cifs_share user,uid=65001,rw,workgroup=DEV,credentials=/root/.cifs
But it doesn't seem to work.
Can someone point out what I'm doing wrong please?
Thanks in advance.
Ismael Casimpan :)
Syntax of mount.cifs:
You need to pass the options after the "-o". For example, with your given options, your command should be:
(I didn't test the options you gave.)
-o vers=1.0 option with mount fixed my issue. After an upgrade of RHEL from 7.4 to 7.7, looks like the SMB protocol version changed. Specify the version to match with the cifs server version.
The error I got was this one:
mount error(5): Input/output error Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
-o vers=3.0 option with mount fixed my issue. I didn't upgrade my server, but my client did and did not inform me about.
-o vers=1.0 option works too as I tested right now.