Cannot Access LAN [Solved]

Questions about cabled networking
Forum rules
Before you post please read how to get help
rlsj
Level 1
Level 1
Posts: 16
Joined: Thu Mar 16, 2017 4:23 pm

Cannot Access LAN [Solved]

Postby rlsj » Wed Jul 26, 2017 12:14 pm

Just first installed Mint 18.2 Cinnamon, according to inxi (thanks for the "How to Get Help" article!) on a 64-bit PC, connected via Ethernet and DHCP

My problem is that whereas the Mint machine can access the Internet readily, it can see no other machine on my LAN. I have three PCs running Windows 10, 7 and XP plus two networked printers, Canon and HP. Nemo/Network shows a "Windows Network" icon. Double-clicking that produces "0 items" on the bottom line.

Yet the Mint machine can ping 192.168.1.2, the static IP of my main Windows-10 PC. The Windows private network display does not see this Mint machine, yet it can ping the Mint machine at the DHCP-supplied IP of 192.168.1.85.

No WorkGroup is defined for the Windows machines. They are all configured to allow complete hard-drive access via LAN without restriction and without login and passwords. I have verified that "Sharing" and "Security" for all is set to "Everyone" with all access permitted. The Windows Firewall is turned off on all Windows machines.

This Mint machine is dual-booted, with Windows 8.1 as its alternate ego. The Windows 8.1 incarnation transfers files freely with other machines on the LAN. In other words, my problem is not hardware.

What I need is for the Mint machine to participate in the same free exchange.

I appreciate your attention.
Last edited by rlsj on Sun Jul 30, 2017 11:23 pm, edited 2 times in total.

rlsj
Level 1
Level 1
Posts: 16
Joined: Thu Mar 16, 2017 4:23 pm

Re: Cannot Access LAN

Postby rlsj » Thu Jul 27, 2017 1:24 pm

I see from a reply to the thread, "Access LAN whilst on VPN," the instruction, "Make sure 'block local network' is unchecked."

Where is this potent button to be found that I may uncheck it?

greerd
Level 5
Level 5
Posts: 712
Joined: Sat Jul 31, 2010 10:58 am
Location: Nova Scotia, Canada

Re: Cannot Access LAN

Postby greerd » Thu Jul 27, 2017 2:51 pm

You don't mention that you are using a vpn so I doubt the block local network is the issue. Sounds like you need samba. I don't use it and can't help you other than suggesting a forum search on the subject.

Cheers
Image

rene
Level 6
Level 6
Posts: 1338
Joined: Sun Mar 27, 2016 6:58 pm

Re: Cannot Access LAN

Postby rene » Thu Jul 27, 2017 3:20 pm

Ping is not relevant here; it's an IP-network tool, and you are here enquiring after Windows-specific NETBIOS/SMB-network support; after Samba indeed. I am myself still on Mint 17.3 and unless I'm mistaken it came with everything needed to access a Windows network at that file-manager level that you are attempting out of the box; you might as such be better of waiting for a reply from a Mint 18 user... but having said that, try a sudo apt-get install libnss-winbind. This would certainly in Mint 17 through its dependencies pull in enough to have things work from the file-manager (and from the command-line after additionally editing /etc/nsswitch.conf to add "wins" to the "hosts" line, just before "dns").

I believe to have indeed noticed reports here on the forum of samba not being installed by default on 18.x and as such, the above may be all you need. If not, wait around a bit for an 18.x user to reply.

hrmcrm
Level 4
Level 4
Posts: 203
Joined: Sun Jul 03, 2016 5:59 pm
Location: San Francisco

Re: Cannot Access LAN

Postby hrmcrm » Thu Jul 27, 2017 3:23 pm

You do need samba. Mint 18.2 is missing samba things that were included in 17.3. A good starting point is the tutorial at viewtopic.php?f=42&t=224391. Do [2] in the first post.

You will probably want easy file sharing as mentioned at https://askubuntu.com/questions/318361/ ... untu-12-04

You have to create a samba user: sudo /usr/bin/smbpasswd -a user_id

Then see viewtopic.php?f=42&t=88146&start=0
Howard
ThinkPads 310ED, 600E, T23, X41, X60, T61, X201, E550

rlsj
Level 1
Level 1
Posts: 16
Joined: Thu Mar 16, 2017 4:23 pm

Re: Cannot Access LAN

Postby rlsj » Thu Jul 27, 2017 5:06 pm

Okay. I installed samba and it appeared to run but with no improvement in network access. So I read the manuals. Early in "man samba" it recommends studying "smb.conf." But "man smb.conf" contains 9,124 lines of dense verbiage and no examples!

Given that all I want is to transfer files on my LAN freely, without passwords or cross-logins, it seems reasonable that others must need something similar. So I went Googling for simple examples and found,

[global]
name resolve order = bcast host lmhosts wins
workgroup =
server string = Samba Server
#security = share
guest account = nobody
log file = /var/log/samba.%m

[Guest Share]
comment = Guest access share
path = /home/robert
browseable = yes
read only = no
guest ok = yes

Added the "name resolve ..." line and hashed the "security" line from reading hrmcrm's post. Blanked "workgroup" because my Windows machines use none (so far as I know). I changed the "path" line to allow access to all my home files and restarted the Mint machine. "sudo service smbd status" and "...nmbd status" report both programs running.

Unfortunately ... "nemo/Network/Windows Network" still reports "0 items."

Sigh.

hrmcrm says further that "You have to create a samba user: sudo /usr/bin/smbpasswd -a user_id." What should be used for "user_id?" Surely the Windows machines won't have to mention it when accessing files on the Mint machine!

hrmcrm
Level 4
Level 4
Posts: 203
Joined: Sun Jul 03, 2016 5:59 pm
Location: San Francisco

Re: Cannot Access LAN

Postby hrmcrm » Thu Jul 27, 2017 5:38 pm

rlsj wrote:Given that all I want is to transfer files on my LAN freely, without passwords or cross-logins, it seems reasonable that others must need something similar.
hrmcrm says further that "You have to create a samba user: sudo /usr/bin/smbpasswd -a user_id." What should be used for "user_id?" Surely the Windows machines won't have to mention it when accessing files on the Mint machine!
Use your regular Mint user name for "user_id". When it asks for a password, you can use anything, but I always use the same as for my Mint user account.
Then restart samba as mentioned in item 3 of the Samba Browsing Problems Checklist

The first time a Windows machine accesses a Linux one, you have to give the Linux username and password. I think some versions of Windows can remember the login credentials so you do not have to give them every time. Not sure just how that works.
Howard
ThinkPads 310ED, 600E, T23, X41, X60, T61, X201, E550

rene
Level 6
Level 6
Posts: 1338
Joined: Sun Mar 27, 2016 6:58 pm

Re: Cannot Access LAN

Postby rene » Thu Jul 27, 2017 6:06 pm

Everything Just Worked in a Mint 18.x VM install that I keep around which I thought might be the results of earlier experimentations, so I just now reinstalled 18.2 Cinnamon 64-bit new into a VM... and everything Just Works out of the box. Selecting Network in the file manager opens a folder that lists (all my devices and) a folder "Windows Network", which in turn opens a folder WORKGROUP, in turn a folder with all my Windows devices. Even including an old machine running Windows for Workgroups 3.11, by the way. Can also transfer to and fro without issue.

I believe that both I and hrmcrm might as such be leading you up the garden path. Since I don't have any actual Windows installations other than that 3.11 antique around to test with (my other "Windows devices" are NAS devices and media players and the like) I'll furthermore butt out, but might the issue not simply be you not having defined a workgroup as you mentioned? You also mentioned the involved Windows machines not running a firewall; I trust the Mint one also doesn't?

At the very least I can now assure you that you not only needn't be editing smb.conf, but in fact needn't install anything manually on 18.2 to have things work when all is normal.

altair4
Level 18
Level 18
Posts: 8771
Joined: Tue Feb 03, 2009 10:27 am

Re: Cannot Access LAN

Postby altair4 » Fri Jul 28, 2017 7:46 am

rene wrote:At the very least I can now assure you that you not only needn't be editing smb.conf, but in fact needn't install anything manually on 18.2 to have things work when all is normal.

Now you done gone and made the OP feel like an idiot.

Mint 18 in all it's sub-versions does not install the samba server packages by default. Period. The client samba packages are installed for the most part so there is a reasonable expectation that it should be able to browse and access someone else’s shares. Not as fast or as predictably as Ubuntu but close enough I guess.

Look, I can't reproduce the errors the OP has posted but I can tell you what will not work and that is the posted smb.conf.

workgroup = had a surprising affect on things none of them good. I actaully didn't know that until I tried it since I've never seen anyone do that before. You may not think you have a workgroup defined in Windows but you do. Maybe you're thinking of a Windows HomeGroup which definitely will not work in Linux. What I would do is comment out the line instead of defining it as blank. That will reset the workgroup to the default of WORKGROUP.

This share definition will not work - at least not by an anonymous client.
[Guest Share]
comment = Guest access share
path = /home/robert
browseable = yes
read only = no
guest ok = yes

Of course there is the appropriateness of creating a guest accessible and writeable share of one's home directory but Mint users seem to follow the path less travelled and there is nothing you can do about it.

Based on your global section there is no way for an anonymous windows user to become a guest since you are missing a line in the [global] section:

Code: Select all

map to guest = Bad User

Without that line samba defaults to map to guest = Never which pretty much does what it looks like it would do.

The other problem is that this guest user ( nobody - which is also the default so there was no need to add it to smb.conf ) has no write access to your home directory. This means you will have to change Linux permissions allowing him write access and that in turn will generate some error messages the next time you log into your system.

So in total I would agree with the majority of what rene has posted. Don't do the workgroup = thing and leave the default smb.conf in place except for share definitions and surgical modifications like name resolve order. It may not seem like it but someone at Ubuntu gave the default smb.conf some though and replacing it with something found on the web is not something I would suggest.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

rlsj
Level 1
Level 1
Posts: 16
Joined: Thu Mar 16, 2017 4:23 pm

Re: Cannot Access LAN

Postby rlsj » Fri Jul 28, 2017 9:55 am

I installed altair4's recommended changes to smb.conf. Restarting Mint gives the same results: "nemo/Network/Windows Network" with "0 items" after double-clicking "Windows Network."

(I may not have mentioned it before, but the Mint machine is also not visible to the Windows machines on the LAN.)

My smb.conf is now:

Code: Select all

[global]
name resolve order = bcast host lmhosts wins
map to guest = Bad User
#workgroup =
server string = Samba Server
#security = share
guest account = nobody
log file = /var/log/samba.%m

[Guest Share]
        comment = Guest access share
        path = /home/robert
        browseable = yes
        read only = no
        guest ok = yes


I don't care if the Windows machines can only read the Mint home directories. What I want is an ability for the Mint machine to read and write the directories of the Windows machines. I have not followed hrmcrm's advice to create a Samba password. Having to use passwords on my LAN is a full show stopper. If I must do that, I shall -- reluctantly -- revert to Windows.

In rene's last post he described his file manager's Network as showing all his networked devices, plus "Windows Network" showing subsidiary items. Nemo/Network on this machine shows the single item, "Windows Network." Double-clicking that produces a blank window and the bottom line, "0 items," even though two PCs with Windows OS and a Canon printer are running -- and visible on the Windows machines.

I recall Samba on a Slackware machine of ten years ago. It was a nightmare to set up. rene seems to suggest that I don't need it. Otherwise how can Mint 18 get away with not including it? I'd think many modern installations use LANs.

To answer another question, yes, the Windows firewall on this machine's Windows 8.1 alternate ego is also disabled. Of course when it is running, the Mint OS is not.

altair4
Level 18
Level 18
Posts: 8771
Joined: Tue Feb 03, 2009 10:27 am

Re: Cannot Access LAN

Postby altair4 » Fri Jul 28, 2017 12:10 pm

"nemo/Network/Windows Network" with "0 items" after double-clicking "Windows Network."

Seriously, the only way I can reproduce that error is to disable SMB1 on all machines.

What I want is an ability for the Mint machine to read and write the directories of the Windows machines. I have not followed hrmcrm's advice to create a Samba password. Having to use passwords on my LAN is a full show stopper. If I must do that, I shall -- reluctantly -- revert to Windows.

Then this just got a lot simpler. Revert to Windows.

Since Samba version 4.3.8 the Linux samba client cannot access a "passwordless" Windows share without passing credentials. Pass a Windows username/password. In a curious twist you can even use your own Mint username/password or your Mint username / samba password. Like hrmcrm posted you only need to do this once and have the system save the credentials "forever". If there is some philosophical / religious / sexual objections to doing this then Windows is your best bet.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

rlsj
Level 1
Level 1
Posts: 16
Joined: Thu Mar 16, 2017 4:23 pm

Re: Cannot Access LAN

Postby rlsj » Fri Jul 28, 2017 5:07 pm

altair4 posted,

"... the only way I can reproduce that error is to disable SMB1 on all machines."

What is SMB1? Maybe that's my problem: SMB1 is disabled! How do I enable it?

He also wrote: "... this just got a lot simpler. Revert to Windows."

Is that the solution to Mint user problems, revert to Windows? It may be simple but defeats the purpose.

And: "If there is some philosophical / religious / sexual objections to [using network passwords] then Windows is your best bet."

My objection is simple convenience and perhaps a stubborn resistance to doing the flagrantly unnecessary. Security on a wired private LAN requires nothing more than a pullable plug.

I have tried other Linux distros in the past on this same LAN and exchanged files without ever invoking Samba, as rene implies. The application disparity between Linux and Windows keeps drawing me away from Linux, but with Windows-10 Microsoft's arrogance has become insufferable. I was meaning to check on that point with Mint, it having been recommended as the most nearly compatible current base.

This is a reciprocal failure which ought to suggest a remedy. Aside from ping, the Windows machines cannot see the Mint machine either. Something fundamental is blinding both at the TCP level on the LAN.

It's about time someone wrote a program that only uses the TCP system calls supported on all OSes to display directory contents and transfer files between them. Of course to write it would be a severe inconvenience.

rene
Level 6
Level 6
Posts: 1338
Joined: Sun Mar 27, 2016 6:58 pm

Re: Cannot Access LAN

Postby rene » Fri Jul 28, 2017 5:30 pm

rlsj wrote:I recall Samba on a Slackware machine of ten years ago. It was a nightmare to set up. rene seems to suggest that I don't need it.

Note, don't need to set it up. Certainly you do need part of Samba also for client access; it's just that that part (specifically, samba-common, samba-common-bin and samba-libs) is installed by default on 18.2 and doesn't need any further configuration. There's two parts to your question:

1) The Mint machine being able to see and transfer to/from your Windows machines.
2) The Windows machines being able to see and transfer to/from your Mint machine.

Your original query as well as my replies up to now concerned 1; both you yourself later and the other responders have mixed in 2. Personally I'd in fact advise to for now not do that: seeing as how 1A ("see") should Just Work out of the box, it not doing so means there's a fundamental problem in your network setup that is not being made explicit. There's talk of a VPN in the original post: I rather hope none is in fact involved?

I remembered having an old netbook running Windows 7 Starter available to test with and am in fact running into some issues on Mint 18.2 that I do not on Mint 17.3 but you not even seeing your Windows machines means we're still some ways before the point where the difference matters.

To answer another question, yes, the Windows firewall on this machine's Windows 8.1 alternate ego is also disabled. Of course when it is running, the Mint OS is not.


That's a bit strangely answered. I was of course not asking after a Windows 8.1 firewall on "an alternate ego" (a dual boot I presume?) but after a Mint 18 firewall. Not enabled by default indeed and its presumed that you'd have noticed if you had enabled it manually, but, well, if we're not talking about a VPN here then a firewall messing things up sounds about right wrt. the symptom.

[EDIT] Let me add by the way that Windows networking is not as canonical as what I believe you believe it to be. Other than an old and retired Netgear media player, itself running Linux and Samba but not making NFS available, I have a lot of networked machines and devices operating without any use for Samba. NFS is the canonical UNIX protocol and certainly when combined with Zeroconf (an Apple protocol) a full replacement for Windows networking protocols. This in fact is likely part of the reason why Samba setup is not always as transparent as one might care for: more fully-UNIX users have no use for it in the first place.
Last edited by rene on Fri Jul 28, 2017 6:15 pm, edited 1 time in total.

altair4
Level 18
Level 18
Posts: 8771
Joined: Tue Feb 03, 2009 10:27 am

Re: Cannot Access LAN

Postby altair4 » Fri Jul 28, 2017 6:06 pm

In random order:
I have tried other Linux distros in the past on this same LAN and exchanged files without ever invoking Samba, as rene implies.

rene can speak for himself but I did not read his post as implying he did not use samba. He implied that it worked out of the box without modifying smb.conf or installing anything else to have samba work.
What is SMB1? Maybe that's my problem: SMB1 is disabled! How do I enable it?

SMBx are what Microsoft calls dialects of the SMB ( what we call Samba ) protocol - SMB1, SMB2, SMB3. On your WinXP and Win7 box you would know if SMB1 is disabled because you would have been the one to disable it unless you are not in control of these boxes. Same with Samba - you would have to add something to smb.conf to disable it. Win10 is planning on disabling SMB1 ( as is Samba itself ) but they haven't done it yet: Samba Without SMB1

Just out of morbid curiosity:

On Win10 open Run and enter:
\\linux-host-name.local

Change linux-host-name to .. well .. the host name of your linux box - and don;t forget the .local at the end.

Win10 can resolve host names to ip addresses using mDNS by default which is the ".local" part and running that command invokes an SMB query of the shares on your box and opens explorer to display it like this:
Win10-mDNS.png

Those are some of the samba shares on my Xubuntu box.

You can do the same in reverse but you will need to add a firewall rule in Win10 for it.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

rlsj
Level 1
Level 1
Posts: 16
Joined: Thu Mar 16, 2017 4:23 pm

Re: Cannot Access LAN

Postby rlsj » Fri Jul 28, 2017 10:54 pm

altair4 posted: "On Win10 open Run and enter: \\linux-host-name.local"

Issuing "hostname" on the Mint machine produced "BigWriter." So on the Windows-10 machine I hit Win-R and keyed "\\BigWriter.local" (less the quotes). The result was interesting.

As the man said, Windows opened an explorer window showing a "BigWriter" icon. When I double-clicked it, the contents of my Mint directory, /home/robert, were displayed. Double-clicking .txt files in that directory even invoked Notepad on Windows. All a first! Also selecting "Network" in the vanilla (separately invoked) Windows Explorer now for the first time shows BigWriter as well as the other machines on the LAN. And the Mint directory, /home/robert, is also accessible there.

However ... at the Mint machine, double-clicking "nemo/Network/Windows Network" results in a blank window and a bottom line of "0 items" -- as usual.

I salute you, sir. This is half the solution. Unfortunately it is not the preferred half.

rene
Level 6
Level 6
Posts: 1338
Joined: Sun Mar 27, 2016 6:58 pm

Re: Cannot Access LAN

Postby rene » Fri Jul 28, 2017 11:28 pm

<scratches head>

Okay, so maybe that fundamental problem regards your network setup isn't in fact all that fundamental. Frankly at a loss as to suggestions to get the other half working; it so annoyingly Just Works for me...

hrmcrm
Level 4
Level 4
Posts: 203
Joined: Sun Jul 03, 2016 5:59 pm
Location: San Francisco

Re: Cannot Access LAN

Postby hrmcrm » Fri Jul 28, 2017 11:31 pm

rlsj wrote:Having to use passwords on my LAN is a full show stopper.
That seems to me a very odd specification, but maybe it is possible. I tested on a Mint 18.2 Cinnamon 64-bit system.
It appears that there must be a samba user, but the samba user need not have a password. You need to dosudo /usr/bin/smbpasswd -a user_idwhere user_id is a name already existing in Mint. It's easiest to use your own username. When the terminal asks for a new password, just hit Enter, same for the confirmation.

In my test with Nemo, this passwordless user could see the Win10 and Mint machines on the network. The Win10 machine is passwordless, and trying to access it brought up a login window, but clicking Connect eventually got through. I think it took more than one window click and a bit of time, but it got there.

My Mint 18.2 KDE machine could see the passwordless Cinnamon machine, but could not authenticate and connect, using either no password or the regular user password.
Howard
ThinkPads 310ED, 600E, T23, X41, X60, T61, X201, E550

altair4
Level 18
Level 18
Posts: 8771
Joined: Tue Feb 03, 2009 10:27 am

Re: Cannot Access LAN

Postby altair4 » Sat Jul 29, 2017 7:45 am

However ... at the Mint machine, double-clicking "nemo/Network/Windows Network" results in a blank window and a bottom line of "0 items" -- as usual.

Don't do it that way. Do the equivalent in Mint of what you did on Win10:

Select Run: Ctrl-F2

Then enter this command - do it by ip address first:

Code: Select all

nemo smb://windows-ip-address

If that works unmount the share in nemo and try it by host name:

Code: Select all

nemo smb://windows-host-name

If it's true that you disabled the firewall on Win10 you can try it with it's mDNS host name:

Code: Select all

nemo smb://windows-host-name.local

If the Win10 firewall or parts of it are still operational you will need to add a firewall rule in Win10 for the .local to work from Linux. This HowTo explains how to do that: : Samba and Windows 10

Observations:

[1] You will get prompted for a user name and password if you are successful at connecting to Win10. There is no getting around it. You described that as a "show stopper" so you have to decide if using Linux has any other inherent advantages to just using Windows instead.

[2] This double-clicking "nemo/Network/Windows Network" results in a blank window and a bottom line of "0 items problem to me represents something fundamentally wrong with your installation. Something beyond samba perhaps. At worst you should have received an error message like Could not display "network:///". Nemo cannot handle "network"locations if you were missing a component. At best but still broken you should have seen the Win10 box but when you clicked on it you would get a Failed to retrieve share list from server

Instead you get nothing and that I cannot explain.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

rlsj
Level 1
Level 1
Posts: 16
Joined: Thu Mar 16, 2017 4:23 pm

Re: Cannot Access LAN

Postby rlsj » Sun Jul 30, 2017 11:55 am

Okay. Two great suggestions!

By hrmcrm:
Issue "sudo /usr/bin/smbpasswd -a user_id"

Mint couldn't find "/usr/bin/smbpasswd" so tried
"sudo smbpasswd -a robert" without a password. That seemed to work, at least no complaint. However "nemo/Network/Windows Network" still produced "0 items."


By altair4:
Issue "nemo smb://windows-ip-address"

Issued "nemo smb://192.168.1.2"
Nemo opened a window showing the following icons:
ADMIN$ C C$ D D$ Users
Hey, progress!

D is the main (multi-terabyte) data hard drive on the Windows 10 machine. Double-clicking that produces the dialog box,
"Password required for share d on 192.168.1.2 / Connect as * Anonymous * Registered User" with Anonymous selected

Here the first few things I tried, including selecting "Registered User" with a blank password, always produced "Password required for share d on 192.168.1.2." Eventually, however, I tried "Registered User" with the typed password, "none."

Eureka! Now the Windows-10 d-directory contents are displayed. Furthermore double-clicking a .txt file brings up the xed editor on the Mint machine. I even get an icon on the Mint desktop labelled, "d on 192.168.1.2." Substituting the Windows machine name for the fixed IP address on the invocation line also works. It seems my problems are solved.


One curiosity: Clicking the "Network" icon on the desktop gives the same old "Windows Network", which in turn produces a blank window again with the bottom line, "0 items."

Guess I can put "nemo smb://<name>" in .profile to avoid having to invoke a terminal on every startup.

Thank you very much. I'll see how it works for a day or two before putting "Solved" in the Subject.

altair4
Level 18
Level 18
Posts: 8771
Joined: Tue Feb 03, 2009 10:27 am

Re: Cannot Access LAN

Postby altair4 » Sun Jul 30, 2017 1:05 pm

Eureka! Now the Windows-10 d-directory contents are displayed. Furthermore double-clicking a .txt file brings up the xed editor on the Mint machine. I even get an icon on the Mint desktop labelled, "d on 192.168.1.2." Substituting the Windows machine name for the fixed IP address on the invocation line also works. It seems my problems are solved.

Bookmark it !

When you issue nemo smb://<name> and nemo opens up to display your shares immediately go to to Nemo > Bookmarks > Add Bookmark. It will now show up on the left side panel of Nemo sorta kinda like a "mapped drive" does in Windows. You can even right click > rename it.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.


Return to “Ethernet”