I recently switched to a new computer at work and since then I am not able to mount my personal network share via cifs. I checked twice with my old computer about the command and even the exact version of cifs-utils, which is exactly the same. I have currently no idea why it doesn't work and I hope you can give me some hints to debug this.
Here's the command I'm using:
sudo mount -t cifs -o user=shareuser,uid=myuser,gid=mygrp //path/to/my/network/share /home/myuser/mountpoint --verbose
And here's the error I receive:
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
which is not very helpful as -22 seems to be a generic "something went wrong" error code.
I checked syslog while executing the above command:
Jul 19 15:31:28 kernel: [23412.098328] Key type cifs.idmap registered Jul 19 15:31:28 kernel: [23412.098578] No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount. Jul 19 15:31:28 kernel: [23412.115297] CIFS VFS: DFS capability contradicts DFS flag Jul 19 15:31:28 kernel: [23412.123565] CIFS VFS: cifs_mount failed w/return code = -22
Second and third message also appear on my old computer so this doesn't seem to be any problem.
- (K)Ubuntu 18.04
- Linux 4.15.0-23-generic #25-Ubuntu SMP Wed May 23 18:02:16 UTC 2018
- cifs-utils version 2:6.8-1
I also tried to mount the share by adding it to fstab:
#network share //path/to/my/network/share /home/myuser/mountpoint cifs credentials=/home/myuser/.smbcredentials,uid=myuser,gid=mygrp,file_mode=0777,dir_mode=0777 0 0
Applying fstab results in the same error message.