[SOLVED] Kubuntu machine can't see Windows PCs on network
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Those Avahi installation instructions will require a little explanation as they're distinctly above my level of knowledge. For example, how far down the instructions should I continue -- do I stop where the "Firewall" section starts, or should I keep going? Maybe more importantly, I don't know what it means in the line for editing the nsswitch.conf file where it says "mymachines" and "myhostname". Are these two actually placeholders for something more specific that I need to put in there?
I appreciate your patience with this novice.
Edit: I tried using the smb:// method and it kept demanding passwords that don't exist, nor did it accept using the no password/guest login option, it just kept asking for authentication information.
Last edited by Rodrigo7; 04-08-2022 at 11:51 PM.
Reason: additional comment
Those Avahi installation instructions will require a little explanation as they're distinctly above my level of knowledge.
Sorry man, I can't help with that. I don't use Avahi and have no desire to learn about it. There is plenty of documentation around though. You might even find something specific to Kubuntu if you look around.
Quote:
Originally Posted by Rodrigo7
Edit: I tried using the smb:// method and it kept demanding passwords that don't exist
Try your username & password for the machine hosting the share.
There may not be a password, but Windows has required a user name for several iterations now.
Typing in only the user name doesn't work (just tried it), it keeps asking for a d*mn password even when the machine doesn't have one. This was not the case before I moved Kubuntu to 20.04, and it isn't on Netrunner 16.16, when I could simply point-and-click to navigate to the shared folders using the file manager (Dolphin), no fuss no muss.
The question about "mymachines" and "myhostname" has to do with editing the nsswitch.conf file, which appears to be part of the nss-mdns package and not Avahi. I suspect that I'm supposed to put something specific in place of "mymachines" and "myhostname," but what would it be?
BTW I discovered that both the Kubuntu laptop and the Kubuntu desktop already had this nss-ndns installed.
Typing in only the user name doesn't work (just tried it), it keeps asking for a d*mn password even when the machine doesn't have one. This was not the case before I moved Kubuntu to 20.04, and it isn't on Netrunner 16.16, when I could simply point-and-click to navigate to the shared folders using the file manager (Dolphin), no fuss no muss.
The question about "mymachines" and "myhostname" has to do with editing the nsswitch.conf file, which appears to be part of the nss-mdns package and not Avahi. I suspect that I'm supposed to put something specific in place of "mymachines" and "myhostname," but what would it be?
BTW I discovered that both the Kubuntu laptop and the Kubuntu desktop already had this nss-ndns installed.
If your Windows shares are configured in line with those instructions, then you should be able to access them in Dolphin using the smb://ip_address/share_name format. If you cannot, then there is a mis-configuration somewhere. You need to make sure that you have done everything described in that article.
Secondly, Avahi is required for service discovery. You stated that you want to "see" file shares, which I guess means that you want to browse the network... so you need something called, "service discovery," and this functionality is provided by Avahi. I can't give you any more help with this because I don't use it and don't know how to configure it.
Noting the following, in particular: "Starting from Windows 10 1709, guest access in SMB2 and SMB3 may be disabled by default. This means that guest access from Windows 10 to a Samba share may not work, for more information, see here."
There have been a couple of big changes in this space over the past few years. What worked in the past for you may no longer work without additional tweaking that has not been necessary until now.
It took a while for me to get back to this (thank you!), but here are my results based on the instructions above.
As a test, I tried to access a Windows 7 desktop and a Windows 10 desktop from a Kubuntu 20.04 LTS machine, using the smb:// method outlined. Prior to that, I double-checked the settings given on the dummies.com page and everything is as specified there, except that I have Password Protected Sharing turned OFF.
Using the smb:// method, when trying to access the Windows 10 system Dolphin yielded an "Authentication Dialog" giving the choice of either giving a username and password, or proceeding with "No password, use anonymous (or guest) login." Because I have Password Protected Sharing turned off, and in any case do not have any passwords for either of these Windows PCs, I selected the "No password" option. Clicking OK led me straight back to the same Authentication Dialog asking me to choose between no password or giving username+password.
On the Windows 7 system, the same procedure using smb:// did not lead to the Authentication Dialog; instead, Dolphin claimed that "The file or folder smb://xxx.xxx.x.xxx/xxxxxxxx does not exist."
Regarding the Samba server part of the above post, the Windows 10 machine is currently seeing the two Kubuntu systems (desktop and laptop) under Network in File Explorer, but the Windows 7 machine is not seeing either one of them. I'll be satisfied (for now) if I can both (1) get the Win10 PC to browse (navigate in File Explorer) to the Kubuntu desktop, and (2) get the Kubuntu desktop to browse (navigate in Dolphin) to the Win10 PC.
I checked the smb.conf file on the Kubuntu laptop against the instructions on the SambaWiki page that you linked to. The log file line was already there, but under a separate section titled, Debugging/Accounting. Does it matter whether this line appears there or under Global? In fact, running testparm yielded several lines reporting (FWIW) that some parameters were in the "service section," whatever that is, and as if this were some kind of warning, even putting an exclamation point at the end. I don't know how rigid the requirements for the smb.conf file's structure might be.
Also FWIW, that same testparm said at the end that "The 'netbios name' is too long (max. 15 chars)." However, there's no netbios name listed anywhere in the smb.conf file, so I don't know how it could be too long or what it's talking about.
Thanks. After entering not only the name of the computer but then also the path to the specific shared folder, I reached the Authentication Dialog on that PC too. Now Dolphin is asking for non-existent passwords on both the Win7 and Win10 machines. What can I do about this?
And of course, am still hoping for an approach that doesn't involve typing of either passwords or "192" numbers...
Last edited by Rodrigo7; 04-16-2022 at 06:28 PM.
Reason: clarification
By default samba uses the host name for the net bios name if there isn't a specific "net bios = " directive in the smb.conf file. If your host name is more then 15 characters that would be the reason for the error message.
A service section is the actual share whether it is a shared directory or printer.
Quote:
[global]
...
[homes]
...
[printers]
...
With the latest Kubuntu updates samba is now at 4.13 something so SMB V1 is now completely disabled. W7 does use WS-Discovery and I can "see" my W7 PC from Dolphin in the network section but not file sharing (SMB). I can "see" my Kubuntu VM from my W7 PC. At the moment I don't have any shares configured on my W10 PC, Kubuntu can not see it but my W7 does. Regardless I can access them via smb://hostname/share.
I tried turning off passwords on my W7 PC and I also could not login anonymously with any other PC. I'm not sure what is happening at the moment.
A bit of searching found something about the guest account interfering with no password but still looking.
Thanks. After entering not only the name of the computer but then also the path to the specific shared folder, I reached the Authentication Dialog on that PC too. Now Dolphin is asking for non-existent passwords on both the Win7 and Win10 machines. What can I do about this?
I don't think you followed the instructions in post #34.
You also need to accept the fact that passwordless/guest logins have been shunned by both Microsoft and SAMBA... BUT they CAN be made to work provided that you follow the instructions in the links I previously posted.
I use fileshares daily... Windows, SAMBA, NFS locally and remotely via VPNs... From within Windows, Linux and Android. But never without passwords. Like I've said before, on all of those platforms you only need to enter the password the first time you access a share. And to prevent the need to remember IP addresses, I use shortcuts on my desktops... Because "remote office documents" is easier to remember than "smb://192.168.12.147/documents".
I don't think you followed the instructions in post #34.
Which instructions specifically might I have not followed? I had double- and triple-checked everything to make sure everything was done according to them. Maybe I missed something nonetheless, who knows.
I am really out at sea with this stuff. In case it helps, here's the output from testparm -s to verify the Samba configuration as discussed here:
Code:
xxxxxxxxxxxxxxx:~$ testparm -s
Load smb config files from /etc/samba/smb.conf
Global parameter log file found in service section!
Global parameter max log size found in service section!
Global parameter logging found in service section!
Global parameter panic action found in service section!
Global parameter server role found in service section!
Global parameter passdb backend found in service section!
Global parameter obey pam restrictions found in service section!
Global parameter unix password sync found in service section!
Global parameter passwd program found in service section!
Global parameter passwd chat found in service section!
Global parameter pam password change found in service section!
Global parameter map to guest found in service section!
Global parameter usershare allow guests found in service section!
Loaded services file OK.
Weak crypto is allowed
Server role: ROLE_STANDALONE
# Global parameters
[global]
dns proxy = No
map to guest = Bad User
server string = %h server (Samba, Ubuntu)
idmap config * : backend = tdb
[guest]
guest ok = Yes
guest only = Yes
path = /srv/samba/guest/
read only = No
[printers]
browseable = No
comment = All Printers
create mask = 0700
path = /var/spool/samba
printable = Yes
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
Last edited by Rodrigo7; 04-17-2022 at 12:16 AM.
Reason: obscuring computer name
A bit of searching found something about the guest account interfering with no password but still looking.
Thanks, let me know if anything turns up.
BTW I eventually found how to change the netbios name and that particular error stopped showing up in testparm. As for the rest of that file, I haven't a clue how to interpret it!
This is the name of the share that is seen by other computers on the network. From the file browser smb://netbios_name/guest or smb://IP_address/guest
Quote:
map to guest = Bad User
The default bad user is nobody which is a special system user that does not have any real "rights". In order for nobody to be able to have read/write permissions you need to set the global permissions for the path for read/write.
Quote:
path = /srv/samba/guest/
This is the actual physical directory on your system that will be accessible by other computers. It can be almost anywhere within the filesystem but must have permissions for read/write by anyone.
This is the actual physical directory on your system that will be accessible by other computers. It can be almost anywhere within the filesystem but must have permissions for read/write by anyone.
OK, so I changed the path to the shared folder on the Kubuntu laptop so that it would be the Public subdirectory in Home. I also changed the permissions (using the GUI method, not the CLI method FWIW) so that everyone could both read and modify files in this Public subdirectory. In addition, in the Shared tab (reached by clicking Permissions --> Shared) I gave everyone "Full Control" of the subdirectory and also checked off the "Allow Guests" box. (However, this box is displayed as unchecked every time I go back to that tab; other changes do seem to stick.)
Now I can browse to the Public subdirectory on the Kubuntu laptop from my Windows 10 desktop. Thing is, when I do that, I am asked to enter "network credentials" -- a user name and a password. So what credentials do I enter here? How do I figure out what to type into these fields?
(Even if this is solved, I'll still need to find a way to point-and-click my way in the other direction, FROM a Kubuntu machine TO a Windows computer.)
All right, I just tried the above and restarted smbd and nmbd.
The Windows 7 PC is still not seeing the Kubuntu laptop at all. And the Windows 10 PC is still asking for a username and password. Don't know what to enter there.
And of course Dolphin on the Kubuntu laptop still doesn't find a workgroup.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.