Connecting to my own samba share with the server for debugging
Linux - SoftwareThis 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
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.
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):
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?
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
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?
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).
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.