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 01-19-2018, 08:31 PM   #1
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Rep: Reputation: Disabled
Win 10 can't connect to samba. (Big surprise.)


Fedora 27 Workstation, fresh install.

Installed samba just fine. Configured it just fine:

[bog@localhost ~]$ testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: inc3reasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[printers]"
Processing section "[print$]"
Processing section "[winshare]"
Processing section "[share]"
Loaded services file OK.
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
printcap name = cups
idmap config * : backend = tdb
cups options = raw


[homes]
browseable = No
comment = Home Directories
inherit acls = Yes
read only = No
valid users = %S %D%w%S


[printers]
browseable = No
comment = All Printers
create mask = 0600
path = /var/tmp
printable = Yes


[print$]
comment = Printer Drivers
create mask = 0664
directory mask = 0775
force group = @printadmin
path = /var/lib/samba/drivers
write list = @printadmin root


[winshare]
comment = Win share
guest ok = Yes
path = /home/bog/winshare
read only = No
valid users = bog


[share]
comment = share
guest ok = Yes
path = /share
read only = No
valid users = bog





[bog@localhost ~]$ sudo service smb status
Redirecting to /bin/systemctl status smb.service
● smb.service - Samba SMB Daemon
Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2018-01-19 08:06:06 EST; 5min ago
Main PID: 736 (smbd)
Status: "smbd: ready to serve connections..."
Tasks: 4 (limit: 4915)
CGroup: /system.slice/smb.service
├─736 /usr/sbin/smbd --foreground --no-process-group
├─866 /usr/sbin/smbd --foreground --no-process-group
├─867 /usr/sbin/smbd --foreground --no-process-group
└─874 /usr/sbin/smbd --foreground --no-process-group

Jan 19 08:05:55 localhost.localdomain systemd[1]: Starting Samba SMB Daemon...
Jan 19 08:06:06 localhost.localdomain systemd[1]: Started Samba SMB Daemon.
Jan 19 08:06:06 localhost.localdomain smbd[736]: [2018/01/19 08:06:06.442240, 0] ../lib/util/become_daemon.c:124(daemon_read
Jan 19 08:06:06 localhost.localdomain smbd[736]: STATUS=daemon 'smbd' finished starting up and ready to serve connections


Windows 10 throws "The folder you entered appears to be invalid. Please choose another."


And I know I'm connecting to the right LAN ip address because I'm doing this all over SSH from the same windows machine connecting over ssh.

All anti-virus is off, including windows packaged firewall. (Hell I wouldn't be able to SSH if it was still up.)

What am I doing wrong?? It used to work fine.

Last edited by Rotwang2; 01-19-2018 at 09:44 PM.
 
Old 01-20-2018, 10:13 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,797

Rep: Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952
You should change the Fedora hostname. By default samba uses the hostname as netbios name which in your case is localhost (i.e bog@localhost) which can cause problems. You can also add a netbios name directive in the smb.conf file too i.e netbios name = MYSERVER.

Make sure the Fedora firewall if running allows samba traffic. I believe by default it only allows ssh traffic.

Another way to check if your server is visible from Win 10 is using the cmd box net view command.

net view

Did you add a samba password?

Last edited by michaelk; 01-20-2018 at 10:25 AM.
 
1 members found this post helpful.
Old 01-20-2018, 10:52 AM   #3
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Hi Rotwang2,

Adding to michaelk's excellent advice, I suggest you verify that both your Win10 system and Fedora samba setup are using compatible versions of the smb protocol. Recent changes on the Microsoft side have caused some previously working setups to fail, simply because of this.

If you are unsure what I am referring to - please say so and we can provide a more detailed explanation.

Cheers !
 
1 members found this post helpful.
Old 01-28-2018, 11:07 PM   #4
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Rickkkk View Post
Hi Rotwang2,

Adding to michaelk's excellent advice, I suggest you verify that both your Win10 system and Fedora samba setup are using compatible versions of the smb protocol. Recent changes on the Microsoft side have caused some previously working setups to fail, simply because of this.

If you are unsure what I am referring to - please say so and we can provide a more detailed explanation.

Cheers !
Here's an update:

As for the two of them using compatible versions- remember, it was working fine until like 24 hours later when I restarted. And I have windows updates turned off. So presumably the smb protocols are the same.

I killed the firewall like this:

[bog@localhost ~]$ sudo systemctl stop firewalld
[sudo] password for bog:
[bog@localhost ~]$

Still doesn't work.

As for a samba password? No I never set one. Neither now, nor before when it was working. (And if I had, wouldn't windows prompt for a password?)

net view:

C:\WINDOWS\system32>net view
There are no entries in the list.

C:\WINDOWS\system32>



Quote:
You should change the Fedora hostname. By default samba uses the hostname as netbios name which in your case is localhost (i.e bog@localhost) which can cause problems. You can also add a netbios name directive in the smb.conf file too i.e netbios name = MYSERVER
Ok I've never changed any of that back when it was working either.

If I do change it to MYSERVER (which I would suggest is a bad idea because it violates occam's razor- we'd be actually *adding* complexity to something that used to work before), would that change how I try to connect from windows?

Before, and what used to work was:

\\192.168.1.137\winshare

rw

Last edited by Rotwang2; 01-28-2018 at 11:13 PM.
 
Old 01-29-2018, 05:05 AM   #5
dave@burn-it.co.uk
Member
 
Registered: Sep 2011
Distribution: Puppy
Posts: 601

Rep: Reputation: 172Reputation: 172
I thought one of the changes in Win10 was that you have to supply a password.
 
Old 01-29-2018, 12:15 PM   #6
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,702
Blog Entries: 4

Rep: Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947
Look at the Event Viewer (system logs) on the Windows side.

Don't "slap at" the problem, making arbitrary changes in hopes that something will work.
 
Old 01-29-2018, 01:47 PM   #7
dave@burn-it.co.uk
Member
 
Registered: Sep 2011
Distribution: Puppy
Posts: 601

Rep: Reputation: 172Reputation: 172
Grab the Nirsoft Event Viewer to format the Windows 10 log. It is not as easy to read as the older versions were but the Nirsoft utilities help (they are stand alone and don't need installing)
 
Old 01-29-2018, 04:31 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,797

Rep: Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952
I forgot about selinux... If running you need to enable home directories. Read the smb.conf for additional selinux help.

setsebool -P samba_enable_home_dirs on
 
Old 01-29-2018, 04:35 PM   #9
Rotwang2
Member
 
Registered: Aug 2014
Distribution: Ubuntu, Centos, Fedora
Posts: 210

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dave@burn-it.co.uk View Post
Grab the Nirsoft Event Viewer to format the Windows 10 log. It is not as easy to read as the older versions were but the Nirsoft utilities help (they are stand alone and don't need installing)
Oh very cool- well right now I'm in the normal Event Viewer and I don't know.... what to click on. I poked around but there's a lot to choose from and every choice looks the same. I don't want to slap at the problem. Does anyone know where share connection attempts would show up? (I don't know windows internal stuff at all, I'm good with linux for 20 years but windows I'm clueless.)

I googled for "windows samba log", but windows doesn't even know it's connecting to a samba share, right? I did find this for windows 8:

https://support.microsoft.com/en-us/...windows-server

But that's for win8, and even if it applied to win10- well, I have to emphasize that it worked fine until I restarted the linux server, so, once again, that's violating/complication to occam's razor. This all used to work fine...

Hey- one thing that might be helpful in terms of password:

If I try mapping a drive (as opposed to "Add a network location"), it will prompt for creds. I tried giving it both the password for my win10 user and the password for the linux account (username is the same, "bog"). No go in both cases.

Also I just tried setting smbpasswd, and the old password was the same as the new one I typed. I tried again, still no go.

Do you think SElinux perms might be the problem? (I had done this before but maybe it didn't "stick"? So I tried doing it all over again and nothing's changed):

http://danwalsh.livejournal.com/14195.html

But wouldn't that show up in the logs? (I mean the samba logs).

(Btw I *hate* this whole SElinux stuff. Some sneaky secondary permissions control that I can't see with ls -al. God it's ridiculous. )

Anyway so that's where I'm at right now,

rw

Last edited by Rotwang2; 01-29-2018 at 04:40 PM.
 
Old 01-29-2018, 05:08 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,797

Rep: Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952
I'm running Fedora 26 and have no problems connecting with Windows 10. I might need to install Fedora 27 just to see if there is a difference. selinux if running will prevent samba from connecting to the home directory and anything below like your winshare if they are not configured.

Can you connect to the share from the fedora PC itself? Either with the file browser or smbclient?

A quick search has not found much information about your error. "The folder you entered appears to be invalid. Please choose another."

Update:
I installed Fedora 27 workstation in a VM and could connect to a home share once I ran the setsebool command and added a samba password.

Last edited by michaelk; 01-30-2018 at 12:54 PM.
 
  


Reply



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
Waiting for the big surprise EYo Slackware 60 01-30-2015 08:21 AM
connect to WIN pc by IP via SAMBA ? m.alshafay Linux - Newbie 2 09-24-2008 02:42 PM
linux works windows won't (not a big surprise) jsweatte Linux - General 21 08-25-2001 06:31 PM

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

All times are GMT -5. The time now is 08:45 PM.

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