LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-09-2018, 07:07 PM   #1
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Rep: Reputation: Disabled
Connecting to my own samba share with the server for debugging


I'm still having a hell of a time trying to get windows 10 to connect to my Fedora 27 samba share.

So I'm googling around for how to connect the server to itself? I want to see if the problem is with windows or with the share.

So I have smbclient installed, but apparently smbmount is deprecated (and not even in the package), and now I'm supposed to use mount.cifs.

But I can't find any good examples for how to that with mount.cifs. It will ask me for root password to try to login, and I can't figure out how to get it to ask for user instead. (And mount.cifs refuses to run in user mode, only in root.)

I found this from a thread askubuntu (I know it's ubuntu and I'm running fedora, but I figure it'd be similar right):

mount.cifs //{ip address}/{dir} /mnt/remote --verbose -o "port=8888,username=foo,password=bar,sec=ntlm"

https://askubuntu.com/questions/2329...stall-smbmount

And I guess for the ip I should use 127.0.0.1 right?


In general I've spent more than 20 hours over the past 10 days trying to get windows to talk to the samba share. It's a black box, you can't tell *why* it's not connecting, just that it refuses.

I've got the firewall entry in there, and I've entirely disabled firewalls and anti-virus on the windows side.

So anyway I figure I'd at least see if it can connect to itself, right. Occam's razor etc.

If anyone has like a checklist of what could possibly be wrong- it's a fresh Fedora 27 install, all I did so far was instal ssh with dnf and then samba. I'm that's *all* I've done.

Everyone else has told me it "just runs fine" for them, and I've been all over the web looking for what to do and so far nothing works- I don't even know what to try anymore. Like I said it's a "black box".

There should be like a debugging "checklist" for samba or something.

Anyway I guess the next thing to do is see if it can connect to itself so I know that the problem is on the windows side or not. Can you give an example for how to do that with mount.cifs?
 
Old 02-10-2018, 05:36 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,761

Rep: Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931
Using smbclient:

smbclient //localhost/share_name -U username%password

smbclient when logged in uses the same commands as ftp.

From the file browser:
The server may or may not be browseable from browse network. My Fedora VM isn't powered up currently so don't have the exact steps but you should be able to select from the menu go location or connect to server. From the go location you can try using
smb://localhost The public shares should be visible.

Using connect to server, select windows share and enter localhost and the specific share to connect with username/password.

To mount the share

mount -t cifs //localhost/share_name /mnt/point -o username=username,password=password
 
1 members found this post helpful.
Old 02-10-2018, 07:17 PM   #3
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
Using smbclient:

smbclient //localhost/share_name -U username%password

smbclient when logged in uses the same commands as ftp.

From the file browser:
The server may or may not be browseable from browse network. My Fedora VM isn't powered up currently so don't have the exact steps but you should be able to select from the menu go location or connect to server. From the go location you can try using
smb://localhost The public shares should be visible.

Using connect to server, select windows share and enter localhost and the specific share to connect with username/password.

To mount the share

mount -t cifs //localhost/share_name /mnt/point -o username=username,password=password
Damn, I can totally connect fine. I didn't try mounting it, but, it has all the files in there when I enter ftp commands (dir). So then the problem is on the windows side, right?

I was thinking it still could be on the linux side if there's some firewall problem. So, I have another clean fedora 27 install box, identical configs, and so I tried connecting from it to the other (orignal) server as well. It connected fine. (again I didn't try mounting it- does that matter?)

So now we're 100% sure it's windows, right.

Well, or maybe a disagreement about which samba protocol to use or something like that? Is that a thing?

rw
 
Old 02-10-2018, 09:45 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,761

Rep: Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931
samba protocol version could be a thing. Try:

max protocol = SMB3
 
Old 02-10-2018, 10:31 PM   #5
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
samba protocol version could be a thing. Try:

max protocol = SMB3
Ok, you mean in smb.conf, right. So I tried:

[global]
workgroup = WORKGROUP
#security = user

passdb backend = tdbsam

printing = cups
printcap name = cups
load printers = yes
cups options = raw
max protocol = SMB3

And then restarted the smb service. Still just hangs trying to connect.
 
Old 02-10-2018, 11:43 PM   #6
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,834

Rep: Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148
Just in case this is relevant to your Windows 10 machine...

Control Panel -> Credential Manager -> Windows Credentials

https://answers.microsoft.com/en-us/...2396469&auth=1
 
Old 02-11-2018, 12:13 AM   #7
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,834

Rep: Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148
Quote:
I'm still having a hell of a time trying to get windows 10 to connect to my Fedora 27 samba share.
What errors are reported when attempting to connect from the Windows 10 machine?
 
Old 02-11-2018, 03:03 AM   #8
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ferrari View Post
What errors are reported when attempting to connect from the Windows 10 machine?
I get:

"The folder you entered does not appear to be valid."

Also, I tried the credentials thing and it didn't change anything. It was worth a shot, thanks.
 
Old 02-11-2018, 04:19 AM   #9
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,834

Rep: Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148
Are you using hostname or IP address?
 
Old 02-11-2018, 06:51 PM   #10
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
Great question- there is no hostname. It's just an ip address on the router/LAN.

(Which how I've always done it in the past, like 15 years)
 
Old 02-12-2018, 02:38 AM   #11
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,834

Rep: Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148
Just to clarify a little further, can you explain the exact steps you were using to access the network share? It's hard because we are not over your shoulder to observe directly. Was it via windows explorer like this? (eg assuming host at 192.168.1.5)
Code:
\\192.168.1.5
The reason I ask is that the error message you posted reads very much like Windows 10 not being able to access WebDAV folder, (or something like that).

Similar discussion here...
https://forums.guru3d.com/threads/ca...ows-10.401368/

For creating a map to a network drive...
https://www.laptopmag.com/articles/m...ive-windows-10
Does this work for you?
 
Old 02-13-2018, 03:22 PM   #12
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
Sure, I'm doing it like this:

\\192.168.1.137\winshare

(where "winshare" is the samba share name in the smb.conf)

(Of course in smbclient I'm not using backslashes.)
 
Old 02-13-2018, 05:25 PM   #13
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,834

Rep: Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148
What is reported from this command (Windows command prompt)?
Code:
net view \\192.168.1.137
Also, perhaps...
Code:
net users

Last edited by ferrari; 02-13-2018 at 05:26 PM.
 
Old 02-14-2018, 07:34 PM   #14
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
C:\WINDOWS\system32>net view \\192.168.1.137
System error 53 has occurred.

The network path was not found.

(and btw, I'm logged into that same ip via SSH (from the windows machine), and to the other server too (140))

C:\WINDOWS\system32>net users

User accounts for \\OVO

-------------------------------------------------------------------------------
Administrator bog DefaultAccount
Guest
The command completed successfully.


Oh and by the way, I can ping 192.168.1.137 and it responds.


m
 
Old 02-14-2018, 09:26 PM   #15
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,834

Rep: Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148
See if this thread helps...

https://social.technet.microsoft.com...0-after-update

For example...
Quote:
Thanks. It WORKS for me. Just start ‘Function Discovery Resource Publication’ service, shut down the computer then restart and ......bam! all the NAS and shared folder and computer where back again.
 
  


Reply

Tags
mount.cifs, samba



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting to Samba share from Windows DJOtaku Linux - Networking 9 09-27-2008 11:10 PM
Connecting to a Samba Share Via Linux metallica1973 Linux - Networking 3 08-29-2008 06:15 PM
Connecting to Printer on Samba Share jony125 Linux - General 3 01-27-2006 11:20 AM
Samba connecting to windows share gfem Linux - Software 4 12-09-2005 12:16 PM
Connecting to XP share from Fedora (Samba) thegreatnorth Linux - Software 1 12-12-2003 04:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration