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
51.7k18 gold badges162 silver badges205 bronze badges
asked Dec 9, 2014 at 7:46
2
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.
answered Dec 19, 2016 at 4:14
JebaDaHutJebaDaHut
3212 silver badges4 bronze badges
6
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.
answered Jul 30, 2018 at 10:22
PaulPaul
2533 silver badges12 bronze badges
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
answered Jun 17, 2017 at 13:37
okurzokurz
1211 bronze badge
This document (7017413) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 12 SP1
SUSE Linux Enterprise Server 12
Situation
When trying to mount a Windows cifs samba share it would give the following error:
mount error(5): Input/output error Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
In SLE 11 SP3 the same command would work when mounting this same Windows share.
Here is a copy of the SP3 syntax that works:
mount -t cifs //server.suse.com:/home /mnt/test -o username=corpdom\username
In SLE 12 SP1 a similar command would fail:
mount -t cifs //server.suse.com/home /mnt/test -o username=corpdom\username
Here is the error on the command line after running this command:
mount error(5): Input/output error Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
If you look at the end of «journalctl» you will see these errors:
Status code returned 0xc0000001 NT_STATUS_UNSUCCESSFUL CIFS VFS: Send error in SessSetup = -5 CIFS VFS: cifs_mount failed w/return code = -5
Resolution
Add «sec=ntlm» to the options in the mount command.
Change «username=corpdom\username» to «username=username,domain=corpdom«
Examples of a working SLE 12 SP1 mount command:
mount -t cifs //IPADDRESS/home /mnt/test -o username=username,domain=corpdom,sec=ntlm mount --verbose -t cifs //IPADDRESS/home /mnt/test -o username=jmortenson,domain=corpdom,password=XXXXXXXX,sec=ntlm mount --verbose -t cifs //server.suse.com/home /mnt/test -o username=username,domain=corpdom,password=XXXXXXXX,sec=ntlm
Example for /etc/fstab:
//IPADDRESS/home/ /mnt/test cifs rw,sec=ntlm,username=username,domain=corpdom,password=XXXXXXXX,sec=ntlm //server.suse.com/home/ /mnt/test cifs rw,sec=ntlm,username=username,domain=corpdom,password=XXXXXXXX,sec=ntlm
Cause
A LAN trace revealed that mount.cifs in SLE 11 SP3 was using «ntlm» for the security mode.
A LAN trace revealed that mount.cifs in SLE 12 SP1 was using «ntlmssp» for the security mode.
Add the option «sec=ntlm» to the mount command to change the security mode to match SLE 11 SP3.
This syntax does not work with SLE 12 SP1 change «username=corpdom\username» to «username=username,domain=corpdom»
Additional Information
smbclient worked fine so this proved that the user was allowed to see and use the Windows share.
smbclient -L IPADDRESS -U username -W corpdom smbclient //server.suse.com/home -U username -W corpdom
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented «AS IS» WITHOUT WARRANTY OF ANY KIND.
- Document ID:7017413
- Creation Date:
25-Mar-2016 - Modified Date:15-Aug-2022
-
- SUSE Linux Enterprise Server
< Back to Support Search
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com
-
Ovitus
- Posts: 27
- Joined: 2018/12/07 16:01:43
Samba: mount error(5): Input/output error
I keep getting this error message with Samba. I’ve rebooted both servers and double checked everything.. why?
Samba Server:
yum install samba cifs-utils -y
systemctl restart smb; systemctl enable smb
vi /etc/samba/smb.conf
[documents]
comment = documents
path = /new
valid users = victoria
write list = victoria
victoria is part of an LDAP domain
smbpasswd -a victoria
Password1
ll -Zd /new
drwxrwxrwx. victoria victoria unconfined_u:object_r:samba_share_t:s0 /new
Samba Client:
yum install cifs-utils -y
vi /etc/fstab
//192.168.50.31/documents /one/two cifs credentials=/root/samba 0 0
vi /root/samba
username=victoria
password=Password1
mount -a
mount error(5): Input/output error
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
-
hunter86_bg
- Posts: 2019
- Joined: 2015/02/17 15:14:33
- Location: Bulgaria
- Contact:
Re: Samba: mount error(5): Input/output error
Post
by hunter86_bg » 2019/02/21 05:03:36
Can you mount the share manually via ‘mount -vvv’ to check if you are able to access the share at a all?
-
Ovitus
- Posts: 27
- Joined: 2018/12/07 16:01:43
Re: Samba: mount error(5): Input/output error
Post
by Ovitus » 2019/02/21 14:23:34
no go, I set selinux to permissive and stopped firewalld on 192.168.50.31.
[root@net2 ~]# mount -vvv -o username=victoria //192.168.50.31/documents /one/two
Password for victoria@//192.168.50.31/documents: *********
mount.cifs kernel mount options: ip=192.168.50.31,unc=\192.168.50.31documents,user=victoria,pass=********
mount error(5): Input/output error
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
[root@net2 ~]# ping 192.168.50.31
PING 192.168.50.31 (192.168.50.31) 56(84) bytes of data.
64 bytes from 192.168.50.31: icmp_seq=1 ttl=64 time=0.307 ms
64 bytes from 192.168.50.31: icmp_seq=2 ttl=64 time=0.408 ms
^C
— 192.168.50.31 ping statistics —
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.307/0.357/0.408/0.053 ms
-
Ovitus
- Posts: 27
- Joined: 2018/12/07 16:01:43
Re: Samba: mount error(5): Input/output error
Post
by Ovitus » 2019/02/26 15:40:15
Getting all sorts of errors with samba-4.8.3-4.el7.x86_64. I’m on CentOS Linux release 7.6.1810.
One showing:
Unable to find suitable address.
With this in the logs:
[349596.178431] CIFS VFS: Error connecting to socket. Aborting operation.
[349596.180187] CIFS VFS: cifs_mount failed w/return code = -113
[349628.143690] 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.
[349628.144530] CIFS VFS: Error connecting to socket. Aborting operation.
[349628.146224] CIFS VFS: cifs_mount failed w/return code = -113
[349794.878070] 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.
[349794.879430] CIFS VFS: Error connecting to socket. Aborting operation.
[349794.881970] CIFS VFS: cifs_mount failed w/return code = -113
[349828.237042] 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.
[349828.237765] CIFS VFS: Error connecting to socket. Aborting operation.
[349828.238756] CIFS VFS: cifs_mount failed w/return code = -113
The other showing:
mount error(5): Input/output error
showing this in the logs:
[ 520.302866] CIFS VFS: Send error in SessSetup = -5
[ 520.303733] CIFS VFS: cifs_mount failed w/return code = -5
[ 711.140148] Status code returned 0xc0000001 STATUS_UNSUCCESSFUL
[ 711.140164] CIFS VFS: Send error in SessSetup = -5
[ 711.141790] CIFS VFS: cifs_mount failed w/return code = -5
[ 884.960839] Status code returned 0xc0000001 STATUS_UNSUCCESSFUL
[ 884.960845] CIFS VFS: Send error in SessSetup = -5
[ 884.961913] CIFS VFS: cifs_mount failed w/return code = -5
[ 890.526495] Status code returned 0xc0000001 STATUS_UNSUCCESSFUL
[ 890.526505] CIFS VFS: Send error in SessSetup = -5
[ 890.527805] CIFS VFS: cifs_mount failed w/return code = -5
[ 894.524696] Status code returned 0xc0000001 STATUS_UNSUCCESSFUL
[ 894.524710] CIFS VFS: Send error in SessSetup = -5
[ 894.525715] CIFS VFS: cifs_mount failed w/return code = -5
I’ve triple checked my configurations. I’m going to try and provision two new test servers to see if these are simply borked.
-
TrevorH
- Site Admin
- Posts: 32529
- Joined: 2009/09/24 10:40:56
- Location: Brighton, UK
Re: Samba: mount error(5): Input/output error
Post
by TrevorH » 2019/02/26 15:42:50
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.
Did you do what it told you to do? This is not just a CentOS or even a samba change, SMB1 is highly insecure and has been disabled by Microsoft on pretty much everything.
-
Ovitus
- Posts: 27
- Joined: 2018/12/07 16:01:43
Re: Samba: mount error(5): Input/output error
Post
by Ovitus » 2019/02/26 17:20:15
I never had to specify version in fstab. Regardless to what I set it to, it still shows the input/output error. I did try 1.0 for kicks just to see if it would work, it did not.
-
TrevorH
- Site Admin
- Posts: 32529
- Joined: 2009/09/24 10:40:56
- Location: Brighton, UK
Re: Samba: mount error(5): Input/output error
Post
by TrevorH » 2019/02/26 17:22:46
Various software updates on both Linux and Windows have progressively got more and more aggressive about disabling SMB1. There was a particularly bad bug that was trivially exploitable on Windows where the only solution was disable SMB1 and that’s been more and more the case since then. Since you’re running samba 4.8 then you already have those changes.
-
Ovitus
- Posts: 27
- Joined: 2018/12/07 16:01:43
Re: Samba: mount error(5): Input/output error
Post
by Ovitus » 2019/02/26 20:02:37
Ok, thanks for the response. I’ve started a new VM with Centos. I’ll see if I encounter the same issues.
-
Ovitus
- Posts: 27
- Joined: 2018/12/07 16:01:43
Re: Samba: mount error(5): Input/output error
Post
by Ovitus » 2019/03/15 18:20:03
Still receiving this error code with the latest version of CentOS:
Mar 15 14:14:23 localhost kernel: CIFS VFS: validate protocol negotiate failed: -13
Mar 15 14:14:23 localhost kernel: CIFS VFS: cifs_mount failed w/return code = -5
I’m sure it’s a bug.
I am running out of ideas. After a long period of testing this morning, I cannot seem to get this to work, and I have no idea why. I want to mount a Windows SMB/CIFS share with a Debian 5.0.4 VM, and it is not cooperating.
This the command I am using.
debianvm:/home/me# whoami
root
debianvm:/home/me# smbclient —version
Version 3.2.5
debianvm:/home/me# mount -t cifs //hostname.domain.tld/share /mnt/hostname.domain.tld/share —verbose -o user=SUBADDOMAIN.ADDOMAIN.DOMAIN.TLD/username
mount.cifs kernel mount options:
unc=//hostname.domain.tldshare,ip=10.212.15.53,domain=SUBADDOMAIN.ADDOMAIN.DOMAIN.TLD,ver=1,rw,user=username,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,pass=*******************mounterror 5 = Input/output error Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
debianvm:/home/me#
The word on the nets has not been very specific, and unfortunately it is almost always environment-specific. I receive no authentication errors. I have tried mount -t smbfs
and mount -t cifs
, along with smbmount
and such. I get the same error before. I doubt it is a problem with DNS resolution, because logging shows the correct IP address. dmesg | tail -f
no longer shows authentication errors when I format the domain and username accordingly. I have played a little with iocharset=utf8
, file_mode
, and dir_mode
as described here. That did not help either. I have also tried ntlm
and ntlmv2
assuming it might be a minimum auth method problem, but not forcing sec=ntlmv2
it can still authenticate without errors anymore. smbclient -L hostname.domain.tld -W SUBADDOMAIN.ADDOMAIN.DOMAIN.TLD -U username
correctly lists all the shares and shows it as the following.
Domain=[SUBADDOMAIN] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager]
Sharename Type Comment
--------- ---- -------
IPC$ IPC Remote IPC
ETC$ Disk Remote Administration
C$ Disk Remote Administration
Share Disk
Connection to hostname.domain.tld failed (Error NT_STATUS_CONNECTION_REFUSED)
NetBIOS over TCP disabled -- no workgroup available
I find the last line intriguing/alarming. Does anyone have any pointers!? Maybe I misread the effin manual.