You are not logged in.

#1 2017-10-21 19:38:37

zvon
Member
Registered: 2016-01-03
Posts: 45

[Solved] Can't mount samba shares with credentials

When I try to mount a samba share using "sudo mount -t cifs //server/share -o user=user mount_dir" I get a mount error(5) input outpu error, but when I remove the user (mounting as guest) it mounts just fine. Everything worked fine about 3 weeks ago. Does anyone have any idea what might be wrong?

Also when I open my network in nautilus it only shows 2 servers, one not even running samba and I can't connect to either one, I have to type in "smb://ip_address" when I want to list shares of the server I want. When connecting with credentials through nautilus, everything works

Last edited by zvon (2017-10-24 18:16:27)

Offline

#2 2017-10-21 19:48:37

applebaps
Member
From: Alaska
Registered: 2017-10-19
Posts: 28
Website

Re: [Solved] Can't mount samba shares with credentials

I had an issue with mounting samba shares recently where specifying the IP of the computer I was trying to access in the mount.cifs command made it go through just fine (it would fail with I/O error without it).  Have you tried adding that parameter to your mount command?

Offline

#3 2017-10-21 21:12:26

zvon
Member
Registered: 2016-01-03
Posts: 45

Re: [Solved] Can't mount samba shares with credentials

Yeah, tried adding ip as a parameter, tried putting ip instead of server name, still getting I/O errors. I also tried different security options (found that in a thread somewhere) and that didn't help either.

Offline

#4 2017-10-21 22:00:32

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,721
Website

Re: [Solved] Can't mount samba shares with credentials

I also tried different security options

What security options? Have you searched for other topics regarding samba? There have been a lot of topics recently.

Post the full output you get when trying to mount, and check the journal for additional details.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2017-10-22 10:29:12

zvon
Member
Registered: 2016-01-03
Posts: 45

Re: [Solved] Can't mount samba shares with credentials

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

Journal:
Oct 22 12:09:41 ArchPC kernel: Key type dns_resolver registered
Oct 22 12:09:41 ArchPC kernel: FS-Cache: Netfs 'cifs' registered for caching
Oct 22 12:09:41 ArchPC kernel: Key type cifs.spnego registered
Oct 22 12:09:41 ArchPC kernel: Key type cifs.idmap registered
Oct 22 12:09:41 ArchPC kernel: 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.
Oct 22 12:09:41 ArchPC kernel: CIFS VFS: protocol revalidation - security settings mismatch
Oct 22 12:09:41 ArchPC kernel: CIFS VFS: session ffff99dc536c5800 has no tcon available for a dfs referral request
Oct 22 12:09:41 ArchPC kernel: CIFS VFS: cifs_mount failed w/return code = -5
Oct 22 12:09:41 ArchPC sudo[1331]: pam_unix(sudo:session): session closed for user root

After reading the journal I tried mounting with vers specified, it worked with all 1.0,2.0,2.1,3.0 but when it's not specified it doesn't work. I guess the defaults are not specified correctly or something, but I don't know how to change them, so I guess I'll just be using vers=3.0 from now on, thanks for your help smile

EDIT: Just found out that when 2.0/3.0 is specified it mounts everything as root, which is not desirable, so any idea what the problem might be?

EDIT 2: the root problem is fixed by specifying a UID, so now I have a way to mount, still seems unnecessarily complicated compared to smb1.0

Last edited by zvon (2017-10-22 11:06:27)

Offline

#6 2017-10-22 18:36:06

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: [Solved] Can't mount samba shares with credentials

1) I don't mount Windows drives
2) SMB 1.0 is not secure so was removed as the default. Windows is supposed to have all installations patched to NOT use it. They traded simplicity for security, and that's not a bad thing.
3) I may be completely mistaken about why the default from 1.0 changed -- but a forum search would show you related threads if you search for it.


Matt

"It is very difficult to educate the educated."

Offline

Board footer

Powered by FluxBB