Mount error(5):Input/output error on mount

Solution 1:

When setting up a share on a Windows 2012 server, I had to use:

sudo mount.cifs //server/folder /path/to/folder/ -o user=username,password=pass,vers=3.0

Note the vers=3.0.

Based on the suggestions below, you may need to try vers=2.0. The vers parameter is the key.

Solution 2:

Check the domain account isn't locked out

I found this question in doing my own research for the error, this was the root cause for me so came back to post this answer.

Solution 3:

For me the problem was a different one when trying to mount a share from a NAS device from a more recent GNU/Linux desktop. Specifying -o nounix to disable Unix extensions worked for me.

In the end what helped me was to look into the output of dmesg which told me:

[160169.609325] CIFS VFS: Send error in SETFSUnixInfo = -5
[160169.609327] CIFS VFS: Negotiating Unix capabilities with the server failed. Consider mounting with the Unix Extensions disabled if problems are found by specifying the nounix mount option.
[160169.620877] CIFS VFS: Malformed FILE_UNIX_BASIC_INFO response. Unix Extensions can be disabled on mount by specifying the nosfu mount option.
[160169.620888] CIFS VFS: cifs_read_super: get root inode failed