Tag Archives: Samba Mount Error

[Solved] Samba Mount Error: mount error(22): Invalid argument

Samba mount using cifs method reported an error:
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

 

Check the Log:

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.

 

Reason and Solution:No cifs share version specified, cifs are divided into smb1.0/2.0/3.0/3.1

mount -t cifs //ip/data /test -o username=test,password=test,vers=3.0

The sec parameter setting may also lead to similar errors, you can check through man to select the sec parameter setting for that one