How to fix CIFS/SMB mount error: VFS: \\... Send error in SessSetup = -13


While trying to mount a SMB share on Linux, the mount command fails with

mount: /nas: cannot mount // read-only.

with dmesg showing the following error messages:

[  689.574128] CIFS: Attempting to mount \\\myshare
[  689.621472] CIFS: Status code returned 0xc000006d STATUS_LOGON_FAILURE
[  689.621483] CIFS: VFS: \\ Send error in SessSetup = -13
[  689.621503] CIFS: VFS: cifs_mount failed w/return code = -13


Error -13 means that you are missing the cifs-utils package.

Install it using

sudo apt -y install cifs-utils