1

I have a two similar Ubuntu servers 18.04 (4.15.0-39-generic #42-Ubuntu SMP Tue Oct 23 15:48:01 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux) and trying to mount windows files server share on it. On one server it's mounting without problem but on second one failing with invalid argument error:

mount error(22): Invalid argument Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Executing same command on both servers:

mount -t cifs -o username=username,domain=domain-name //path/to/share /mount/path

Kernel log write such messages:

[Tue Dec 4 13:48:36 2018] 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. [Tue Dec 4 13:48:36 2018] CIFS VFS: cifs_mount failed w/return code = -22

1

The Kernel messeage says it: The default SMB dialect doesn't work and you have to specify it. The MAN Page of mount.cifs explains the option:

   vers=
       SMB protocol version. Allowed values are:
       ·   1.0 - The classic CIFS/SMBv1 protocol. This is the default.
       ·   2.0 - The SMBv2.002 protocol. This was initially introduced in Windows Vista Service Pack 1, and Windows Server 2008. Note that the initial release version of
           Windows Vista spoke a slightly different dialect (2.000) that is not supported.
       ·   2.1 - The SMBv2.1 protocol that was introduced in Microsoft Windows 7 and Windows Server 2008R2.
       ·   3.0 - The SMBv3.0 protocol that was introduced in Microsoft Windows 8 and Windows Server 2012.
       Note too that while this option governs the protocol version used, not all features of each version are available.

So you should try to find out which SMB dialect your server is speaking and specify it in your command

Example:

mount -t cifs -o username=username,domain=domain-name,vers=1.0 //path/to/share /mount/path

Link to the man page for further reference: https://linux.die.net/man/8/mount.cifs

  • I have tried all protocol version but no one helped... same mount error. – Edgars Dec 4 '18 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.