Cifs "mount error 5 = Input/output error" but smbfs works!
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Aaand it shows it's ugly head again! This time you might find it's because your kernel rose above 4.13.
There is solutions that are as QaD as DOS. The reason is Linus force moved cifs to SMB3 from SMB1. Before you do an easy solution (downgrading or adding an option to use SMB1) you should take note of the problems SMB1 can cause, If your machine is behind a firewall you will probably keep the net safe enough. I took an easy solution for now, but will resolve issues eventually.
Last edited by k9dog; 10-18-2017 at 10:49 PM.
Click here to see the post LQ members have rated as the most helpful post in this thread.
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
Rep:
Quote:
Originally Posted by k9dog
Aaand it shows it's ugly head again! This time you might find it's because your kernel rose above 4.13.
There is solutions that are as QaD as DOS. The reason is Linus force moved cifs to SMB3 from SMB1. Before you do an easy solution (downgrading or adding an option to use SMB1) you should take note of the problems SMB1 can cause, If your machine is behind a firewall you will probably keep the net safe enough. I took an easy solution for now, but will resolve issues eventually.
In order to continue to connect to cifs shares on a Windows 2003 Server in my home LAN, I had to add "vers=1.0" to my fstab entries.
With CentOS 7.4 using its stock kernel "kernel-3.10.0-693.2.2.el7" I could successfully mount a Windows 10 Pro version 1703 share with a command like this:
Code:
mount -t cifs //127.1.2.3/myshare /mnt/mymount -o user=william,pass=gates,vers=3.0 -rw
After upgrading my kernel to "kernel-lt-4.4.93-1.el7.elrepo.x86_64" the mount command above gave this error:
Code:
mount error(5): Input/output error
Like others here reported I could connect with smbclient like this:
By running 'dmesg' I was able to see another error message that appeared before the unhelpful "mount error(5): Input/output error" message. The these two messages always appeared in pairs:
Googling for the first error message (CIFS VFS: validate protocol negotiate failed: -11) lead me to this bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1502606
which had the workaround. Using version 2.1 instead of 3.0 solved the problem. This is the mount command that now works for me:
Code:
mount -t cifs //127.1.2.3/myshare /mnt/mymount -o user=william,pass=gates,vers=2.1 -rw
As an added bonus SMB version 2.1 also works with the stock kernel-3.10.0-693.2.2.el7.
I've just experienced the same and would like to share my solution.
sec=ntlm was to be set
FQDN was required suddenly (and is the best practice in any case, anyway.)
Example: In /etc/fstab file i had to change the entry //somehostname/share to //somehostname.domain.local/share.
Domain entry was to be added to credential file:
username=usr
domain=domain.local
password=somepass
After those changes it worked fine again.
Last edited by vigidr; 03-21-2018 at 08:43 PM.
Reason: Title
I had Ubuntu 16.04 with kernel 4.10 and mounting was working fine.
Since kernel moved to 4.13, nothing is mounting and have the error described (mount error(5): Input/output error) likely to be linked to this explanation
I made it work by adding vers=3.0 option where I got inspiration from jim-j comment
I found this thread having struggled to find a solution to the "mount error = 5" for cifs smb.
Having tried some of the suggestions given above [without success], I finally found another solution.
In my case the list of 'valid users' in smb.conf needed to be separated by commas
valid users = joe jane @sambashare didn't work and returned the error =5
valid users = joe, jane, @sambashare did work
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.