16

I am getting mount error (5):

Input output error on mounting to cifs windows share.

Command executed:

sudo /bin/mount -t cifs //server/folder /mnt/folder/ -o username="domain/username",password=password

Error returned:

mount error(5): Input/output error Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

The ams command worked on RHEL 32 .

Giacomo1968
  • 53,069
  • 19
  • 162
  • 212
Abdul Jaleel
  • 186
  • 1
  • 1
  • 4

3 Answers3

23

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.

JebaDaHut
  • 331
  • 2
  • 4
  • 3
    Thank you. `vers=2.0` was definitely the key for me in mounting, as was the case with `-m SMB2` when listing shares with `smbclient -L` (`client max protocol = SMB2` in `smb.conf`, for permanent setting). –  Oct 22 '17 at 22:30
  • Adding vers=2.0 to the options solved our issue with this error. Thanks for the suggestion! – Kentgrav Oct 23 '17 at 21:56
  • 1
    This answer has worked for me in Linux with the `mount` command. I had been using the `mount` command without the `vers` option for over 2 years and then, suddenly, the mounting was not working anymore – although I could connect on terminal with `smbclient`. Apparently there has been a change in software version somewhere so that now `vers=3.0` option is needed, so that the remote drive is mounted. – loved.by.Jesus Jan 15 '18 at 13:32
  • Mine worked with vers=2.1 `sudo mount -t cifs -o username=myUser,password=myPassword,vers=2.1 //1.2.3.4/folderA/folderB /foo/bar --verbose` which is weird because the version says 2.23 on my Amazon Linux 1 EC2-Instance `[ec2-user@ip-1-2-3-4 ~]$ sudo mount --version mount from util-linux 2.23.2 (libmount 2.23.0: selinux, debug, assert)` – Kyle Bridenstine Aug 01 '18 at 13:22
  • 2
    vers=2.0 was the solution for me too. – YoMismo Feb 11 '19 at 15:47
  • To get a hint on what to supply for `vers=`, do `sudo dmesg` and look for something like `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.` What was odd for me was that it worked fine with no `vers=` specification but when I unmounted and remounted, I needed `vers=2.0`. – Liam May 28 '20 at 12:31
7

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.

Paul
  • 263
  • 3
  • 12
  • 3
    Bingo! After much frustration regarding `error(5)`, it occurred to me to check `dmesg` on the GNU/Linux side, only to find `Status code returned 0xc0000234 STATUS_ACCOUNT_LOCKED_OUT`. So, I checked the properties of the account in question, which is a local Windows 10 account, and sure enough, `Account is locked out` was checked. (This probably occurred as a result of too many failed logins when I was fiddling with the overall share configuration earlier.) – Ben Johnson Nov 29 '18 at 14:49
  • I think i'd had the same top level error, solved it, but had seen this question in my research so popped back long enough to post.. :) – Paul Dec 03 '18 at 12:38
  • Since i starting getting OP's error once my domain account became locked out and i can no longer access the windows share even via windows (tells me the account is locked out), well... this answer makes sense. – vesperto Sep 21 '22 at 16:20
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
Stephen Rauch
  • 3,091
  • 10
  • 23
  • 26
okurz
  • 131
  • 1