Home Network.

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
User avatar
gregbzh
Level 1
Level 1
Posts: 22
Joined: Thu Oct 25, 2007 11:59 am
Location: Bretagne, France
Contact:

Home Network.

Post by gregbzh »

Hello all. I'm trying to set up a home network between three Linux Mint machines, & possibly a Windows 10 one. I am completely lost (noob). It seems to be very complicated, unless I'm missing something. I have installed Samba on all computers. Any help would be very much appreciated. Thank you. :)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
dave0808
Level 5
Level 5
Posts: 987
Joined: Sat May 16, 2015 1:02 pm

Re: Home Network.

Post by dave0808 »

The answer is going to depend upon what you want to do with the network. I appreciate that you have mentioned Samba but that doesn't necessarily indicate your intent.

Are you looking to share a common filesystem / NAS? Share a printer? Share the internet connection via one PC? etc
User avatar
gregbzh
Level 1
Level 1
Posts: 22
Joined: Thu Oct 25, 2007 11:59 am
Location: Bretagne, France
Contact:

Re: Home Network.

Post by gregbzh »

Thanks for the reply. I'm really only trying to share document folders & possibly music/audio books & images if I can manage it.
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Home Network.

Post by altair4 »

Take one of your Mint machines:

[1] Install samba

Code: Select all

sudo apt install samba
[2] Make sure avahi is running:

Code: Select all

sudo service avahi-daemon restart
[3] Edit /etc/samba/smb.conf and at the bottom of the file create a "share definition" to your Documents folder:

Code: Select all

[Documents]
path = /home/greg/Documents
read only = no
guest ok = yes
force user = greg
Change "greg" above to your own login user name for that Mint machine.

[3a] Restart samba:

Code: Select all

sudo service smbd restart
[4] Run the following command to find your hostname:

Code: Select all

hostname
[5] On your Win10 machine open Explorer and in the location bar enter: \\hostname.local\Documents

Change "hostname" to the actual hostname you found in step [4] and don;t forget the .local part at the end


[6] On your other Mint machines you can do the same sort of thing by entering in the location bar of your file manager:

smb://hostname.local/Documents
Last edited by altair4 on Mon Jun 06, 2022 7:09 am, edited 1 time in total.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
gregbzh
Level 1
Level 1
Posts: 22
Joined: Thu Oct 25, 2007 11:59 am
Location: Bretagne, France
Contact:

Re: Home Network.

Post by gregbzh »

Merci. I'll give it a try, but I don't understand much of what you've told me to do. Thanks anyway.
ThaCrip
Level 5
Level 5
Posts: 988
Joined: Sat Dec 07, 2019 12:13 pm

Re: Home Network.

Post by ThaCrip »

gregbzh wrote: Sun Jun 05, 2022 11:56 am Merci. I'll give it a try, but I don't understand much of what you've told me to do. Thanks anyway.
That's actually pretty clear on what 'altair4' said to do ;) ; he can't give you exactly what stuff to run since he can't possibly know your exact setup, but the info he did give you, you can reason out exactly what you want to do by what he posted, tweaked to your specific setup of course.

TIP: to edit "/etc/samba/smb.conf" you would do "sudo xed /etc/samba/smb.conf" in terminal as pretty much all of the 'code' stuff he mentioned is run from the 'terminal'.

p.s. on my Samba stuff I did "sudo service smbd restart" to restart my Samba server after I tweaked the 'smb.conf' file. also, I actually learned a little more by reading his post as while what I did was similar, it's a bit different. but I got username/password stuff setup on mine where as I think the way he did it, was a more simplified Samba share that's more easily accessible etc.
Last edited by ThaCrip on Sun Jun 05, 2022 7:59 pm, edited 2 times in total.
MainPC: i5-3550 (undervolted by -0.120v (CPU runs 12c cooler) /w stock i3-2120 hs/fan) | 1050 Ti 4GB | 16GB (2x 8GB) DDR3 1600Mhz RAM | Backups: AMD E-300 CPU (8GB RAM) / Athlon X2 3600+ CPU (@2.3GHz@1.35v) (4GB RAM) | All /w Mint 21.x-Xfce
User avatar
gregbzh
Level 1
Level 1
Posts: 22
Joined: Thu Oct 25, 2007 11:59 am
Location: Bretagne, France
Contact:

Re: Home Network.

Post by gregbzh »

Thank you.
User avatar
axrusar
Level 7
Level 7
Posts: 1512
Joined: Sat Jan 30, 2021 5:30 pm

Re: Home Network.

Post by axrusar »

altair4 wrote: Sun Jun 05, 2022 11:12 am Take one of your Mint machines:

[1] Install samba

Code: Select all

sudo apt install samba
[2] Make sure avahi is running:

Code: Select all

sudo service avahi-daemon restart
[3] Edit /etc/samba/smb.conf and at the bottom of the file create a "share definition" to your Documents folder:

Code: Select all

[Documents]
path = /home/greg/Documents
read only = no
guest ok = yes
force user = greg
Change "greg" above to your own login user name for that Mint machine.

[4] Run the following command to find your hostname:

Code: Select all

hostname
[5] On your Win10 machine open Explorer and in the location bar enter: \\hostname.local\Documents

Change "hostname" to the actual hostname you found in step [4] and don;t forget the .local part at the end


[6] On your other Mint machines you can do the same sort of thing by entering in the location bar of your file manager:

smb://hostname.local/Documents
Hi.
I am interested in figuring out how to setup this, so i can make a quick video tutorial for beginners trying to create a simple home network.
I followed the instructions you posted and so far it does not work.

In my example here, I am setting up a shared folder on a vanilla Mint 20.3 XFCE VM.
After i edited the smb.conf file i restarted the VM just in case..
On the right side, another VM with windows trying to connect to the Mint shared folder does not work.

what is missing here?
Does the insecure SMB v1 protocol needs to be enabled to make it work?

Screenshot, side by side.

Image


The Linux to Linux part is working, i am able to open the shared folder from a Debian VM as shown below:

Image
Linux Mint Una Cinnamon 20.3 Kernel: 5.15.x | Quad Core I7 4.2Ghz | 24GB Ram | 1TB NVMe | Intel Graphics
Image
ThaCrip
Level 5
Level 5
Posts: 988
Joined: Sat Dec 07, 2019 12:13 pm

Re: Home Network.

Post by ThaCrip »

axrusar wrote: Sun Jun 05, 2022 9:51 pm I followed the instructions you[altair4] posted and so far it does not work.
I know that was directed at altair4, but I was playing around with this Samba stuff on QEMU/KVM virtual machine running Win10 21H2 (clean installed) and from that trying to access my main PC's Samba share on Mint v20.3-Xfce, here is my results...

Find your 'hostname' from the Mint machine running Samba (i.e. run 'hostname' from terminal), then from Win10 machine in the 'Type here to search' I typed... "\\HostNameHere\" (without the ") and it should see your share. NOTE: as a alternative you can use the local IP address of the machine running the Samba share, for example... \\192.168.1.100\

I am running Win10 21H2 (just clean installed) in a QEMU/KVM virtual machine and Mint v20.3-Xfce is running on my real machine which has the Samba share setup. I would assume you probably have to be precise on the exact spelling of the 'hostname' stuff otherwise it probably won't work as on mine it's got capital letters and lower case letters etc, but I just made sure to type it in precisely and mine works fine from what I can tell.

if you want to use what I do (although I imagine VirtualBox should work, but I have not used it in quite sometime now), to install QEMU/KVM virtual machine on Mint v20.x series, you run the following command in the terminal...

Code: Select all

sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager
...then after it installs and your back at the prompt. you need to reboot Mint for it to work and then simply find the program 'Virtual Machine Manager' from the Mint menu (you will notice if you try running that before rebooting, it won't work basically). the rest should not be too difficult to figure out as it's a bit different then the more commonly used 'VirtualBox' virtual machine, but close enough.

on a side note I got two shares setup with Samba on my main Mint machine as one has full access (read/write/delete/create folders etc) while the other is read-only access and I got mine setup with a username/password. but I suspect you just want to get the basic stuff working, which I suspect what altair4 said is probably okay.

on a side note to find your local IP right click internet icon on Mint v20.x-Xfce and select 'connection information' and on the screen that loads 'Wired connection 1' is my real machines local IP and 'virbr0' is the IP of the QEMU/KVM machine. since Mint is on my real machine I used the IP from 'Wired connection 1' to access it from the Windows virtual machine. but you can see the virtual machines IP through the QEMU/KVM stuff itself if you want to etc. but basically using the 'hostname' stuff is probably easier.
MainPC: i5-3550 (undervolted by -0.120v (CPU runs 12c cooler) /w stock i3-2120 hs/fan) | 1050 Ti 4GB | 16GB (2x 8GB) DDR3 1600Mhz RAM | Backups: AMD E-300 CPU (8GB RAM) / Athlon X2 3600+ CPU (@2.3GHz@1.35v) (4GB RAM) | All /w Mint 21.x-Xfce
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Home Network.

Post by altair4 »

First, what ThaCrip said.

Second, In review of my original post I did leave out a step. IT's become automatic with me to do this so I left it out. I edited my post to add a step [3a]:

Restart samba:

Code: Select all

sudo service smbd restart
Since you rebooted it would have done that automatically.

Third, I can't reproduce your error message - unless I was in a different network:
Win10-to-Mint.png
Works as advertised on all my Win10 and Win11 machines.

EDIT: Oh, and one last thing:
axrusar wrote: Sun Jun 05, 2022 9:51 pm Does the insecure SMB v1 protocol needs to be enabled to make it work?
Absolutely not. SMB1 is not enabled on any of my Linux or Windows systems.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
axrusar
Level 7
Level 7
Posts: 1512
Joined: Sat Jan 30, 2021 5:30 pm

Re: Home Network.

Post by axrusar »

Ok i am trying to make this work. Let me address your tips and suggestions here..
ThaCrip wrote: Mon Jun 06, 2022 3:29 am
Find your 'hostname' from the Mint machine running Samba (i.e. run 'hostname' from terminal), then from Win10 machine in the 'Type here to search' I typed... "\\HostNameHere\" (without the ") and it should see your share.
This would be unnecessary. the second screenshot i posted shows Debian connecting to the share without problems using the hostname of the server, in my case osboxes.local. Works on Linux to Linux.. but not windows to Linux (here)

ThaCrip wrote: Mon Jun 06, 2022 3:29 am NOTE: as a alternative you can use the local IP address of the machine running the Samba share, for example... \\192.168.1.100\
Ok.. here we start to deviate from a 1-2-3 step procedure to different possible variations that an absolute newbie will get lost already IMO. But lets try.. I know typing an IP instead of a hostname has worked for me within windows only networks, so I am positive this could be the solution:

Windows 11 VM fails to connect to Mint share either by hostname or IP (the Mint server "pongs" :D on 192.168.88.17) :
Image

Windows 10 VM can connect with IP address, but not with hostname:
Image

Windows server 2019 VM. No luck either way
Image

ThaCrip wrote: Mon Jun 06, 2022 3:29 am if you want to use what I do (although I imagine VirtualBox should work, ....
Here is the turn around...
I am running these tests using virtual machines on VirtualBox 6.1
A you can see, all the VMs in the test are connected to the same subnet 192.168.88.x and they are able to ping each other. But for some reason the share does not work.
Now i also do have other bare metal computers here, so i have a windows 10 mini desktop, and another Windows 10 Laptop.
Now the surprise... both of them work fine connecting to the share on Mint, no matter if i use the hostname or the IP address of the server.

Desktop PC on the same network, Windows 10:
Image

Laptop... same thing, no screenshot needed.

So my findings so far..

Virtual machines are unreliable?... Virtualbox sucks for lab testing???
At least now i learned how to setup a simple samba share manually.
I will do more testing in a few of my client's windows networks and a mint share. I actually need to setup an extra backup server this week so i will need to use samba.
Thank you

To the OP..
Although we are discussing and experimenting a lot of nonsense here, the process is actually pretty simple to setup the share. :lol:
Please let us know if you are able to make it work.
Linux Mint Una Cinnamon 20.3 Kernel: 5.15.x | Quad Core I7 4.2Ghz | 24GB Ram | 1TB NVMe | Intel Graphics
Image
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Home Network.

Post by altair4 »

axrusar wrote: Mon Jun 06, 2022 12:50 pm Here is the turn around...
I am running these tests using virtual machines on VirtualBox 6.1
A you can see, all the VMs in the test are connected to the same subnet 192.168.88.x and they are able to ping each other. But for some reason the share does not work.

Now i also do have other bare metal computers here, so i have a windows 10 mini desktop, and another Windows 10 Laptop.
Now the surprise... both of them work fine connecting to the share on Mint, no matter if i use the hostname or the IP address of the server
.....
So my findings so far..

Virtual machines are unreliable?... Virtualbox sucks for lab testing???
For reference:

The screenshot I posted above is a Win10 VirtualBox guest accessing a Mint 20 XFCE VirtualBox guest.

I have real machines that have no issues either but some possible difference between our setups may be:

My VBox host machine is Xubuntu not Mint.

I Installed VBox from Oracle not from the repositories.

All of my guests use Bridged adapter not the default NAT.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
decrepit
Level 5
Level 5
Posts: 858
Joined: Mon Dec 03, 2018 4:07 am
Location: Mandurah Western Australia

Re: Home Network.

Post by decrepit »

Thanks altair.
I've been watching this thread for a while, as I've been trying for ages to connect the office windows 10 machine to a mint box, that I'm using.
finally had a bit of spare time and I followed these instructions, now it's working great, even though I forgot to restart samba!
That surprised me, does this mean samba is constantly monitoring smb.conf, not just when it starts up?

altair4 wrote: Sun Jun 05, 2022 11:12 am Take one of your Mint machines:

[1] Install samba

Code: Select all

sudo apt install samba
[2] Make sure avahi is running:

Code: Select all

sudo service avahi-daemon restart
[3] Edit /etc/samba/smb.conf and at the bottom of the file create a "share definition" to your Documents folder:

Code: Select all

[Documents]
path = /home/greg/Documents
read only = no
guest ok = yes
force user = greg
Change "greg" above to your own login user name for that Mint machine.

[3a] Restart samba:

Code: Select all

sudo service smbd restart
[4] Run the following command to find your hostname:

Code: Select all

hostname
[5] On your Win10 machine open Explorer and in the location bar enter: \\hostname.local\Documents

Change "hostname" to the actual hostname you found in step [4] and don;t forget the .local part at the end


[6] On your other Mint machines you can do the same sort of thing by entering in the location bar of your file manager:

smb://hostname.local/Documents
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Home Network.

Post by altair4 »

Yes, samba will monitor the smb.conf file for changes - every 3 minutes if I remember correctly - and if there are any that modify the default settings it will reload them.

I tend to want a more immediate response so I can confirm what I'm doing works so I do a restart of smbd explicitly.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
decrepit
Level 5
Level 5
Posts: 858
Joined: Mon Dec 03, 2018 4:07 am
Location: Mandurah Western Australia

Re: Home Network.

Post by decrepit »

Must have taken me 3 mins to get from 1 computer to the other I guess.
mikeflan
Level 17
Level 17
Posts: 7143
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: Home Network.

Post by mikeflan »

This procedure worked pretty good for me. All LM machines can see each other.
My wife's windows can see LM, but LM cannot access windows. It gives this well-known error:
Failed to retrieve share list from server: Connection timed out

I will debug that in the future.
decrepit
Level 5
Level 5
Posts: 858
Joined: Mon Dec 03, 2018 4:07 am
Location: Mandurah Western Australia

Re: Home Network.

Post by decrepit »

That's how my situation is, but I don't need to access windows from linux. However it would be good to know how to do it, good luck with your debugging.
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Home Network.

Post by altair4 »

Since Win10/Win11 can speak mDNS accessing those from Linux can be done the same way - but with a different syntax:
smb://win10hostname.local/share-name

Win10-from-Mint.png
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
missmoondog
Level 5
Level 5
Posts: 746
Joined: Wed Nov 07, 2018 9:17 am

Re: Home Network.

Post by missmoondog »

wow! glad i've never tried to set up local network on my linux machines!! way too many hoops to jump through. have a headache just from reading this. good luck to OP and anybody else who reads this topic. :)
mikeflan
Level 17
Level 17
Posts: 7143
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: Home Network.

Post by mikeflan »

wow! glad i've never tried to set up local network on my linux machines!! way too many hoops to jump through.
Agreed.
Since Win10/Win11 can speak mDNS accessing those from Linux can be done the same way - but with a different syntax:
smb://win10hostname.local/share-name
It didn't work for me. It got close, but not working yet.
After I add my password it comes back with this greyed out screen.
So apparently it does not like any of the 3 passwords I have had for that Workgroup network.
winnet2.png
I am on a wired network, so all the hundreds of wireless network password guides on the internet do not help me.
Locked

Return to “Beginner Questions”