Samba Setup - Mint 19 Cinnamon

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
User avatar
felemur
Level 5
Level 5
Posts: 537
Joined: Sun Sep 20, 2015 2:22 pm
Location: In the middle of 1000's of acres of corn & soy fields in a house full of cats.

Samba Setup - Mint 19 Cinnamon

Post by felemur »

I have 2 computers, both with new installs of Mint 19 Cinnamon. I want to share folders between them. Both computers are mine alone, so I want to share basically everything.

When I went to the share tab when checking properties, it said I needed install Samba, so I clicked on the link, and followed the instructions to install Samba. Now that Samba is installed, I don't know what to do next. Something about permissions and configuration and folders and users ..... Way above my pay grade.

Can someone point me to a SIMPLE tutorial on what to do to get this working. Thanks.
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.
altair4
Level 20
Level 20
Posts: 11454
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba Setup - Mint 19 Cinnamon

Post by altair4 »

Since both machines are yours and you "want to share basically everything" you might consider ssh. I just did one of these a few hours ago:
altair4 wrote: Wed Jul 11, 2018 4:34 pm Since you seem to be the owner of both machines I would use ssh:

On both machines install ssh:

Code: Select all

sudo apt install ssh
Then on the desktop open a terminal and run:

Code: Select all

nemo ssh://laptop.local
Change "laptop" to the host name of your laptop - and don't forget the ".local" at the end.

Note: I am using nemo because you didn't specify what desktop you are using so I assumed it was Mint 19 Cinnamon. Use caja ( MATE ) or thunar ( XFCE ) if you are using another system/

You will get a Can't verify the identity of ... dialog box. Select Log in Anyway. You will then be asked for the username and password of the laptop.

Do the same on the laptop:

Code: Select all

nemo ssh://desktop.local
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
felemur
Level 5
Level 5
Posts: 537
Joined: Sun Sep 20, 2015 2:22 pm
Location: In the middle of 1000's of acres of corn & soy fields in a house full of cats.

Re: Samba Setup - Mint 19 Cinnamon

Post by felemur »

Thanks for that. I had read up on SSH, and I was under the impression it allows you terminal access of the remote computer. What I wanted was to be able to open the file manager and work with documents on the remote computer with graphical programs on the local computer. Am I wrong with that understanding? From preliminary research, it seemed the Samba route was what I was looking for.
altair4
Level 20
Level 20
Posts: 11454
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba Setup - Mint 19 Cinnamon

Post by altair4 »

I have no problem going through the Samba method. It's basically all I do on this forum.

But while ssh can be used via a terminal what I posted above is accessing another machine though the file manager.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
felemur
Level 5
Level 5
Posts: 537
Joined: Sun Sep 20, 2015 2:22 pm
Location: In the middle of 1000's of acres of corn & soy fields in a house full of cats.

Re: Samba Setup - Mint 19 Cinnamon

Post by felemur »

OK, thanks.

Let me explain what I need it for, and maybe you can judge what is right for me - the problem I have is I'm totally unfamiliar with this except for what I read, and I'm trying to guess the right approach - I'm finding it confusing.

I have a laptop that has a smallish SSD - 128Gb. My desktop has an SSD for Mint & the installed programs, but also a large HDD that I keep my files on that I'm working with. I produce videos with Kdenlive, make webpages with Atom, and do the sound editing with Audacity. The files are too large to keep on the laptop's SSD, and I need to keep accessing files, editing, and saving them. So when I'm using the laptop, I want access of the desktop's drives as if they are local on the laptop, but using the applications installed on the laptop. Then, when I'm back on the desktop, I want to be able to use those same files seamlessly.

My desktop is wired with Ethernet to the router, and the laptop uses that router's wifi.

Both computers are fresh installs of Mint 19 Cinnamon. Ask away if you need any more info.

Thanks again for helping me with this.
altair4
Level 20
Level 20
Posts: 11454
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba Setup - Mint 19 Cinnamon

Post by altair4 »

Tell ya what. I will show you both methods then you can decide for yourself which is best:

Here is an example of ssh:

I installed ssh as I described above in a Mint19 Cinnamon system.
Then I accessed it with this command in a terminal - I use Xubuntu so my file manager is thunar: thunar ssh://vmint19cinn.local
My file manager opens up to the entirety of the Mint19 system:
ssh.png
At that point I can bookmark that location in the file manger so I don't have to use the terminal again.

For Samba:

** Install samba: sudo apt install samba
** Open Nemo
** Right click your Public folder
** Select Sharing options > Share this folder > and select the other two boxes.

Mint19 thanks to Ubuntu will automatically announce it's samba presence to the rest of the network so you will see each other under Network.

One doesn't create a samba share of an entire system.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
felemur
Level 5
Level 5
Posts: 537
Joined: Sun Sep 20, 2015 2:22 pm
Location: In the middle of 1000's of acres of corn & soy fields in a house full of cats.

Re: Samba Setup - Mint 19 Cinnamon

Post by felemur »

Thanks for that. I'll let you know how it goes.
User avatar
felemur
Level 5
Level 5
Posts: 537
Joined: Sun Sep 20, 2015 2:22 pm
Location: In the middle of 1000's of acres of corn & soy fields in a house full of cats.

Re: Samba Setup - Mint 19 Cinnamon

Post by felemur »

altair4 wrote: Wed Jul 11, 2018 6:13 pm .......
For Samba:

** Install samba: sudo apt install samba
** Open Nemo
** Right click your Public folder
** Select Sharing options > Share this folder > and select the other two boxes.

Mint19 thanks to Ubuntu will automatically announce it's samba presence to the rest of the network so you will see each other under Network.
.....
I decided to try the Samba route first. I did exactly as above, then restarted both computers.

On both computers, when I go to Nemo, click "Network", there appears two sub-folders. One is the name of the local computer folder that was shared (Documents in my case) and another is "Network". When I click on the "Network" sub-folder, I get two more sub-folders. One is again the local computer, and the other is "Windows Network". When I click on "Windows Network" I get a pop-up that reads:

Unable to Mount Location
Failed to retrieve share list from server: No such file or directory


I did reading last night to try and figure that out, but there seems to be talk of needing to make some kind of configuration files, but I've read so many different ideas, I had no idea which one to choose.
altair4
Level 20
Level 20
Posts: 11454
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba Setup - Mint 19 Cinnamon

Post by altair4 »

On both computers, when I go to Nemo, click "Network", there appears two sub-folders. One is the name of the local computer folder that was shared (Documents in my case) and another is "Network".
Then there is something wrong with your system(s).

If you installed the samba package on both machines, opened Nemo, clicked on "Network", there should be 2 subfolders: the machine you are running on and the other Mint19 machine in the network. There is no "Network" under "Network".
When I click on the "Network" sub-folder, I get two more sub-folders. One is again the local computer, and the other is "Windows Network".
You don't have to worry bout "Windows Network" or the error message it displays when you select it because you are not using a Windows Network discovery protocol. You are using a Linux discovery protocol.

I suspect something is fundamentally wrong with the machine you are trying to connect to. If you want to pursue this go to that machine and post the output of the following commands:

Code: Select all

testparm -s

Code: Select all

net usershare info --long
Setting up samba - between two Linux machines - at least two Linux machines based off Ubuntu 17.10 and beyond - should have taken you 3 minutes.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
felemur
Level 5
Level 5
Posts: 537
Joined: Sun Sep 20, 2015 2:22 pm
Location: In the middle of 1000's of acres of corn & soy fields in a house full of cats.

Re: Samba Setup - Mint 19 Cinnamon

Post by felemur »

Thanks for doing this.

One thing to note: on the laptop I can see the Netgear Readyshare drive on my router (a USB drive), while on the desktop, that does not show. Not sure if that helps.

On the desktop:

Output for: testparm -s

Code: Select all

david@david-OptiPlex-7010:~$ testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
WARNING: The 'netbios name' is too long (max. 15 chars).

Server role: ROLE_STANDALONE

# Global parameters
[global]
	dns proxy = No
	log file = /var/log/samba/log.%m
	map to guest = Bad User
	max log size = 1000
	obey pam restrictions = Yes
	pam password change = Yes
	panic action = /usr/share/samba/panic-action %d
	passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
	passwd program = /usr/bin/passwd %u
	server role = standalone server
	server string = %h server (Samba, Ubuntu)
	syslog = 0
	unix password sync = Yes
	usershare allow guests = Yes
	idmap config * : backend = tdb


[printers]
	browseable = No
	comment = All Printers
	create mask = 0700
	path = /var/spool/samba
	printable = Yes


[print$]
	comment = Printer Drivers
	path = /var/lib/samba/printers
david@david-OptiPlex-7010:~$ 
And the output from: net usershare info --long

Code: Select all

david@david-OptiPlex-7010:~$ net usershare info --long
[Docs_Dell]
path=/home/david/Documents
comment=
usershare_acl=Everyone:F,
guest_ok=y

david@david-OptiPlex-7010:~$ 
From the laptop:

Output for: testparm -s

Code: Select all

david@david-Satellite-L770D:~$ testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
WARNING: The 'netbios name' is too long (max. 15 chars).

Server role: ROLE_STANDALONE

# Global parameters
[global]
dns proxy = No
log file = /var/log/samba/log.%m
map to guest = Bad User
max log size = 1000
obey pam restrictions = Yes
pam password change = Yes
panic action = /usr/share/samba/panic-action %d
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
passwd program = /usr/bin/passwd %u
server role = standalone server
server string = %h server (Samba, Ubuntu)
syslog = 0
unix password sync = Yes
usershare allow guests = Yes
idmap config * : backend = tdb


[printers]
browseable = No
comment = All Printers
create mask = 0700
path = /var/spool/samba
printable = Yes


[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
david@david-Satellite-L770D:~$ 
And the output from: net usershare info --long

Code: Select all

david@david-Satellite-L770D:~$ net usershare info --long
[Docs_L770D]
path=/home/david/Documents
comment=
usershare_acl=Everyone:F,
guest_ok=y
altair4
Level 20
Level 20
Posts: 11454
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba Setup - Mint 19 Cinnamon

Post by altair4 »

I don't know which machine is which so I'll do both:

From david-OptiPlex-7010 open a terminal and run:

Code: Select all

nemo smb://david-Satellite-L770D.local
Do you see the [Docs_L770D] subfolder?

From david-Satellite-L770D open a terminal and run:

Code: Select all

nemo smb://david-OptiPlex-7010
Do you see the [Docs_Dell] subfolder?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
felemur
Level 5
Level 5
Posts: 537
Joined: Sun Sep 20, 2015 2:22 pm
Location: In the middle of 1000's of acres of corn & soy fields in a house full of cats.

Re: Samba Setup - Mint 19 Cinnamon

Post by felemur »

altair4 wrote: Thu Jul 12, 2018 7:39 am I don't know which machine is which so I'll do both:

From david-OptiPlex-7010 open a terminal and run:

Code: Select all

nemo smb://david-Satellite-L770D.local
Do you see the [Docs_L770D] subfolder?

From david-Satellite-L770D open a terminal and run:

Code: Select all

nemo smb://david-OptiPlex-7010
Do you see the [Docs_Dell] subfolder?
From david-OptiPlex-7010 on Terminal, I get:

Code: Select all

david@david-OptiPlex-7010:~$ nemo smb://david-Satellite-L770D.local
Gtk-Message: 07:41:02.779: GtkDialog mapped without a transient parent. This is discouraged.
and, a pop-up comes up that says:

Could not display "smb://david-Satellite-L770D.local"
Error: failed to retrieve share list from server: Connection refused
Please select another viewer and try again.


also, Nemo opens at the Home folder.

From david-Satellite-L770D, I get no output from Terminal, but exactly the same pop-up and message except with the other computer's name.
altair4
Level 20
Level 20
Posts: 11454
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba Setup - Mint 19 Cinnamon

Post by altair4 »

On both machines:

[1] Disable your firewalls:

Code: Select all

sudo ufw disable
[2] Restart avahi:

Code: Select all

sudo service avahi-daemon restart
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
felemur
Level 5
Level 5
Posts: 537
Joined: Sun Sep 20, 2015 2:22 pm
Location: In the middle of 1000's of acres of corn & soy fields in a house full of cats.

Re: Samba Setup - Mint 19 Cinnamon

Post by felemur »

Did it on both, but no change on what I see in Nemo on both.
altair4
Level 20
Level 20
Posts: 11454
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba Setup - Mint 19 Cinnamon

Post by altair4 »

Can you ping both machines:

From david-OptiPlex-7010 open a terminal and run:

Code: Select all

ping -c3 david-Satellite-L770D.local
From david-Satellite-L770D open a terminal and run:

Code: Select all

ping -c3 david-OptiPlex-7010.local
If you can't then your machines are in different networks.

If you can ping then other than reinstalling Mint or moving on to Ubuntu I don't know what to tell you.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
felemur
Level 5
Level 5
Posts: 537
Joined: Sun Sep 20, 2015 2:22 pm
Location: In the middle of 1000's of acres of corn & soy fields in a house full of cats.

Re: Samba Setup - Mint 19 Cinnamon

Post by felemur »

From Optiplex:

Code: Select all

david@david-OptiPlex-7010:~$ ping -c3 david-Satellite-L770D.local
ping: david-Satellite-L770D.local: Name or service not known
david@david-OptiPlex-7010:~$  
From L770:

Code: Select all

david@david-Satellite-L770D:~$ ping -c3 david-OptiPlex-7010.local
ping: david-OptiPlex-7010.local: Name or service not known
david@david-Satellite-L770D:~$ 
altair4
Level 20
Level 20
Posts: 11454
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba Setup - Mint 19 Cinnamon

Post by altair4 »

Ping each one by their ip address.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
felemur
Level 5
Level 5
Posts: 537
Joined: Sun Sep 20, 2015 2:22 pm
Location: In the middle of 1000's of acres of corn & soy fields in a house full of cats.

Re: Samba Setup - Mint 19 Cinnamon

Post by felemur »

I was looking for the address of each computer, and it shocked me that they were both 192.168.1.2

It took me a moment to figure this out, but I had forgotten I have another router set up as an access point. The access point router is wired to the main router. The optiplex is wired to the main router with address 192.18.1.2, and the L770 laptop is using wifi off the access point with address 192.168.1.2

I'm guessing that is the problem? If yes, I can assign an address to each that is unique, restart everything and let you know.

In the mean time, here is the output of the ping from the optiplex, but I don't know if it means anything, as it might just be pinging itself.

Code: Select all

david@david-OptiPlex-7010:~$ ping 192.168.1.2
PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data.
64 bytes from 192.168.1.2: icmp_seq=1 ttl=63 time=5.10 ms
64 bytes from 192.168.1.2: icmp_seq=2 ttl=63 time=6.55 ms
64 bytes from 192.168.1.2: icmp_seq=3 ttl=63 time=4.56 ms
64 bytes from 192.168.1.2: icmp_seq=4 ttl=63 time=2.41 ms
64 bytes from 192.168.1.2: icmp_seq=5 ttl=63 time=605 ms
64 bytes from 192.168.1.2: icmp_seq=6 ttl=63 time=628 ms
64 bytes from 192.168.1.2: icmp_seq=7 ttl=63 time=3.92 ms
64 bytes from 192.168.1.2: icmp_seq=8 ttl=63 time=6.87 ms
64 bytes from 192.168.1.2: icmp_seq=9 ttl=63 time=2.49 ms
64 bytes from 192.168.1.2: icmp_seq=10 ttl=63 time=2.42 ms
64 bytes from 192.168.1.2: icmp_seq=11 ttl=63 time=2.83 ms
64 bytes from 192.168.1.2: icmp_seq=12 ttl=63 time=661 ms
64 bytes from 192.168.1.2: icmp_seq=13 ttl=63 time=2.46 ms
64 bytes from 192.168.1.2: icmp_seq=14 ttl=63 time=2.37 ms
64 bytes from 192.168.1.2: icmp_seq=15 ttl=63 time=2.83 ms
64 bytes from 192.168.1.2: icmp_seq=16 ttl=63 time=2.54 ms
64 bytes from 192.168.1.2: icmp_seq=17 ttl=63 time=5.28 ms
64 bytes from 192.168.1.2: icmp_seq=18 ttl=63 time=3.25 ms
64 bytes from 192.168.1.2: icmp_seq=19 ttl=63 time=4.26 ms
64 bytes from 192.168.1.2: icmp_seq=20 ttl=63 time=2.67 ms
64 bytes from 192.168.1.2: icmp_seq=21 ttl=63 time=2.36 ms
64 bytes from 192.168.1.2: icmp_seq=22 ttl=63 time=2.46 ms
64 bytes from 192.168.1.2: icmp_seq=23 ttl=63 time=10.6 ms
64 bytes from 192.168.1.2: icmp_seq=24 ttl=63 time=727 ms
64 bytes from 192.168.1.2: icmp_seq=25 ttl=63 time=2.39 ms
64 bytes from 192.168.1.2: icmp_seq=26 ttl=63 time=2.65 ms
64 bytes from 192.168.1.2: icmp_seq=27 ttl=63 time=2.46 ms
64 bytes from 192.168.1.2: icmp_seq=30 ttl=63 time=2.42 ms
64 bytes from 192.168.1.2: icmp_seq=31 ttl=63 time=2.54 ms
64 bytes from 192.168.1.2: icmp_seq=32 ttl=63 time=2.42 ms
altair4
Level 20
Level 20
Posts: 11454
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba Setup - Mint 19 Cinnamon

Post by altair4 »

It took me a moment to figure this out, but I had forgotten I have another router set up as an access point. The access point router is wired to the main router. The optiplex is wired to the main router with address 192.18.1.2, and the L770 laptop is using wifi off the access point with address 192.168.1.2
Yes. That is not going to work. Samba I know but networking not so much.

What I do know is if that other router is acting like an Access Point it should not be giving out ip addresses to anything connected to it itself because DHCP should be disabled on that router.

The machine that is connected to the access point should be receiving it's ip address from the main router not the access point. The access point should be regarded as a wirelsss switch. Switches do not assign ip addresses to things connected to it. The router the switch is connected to assigns ip addresses through DHCP.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
felemur
Level 5
Level 5
Posts: 537
Joined: Sun Sep 20, 2015 2:22 pm
Location: In the middle of 1000's of acres of corn & soy fields in a house full of cats.

Re: Samba Setup - Mint 19 Cinnamon

Post by felemur »

OK, thanks for that information - it helps.

I will see what I can do to figure out how to resolve the address issue with the routers, and try the Samba share again. I'll post back here whether it works or not.

Thanks again for all your help and time in working to resolve this for me. It is much appreciated.
Locked

Return to “Networking”