Page 1 of 1

Setting up a network

Posted: Thu Jan 17, 2019 9:52 am
by GELvdH
I am a newbee to linux (.0001 linux knowlegeable) so tolerate me please. I have been trying to find information on setting up a home network with three computers using linuxmint. I have two desktops and a laptop, the desktops are connected via ethernet with the laptop via WiFi, All CPU's are dual boot Windows 10 Pro / LinuxMint 19.1. Everything I have seen on the Forums is way too advanced for a beginner so I need something that tells me in excruciatingly miniscule steps how to set up a network with linuxmint. This is where windows has an advantage with its build in setup but I am trying to get away from windows. Is there any literature available for a newbee like me? :D :D

Gunter

Re: Setting up a network

Posted: Thu Jan 17, 2019 11:09 am
by altair4
*** Discovery and connection between Linux Mint 19 boxes is automatic. All you need to do is:
Install samba:

Code: Select all

sudo apt install samba
And create a share of a folder - how you do that depends on what desktop environment you are using and you didn't specify that in your post.

*** Discovery and connect to Win10 is another matter entirely and depends more on how WIn10 is set up than Linux.

Mint 19 and Samba File Sharing Changes: https: viewtopic.php?f=42&t=270442

Win10, Linux, mDNS, and Samba File Sharing: viewtopic.php?f=42&t=199907

If those where the HowTos you mentioned in your original post as being too complicated I don't know how I can help you further.

Re: Setting up a network

Posted: Thu Jan 17, 2019 8:09 pm
by GELvdH
I am running Mint Cinnamon 4.0.9 tesa. I hope that helps. I loaded Samba on all my machines. what comes next?

Re: Setting up a network

Posted: Fri Jan 18, 2019 8:03 am
by altair4
**** Create a share of something simple at first like your Public folder.

The process is much like creating a share in Windows: Open nemo ( your file manager ) > Right click your Public folder > Select Sharing Options > Share this folder & select all the boxes.

One more step to resolve future problems is to make an adjustment to smb.conf. So edit the file:

Code: Select all

sudo -H xed /etc/samba/smb.conf
And right below the workgroup = WORKGROUP line add this one:

Code: Select all

force user = altair
Change altair to your Mint login user name.

Save the file then restart the samba service:

Code: Select all

sudo service smbd restart
The other Mint machine - while running Mint - should see this machine and it's share instantly.

**** That was the easy part unfortunately. Win10 represents a conundrum for Linux because of what it does to SMB.

On the client side of Win10 - this is from Microsoft:
Windows 10 Home and Windows 10 Professional still contain the SMBv1 client by default after a clean installation. If the SMBv1 client is not used for 15 days in total (excluding the computer being turned off), it automatically uninstalls itself.
SMBv1 and browsing for netbios hosts in Explorer are linked. You can't have one without the other. Other Windows machines no longer use netbios but they can see each other fine using another mechanism.

You can re-activate SMBv1 is you want but browsing for shares and accessing share are two different things. Win10 with SMBv1 disabled can still access your Mint machine but it has to done explicitly in Explorer:

By name: \\mint-host-name
By ip address \\mint-ip-address
By mDNS name: \\mint-host-name.local

On the server side of WIn10 - from Microsoft:
Windows 10 Home and Windows 10 Professional no longer contain the SMBv1 server by default after a clean installation.
In order to force the Linux samba client to be able to access a server that has disabled SMBv1 it disabled it's ability to browse for netbios hosts just like Explorer in Windows did. But just like in Windows you can still access it's shares but have to do it explicitly in nemo:

By name: smb://win10-host-name
By ip address: smb://win10-ip-address
By mDNS name: smb://win10-host-name.local

Note: In order to access a Win10 box by its mDNS name you need to make a change to Win10 which is detailed here: viewtopic.php?f=42&t=199907#p1038682

One other note: Mint19's inability to browse for Windows machines can be "fixed (?)" by addinging another parameter to smb.conf: client max protocol = NT1 ( samba calls SMBv1 NT1 just to confuse people ) but then you have a problem. You will be able to see the Win10 host but won't be able to connect to it or any other server that has disabled SMBv1.

Re: Setting up a network

Posted: Fri Jan 18, 2019 9:25 am
by GELvdH
I am getting the following error message. "Unable to mount Location. Failed to retrieve share list from server: Invalid argument."

Re: Setting up a network

Posted: Fri Jan 18, 2019 9:38 am
by altair4
When you do what?

Re: Setting up a network

Posted: Fri Jan 18, 2019 7:10 pm
by GELvdH
After I installed everything (I thunk), when I try to connect to one of the other machines I get that error message.

Re: Setting up a network

Posted: Fri Jan 18, 2019 7:21 pm
by altair4
Let's start with the easiest process because it should be working by default without any adjustments on your part - an all Linux network. We can get Win10 to play along later.

Make sure all the machines or at lest 2 of them are running Linux not Windows.
Make sure samba is installed on both.
You don't need to create any shares yet - we can do that later.

On one machine run this command and post the output:

Code: Select all

avahi-browse -at | grep Network | grep IPv4
All of your Linux machines should be listed. This is fundamental to how a modern Linux home network functions.

Note: regrettably, I have to shut down for the day but I will be back tomorrow.

Re: Setting up a network

Posted: Fri Jan 18, 2019 8:47 pm
by GELvdH
I also have to partake of some Zzzz's. Talk to you tomorrow.

Re: Setting up a network

Posted: Sat Jan 19, 2019 5:42 am
by RIH
Thank you altair4.

I was (mildly) looking for an easy way to connect my upstairs Mint laptop with my downstairs Mint desktop & save me running up & down stairs with a USB drive :D

The only previous method that I had seen involved setting static IP addresses & was way past my levels of comprehension. :D

Your 3 terminal commands worked a treat, thanks again!!

Re: Setting up a network

Posted: Sat Jan 19, 2019 7:06 am
by GELvdH
Well here is another day on which to excell, ha ha. I have my laptop and my desktops 1and 2 up and running mint, here is the response I got from my desktop with the linux script you provided.
+ enp1s0 IPv4 GUNTER-DESKTOP-1 Microsoft Windows Network local
+ lo IPv4 GUNTER-DESKTOP-1 Microsoft Windows Network local

Re: Setting up a network

Posted: Sat Jan 19, 2019 7:54 am
by altair4
There's the problem. You can only see yourself.

Just as a reminder make sure the Mint laptop has samba installed:

Code: Select all

sudo apt install samba
And try the avahi-browse -at | grep Network | grep IPv4 command again from the desktop.

If you still cannot see your laptop it's an avahi problem and there are only a few things that can stop avahi:

[1] Avahi on either the desktop or the laptop is not running.

To check that run this command to start it on both machines:

Code: Select all

sudo service avahi-daemon restart
Then do the avahi-browse -at | grep Network | grep IPv4 command again.

[2] Avahi works even if you enabled the firewall but just to make sure stop it - run this on both machines:

Code: Select all

sudo ufw disable
Then do the avahi-browse -at | grep Network | grep IPv4 command again.

[3] Host browsing using any method depends on all the machines belonging to the same subnet.

This happens naturally when everyone is connected - wired or wirelessly - to the same router. If you have a complicated network setup with multiple routers, misconfigured switches, etc... that could be a problem. Another way to determine if you are both in the same subnet is to do a ping:

Find the ip address of the laptop by running this command on the laptop:

Code: Select all

hostname -I
Then on the desktop ping the laptop using this command:

Code: Select all

ping -c3 192.168.0.100
Changing 192.168.0.100 to the real ip address of the laptop.

[4] This one is kind of obscure but it could be an issue with your ISP.

Run this command from your desktop:

Code: Select all

host -t SOA local
The correct response should be: Host local not found:

If it comes back with an actual ip address you have a problem.

Re: Setting up a network

Posted: Sat Jan 19, 2019 9:00 am
by GELvdH
I hate to do this to you but we are going to Florida for a couple weeks and my wife is telling me we have to load the car so I have to quit right now. I appologize but the boss rules sometimes. See you in a couple of weeks, thanks again for your help.

Gunter

Re: Setting up a network

Posted: Sat Jan 19, 2019 9:47 am
by I2k4
Best wishes for the vacation. Dual booting Win7 and Mint, and not having looked at Samba in nearly a decade I wondered if networking across OSs had gotten simpler meantime. For you to judge. The one major present-day complication is Android mobile, in my case a phone and a tablet (elbowing out a netbook for travel) - I want everything ready to hand at home and on the road on all these.

Question one, which I don't get past, is what do I need LAN connection for that I can't do with online sync services like Dropbox, OneDrive, Google Drive or Mega? Of course, there are serious enterprise or home media management reasons some would want / need a LAN's network speeds and storage capacity.

My simple alternative solution is to put active current documents on a free Dropbox account - DB has a good Linux local client and everything is automatically updated between all devices on that. Bulk backups like large encrypted document containers, photos, video and music are on larger cloud services - recently Mega - which can be accessed via browser on any of Linux, Android, and/or Windows for download or direct online access, anyplace. For my purposes, I don't even bother with the old Windows 7 home network set up long ago, essentially dormant. I would have to find a reason other than too much spare time to try to set up a Samba network for current purposes.

Re: Setting up a network

Posted: Sat Jan 19, 2019 1:09 pm
by GELvdH
:D :D

Re: Setting up a network

Posted: Sat Jan 19, 2019 1:21 pm
by loyabogadie30
https://www.computerbeginnersguides.com ... x-mint-19/
maybe this source can help you as it was to me