LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Connecting to my own samba share with the server for debugging (https://www.linuxquestions.org/questions/linux-software-2/connecting-to-my-own-samba-share-with-the-server-for-debugging-4175623457/)

Rotwang2 02-09-2018 07:07 PM

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?

michaelk 02-10-2018 05:36 AM

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

Rotwang2 02-10-2018 07:17 PM

Quote:

Originally Posted by michaelk (Post 5818087)
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

michaelk 02-10-2018 09:45 PM

samba protocol version could be a thing. Try:

max protocol = SMB3

Rotwang2 02-10-2018 10:31 PM

Quote:

Originally Posted by michaelk (Post 5818386)
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.

ferrari 02-10-2018 11:43 PM

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

ferrari 02-11-2018 12:13 AM

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?

Rotwang2 02-11-2018 03:03 AM

Quote:

Originally Posted by ferrari (Post 5818406)
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.

ferrari 02-11-2018 04:19 AM

Are you using hostname or IP address?

Rotwang2 02-11-2018 06:51 PM

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)

ferrari 02-12-2018 02:38 AM

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?

Rotwang2 02-13-2018 03:22 PM

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.)

ferrari 02-13-2018 05:25 PM

What is reported from this command (Windows command prompt)?
Code:

net view \\192.168.1.137
Also, perhaps...
Code:

net users

Rotwang2 02-14-2018 07:34 PM

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

ferrari 02-14-2018 09:26 PM

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.

ferrari 02-14-2018 10:43 PM

Check that network discovery is on for the Windows machine as well and that the profile is appropriate, (the public profile cripples Windows network connectivity)...

https://www.isunshare.com/windows-10...indows-10.html

Rotwang2 02-23-2018 06:44 PM

Quote:

Originally Posted by ferrari (Post 5819987)
Check that network discovery is on for the Windows machine as well and that the profile is appropriate, (the public profile cripples Windows network connectivity)...

https://www.isunshare.com/windows-10...indows-10.html

Ok it's already on.


Also- to ferrari-

Quote:

Check that network discovery is on for the Windows machine as well and that the profile is appropriate, (the public profile cripples Windows network connectivity)...
I checked the Function Discovery Resource Publication and Function Discovery Provider Host, and they were both off so I truned them on.

Still won't connect.

ferrari 02-23-2018 07:03 PM

Ok, and appropriate profile (not public) configured? Other than that I have no further suggestions I'm afraid.

Rotwang2 02-23-2018 07:58 PM

Quote:

Originally Posted by ferrari (Post 5823416)
Ok, and appropriate profile (not public) configured? Other than that I have no further suggestions I'm afraid.

Wait what's "appropriate profile (not public)"?

ferrari 02-23-2018 08:21 PM

Refer to the page I linked to in post #17, or search 'windows 10 network profile' for information on how to configure it.

Rotwang2 02-23-2018 08:30 PM

Quote:

Originally Posted by ferrari (Post 5823445)
Refer to the page I linked to in post #17, or search 'windows 10 network profile' for information on how to configure it.

Oh right, right, yea It's already on.

Well, hell now I just ran Malwarebytes and it quarantined a bunch of stuff but when I rebooted it still didn't work.

Well but hey thanks for sticking with the question for so long. I'll fight it again in the morning,

rw

ferrari 02-24-2018 12:59 AM

Quote:

Oh right, right, yea It's already on.
I don't know what you mean by this reply. Make sure the network connection is not using a public profile.

Rotwang2 02-24-2018 08:34 AM

Oh I see- yes, I've tried with both detection on and off, doesn't work either way.

ferrari 02-25-2018 12:17 AM

No, I'm referring to the network profile (home, work, public) for a given connection.

Rotwang2 02-25-2018 07:36 AM

Quote:

Originally Posted by ferrari (Post 5823878)
No, I'm referring to the network profile (home, work, public) for a given connection.

So then we're not talking about this, the url you gave?:

https://www.isunshare.com/windows-10...indows-10.html

ferrari 02-25-2018 02:02 PM

Yes, that was for network discovery etc, but you can also change the network location (profile) for a given network connection. I'll leave you to check that out further

Rotwang2 02-25-2018 02:20 PM

Quote:

Originally Posted by ferrari (Post 5824127)
Yes, that was for network discovery etc, but you can also change the network location (profile) for a given network connection. I'll leave you to check that out further

Oh I see, ok thanks I'll circle back,

rw

Rotwang2 02-26-2018 10:23 AM

Ok I looked around to find out where to set it to public or private, and I couldn't find it- but- I did find under the file and print sharing it's options said "Private (current profile)" So looks like I'm set to private, right.

Similarly in Network and Sharing Center / Advanced Settings, it also says "Private (current profile)" too.

That's what I want, right?

Tl7 03-14-2019 04:27 AM

Quote:

Originally Posted by vBulletin
Please note that this thread has not been replied to in over 6 months. Please ensure your reply is still relevant and timely.

Ensured. It is still relevant and timely.

Quote:

Originally Posted by Rotwang2 (Post 5817981)
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.

Shouldn't it be still supported for backwards compatibility?


All times are GMT -5. The time now is 01:14 AM.