How to set up SAMBA sharing with 19.2 Xfce? [SOLVED]

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.
coyote2
Level 3
Level 3
Posts: 138
Joined: Sat Jan 25, 2020 3:51 pm

Re: How to set up SAMBA sharing with 19.2 Xfce?

Post by coyote2 »

altair4 wrote: Fri Sep 25, 2020 5:12 pm
However, Thunar is still giving me the previously-pictured "Failed to open" error.
What previously-pictured "Failed to open" error? Is it in this post?
Image

(Sorry, it was in my post immediately prior to that one.)

Thank you very very much for your continuing attention to this Altair4! Using SAMBA to connect to other devices is one of the very most crucial things I wish to be able to do with my PC; and very most pleasurable, given that the A500 is where I consume much of my media.
altair4
Level 20
Level 20
Posts: 11444
Joined: Tue Feb 03, 2009 10:27 am

Re: How to set up SAMBA sharing with 19.2 Xfce?

Post by altair4 »

I still don't see it.

If you had a missing package you would get a "Failed to Open ... " error:
FailedTRoOpen.png
FailedTRoOpen.png (9.09 KiB) Viewed 1363 times
If that is what you mean install the missing package:

Code: Select all

sudo apt install gvfs-backends
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
coyote2
Level 3
Level 3
Posts: 138
Joined: Sat Jan 25, 2020 3:51 pm

Re: How to set up SAMBA sharing with 19.2 Xfce?

Post by coyote2 »

altair4 wrote: Sat Sep 26, 2020 7:23 am I still don't see it.
Hmm, maybe instead of formatting it as an image I should just paste the imgur URL now:

https://i.imgur.com/8dJOBbB.png

There, I did. But in case that somehow didn't work, I'll type the message since it's 'subtitle' differs from yours:

"
Failed to open "PCH-A500".
Failed to retrieve share list from server. Connection refused.
"

Should I still go ahead with that command to install "gvfs-backends", please?

Thanks once again, in advance!
altair4
Level 20
Level 20
Posts: 11444
Joined: Tue Feb 03, 2009 10:27 am

Re: How to set up SAMBA sharing with 19.2 Xfce?

Post by altair4 »

Failed to retrieve share list from server. Connection refused.
If the A500 were an Ubuntu server I can easily reproduce that error simply by disabling samba ( smbd ) on the server. I suspect the same error would occur if the firewall was enabled on the server and either didn't allow samba or didn't allow a samba connection from my client.

Not much you can do on the client ( Mint ) end of this if this is the case. I would check the A500 forums/
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 20
Level 20
Posts: 11444
Joined: Tue Feb 03, 2009 10:27 am

Re: How to set up SAMBA sharing with 19.2 Xfce?

Post by altair4 »

Only because I don't have a real life I've been thinking about this ........ there is another possibility.

I assumed that the A500 was running a samba server since it's free to use and it may be using it but it's not set up in the traditional way. It's set up for Windows-specific clients which would make sense I suppose.

Windows does something a Linux samba client does not. It automatically passes the Windows user's local login name when it addresses a server. Linux thinks that's goofy.

See if this works:

Open a terminal and run either one of the following:

Code: Select all

thunar smb://user-name@PCH-A500
Replace user-name with the user name the A500 is expecting.

Or:

Code: Select all

thunar smb://user-name@192.168.0.100
Replace 192.168.0.100 with the ip address of the A500.

You should get a dialog box requiring you to enter the password for the device.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
coyote2
Level 3
Level 3
Posts: 138
Joined: Sat Jan 25, 2020 3:51 pm

Re: How to set up SAMBA sharing with 19.2 Xfce?

Post by coyote2 »

I am closer now (thank you very much SAMBA wizard!) in that I got a login prompt with both of those commands (which passed it the A500's SAMBA username [right-- not either of my Mint usernames?]). Here I will paste a screenshot (both as text and formatted as image) of that login prompt:
Image
http://i.imgur.com/lgF6HYT.png

But no matter how many times I try it, the login window just refreshes to give me more opportunities to enter the password.

In the login window, "Domain" is autofilled with "HOME" (which I have tripped-checked is the both the A500's "Samba Workgroup" and in smb.conf).

Code: Select all

   workgroup = HOME
   netbios name = Dual
I've only tried enabling "Forget Password Immediately" (instead of until logout, or forever).

I've not only used the A500's Samba password many times, I've also changed it back to it's default value and tried that many times.

I admit I'm excited to have a login window!
altair4
Level 20
Level 20
Posts: 11444
Joined: Tue Feb 03, 2009 10:27 am

Re: How to set up SAMBA sharing with 19.2 Xfce?

Post by altair4 »

Open a terminal and run this command:

Code: Select all

smbclient -L 192.168.1.3 -U user-name
It should yield a list of shares on that server .... or output an error. Post back either.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
coyote2
Level 3
Level 3
Posts: 138
Joined: Sat Jan 25, 2020 3:51 pm

Re: How to set up SAMBA sharing with 19.2 Xfce?

Post by coyote2 »

altair4 wrote: Sun Sep 27, 2020 4:57 pm Open a terminal and run this command:

Code: Select all

smbclient -L 192.168.1.3 -U user-name
It should yield a list of shares on that server .... or output an error. Post back either.
OMG, the error it output looks to contain useful clues!

Code: Select all

bill@Dual:~$ smbclient -L 192.168.1.3 -U user-name
WARNING: The "syslog" option is deprecated
Server does not support EXTENDED_SECURITY  but 'client use spnego = yes' and 'client ntlmv2 auth = yes' is set
session setup failed: NT_STATUS_ACCESS_DENIED
bill@Dual:~$ 
altair4
Level 20
Level 20
Posts: 11444
Joined: Tue Feb 03, 2009 10:27 am

Re: How to set up SAMBA sharing with 19.2 Xfce?

Post by altair4 »

That's a blast from the past. How on earth does a Win10 machine ever connect to this thing.

Give this a shot: Turn off protocol negotiation.

Edit /etc/samba/smb.conf and under the workgroup = HOME or whatever you set it as add this one:

Code: Select all

client use spnego = no

Then try to connect again: smb://user-name@192.168.1.3

I'm not sure we can leave it that way if you have any other Windows machines in your network but ..........
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
coyote2
Level 3
Level 3
Posts: 138
Joined: Sat Jan 25, 2020 3:51 pm

Re: How to set up SAMBA sharing with 19.2 Xfce?

Post by coyote2 »

Success! A billion thanks, altair4!

I will be adding a Win10 machine, at which time I will prioritize Mint connecting to /it/ over connecting to my A500 thing. Should it come to that I'll try removing that new smb.conf line.

I don't remember enough about the relevant Star Trek episodes, but may all things be perfect on Altair 4.
coyote2
Level 3
Level 3
Posts: 138
Joined: Sat Jan 25, 2020 3:51 pm

Re: How to set up SAMBA sharing with 19.2 Xfce? [SOLVED]

Post by coyote2 »

One more question: is there a way to avoid needing to issue the command

Code: Select all

thunar smb://nmt@PCH-A500
everytime I want to access the A500?
coyote2
Level 3
Level 3
Posts: 138
Joined: Sat Jan 25, 2020 3:51 pm

Re: How to set up SAMBA sharing with 19.2 Xfce? [SOLVED]

Post by coyote2 »

Oops, I just thoughtlessly installed an offered update to Mint SAMBA.

Oh, I figure if I apply again all the fixes that altair4 taught me again all might be well again.

But the thing is that the install asked me if I wanted to keep my customized smb.conf and I said yes. Now I realize I may have wanted the new version (which I could have easily re-customized (with altair4's suggested changes.)

Is there some way to, and do I want to, get the install's update to smb.conf now that I declined it, please?
altair4
Level 20
Level 20
Posts: 11444
Joined: Tue Feb 03, 2009 10:27 am

Re: How to set up SAMBA sharing with 19.2 Xfce? [SOLVED]

Post by altair4 »

But the thing is that the install asked me if I wanted to keep my customized smb.conf and I said yes. Now I realize I may have wanted the new version (which I could have easily re-customized (with altair4's suggested changes.)
Rarely - I would go so far as to say never - does a samba update include any changes to smb.conf. If you were to update major version numbers it would be a different story but that is not how Linux distributions work. Samba updates usually involve changes to the internal plumbing. So if you opted to keep the current smb.conf you should be good to go.

Fun fact: smb.conf despite it's name is not the samba configuration file. It's a "diff" file containing additions and overrides to the default settings which you do not have direct access to.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
coyote2
Level 3
Level 3
Posts: 138
Joined: Sat Jan 25, 2020 3:51 pm

Re: How to set up SAMBA sharing with 19.2 Xfce? [SOLVED]

Post by coyote2 »

Sweet, it great news that smb.conf was unlikely to have included changes (and interesting that to learn the relevant term that it's a "diff" file).

Thanks yet again altair4 for your superb help.

I love that my blunder was unlikely enough to have had a negative impact that I am thrilled to feel it's best I just do nothing.

If only life more more often made "nothing" the wisest thing to do!
coyote2
Level 3
Level 3
Posts: 138
Joined: Sat Jan 25, 2020 3:51 pm

Re: How to set up SAMBA sharing with 19.2 Xfce? [SOLVED]

Post by coyote2 »

I don't think I had to repeat any steps. It turned out that

Code: Select all

thunar smb://device-username@192.168.1.3
works but

Code: Select all

thunar smb://device-username@PCH-A500
doesn't work. No problem, I've still got a way that works!

Can I avoid issuing this Terminal command whenever I want to SAMBA? I see if I right-click on the

Code: Select all

/share/ on 192.168.1.3
that appears in Thunar I get the option to "Create a link". But selecting it doesn't seem to do anything.
altair4
Level 20
Level 20
Posts: 11444
Joined: Tue Feb 03, 2009 10:27 am

Re: How to set up SAMBA sharing with 19.2 Xfce? [SOLVED]

Post by altair4 »

I have a suggestion but it will take a bit to set up.

Run the smbclient -L 192.168.1.3 -U user-name command to get the exact name of the shares on the device.

[1] Create mount points for each of these shares under /media ( except for the ones ending in $ ). For example:

Code: Select all

sudo mkdir /media/share
[2] Then do a temporary mount of that share to that mount point:

Code: Select all

sudo mount -t cifs //192.168.1.3/share /media/share -o username=user-name,password=user-name-password,uid=bill,sec=ntlm,vers=1.0
[3] Verify that it works and displays the contents of that share.

If all that works:
[***] Unmount the share:

Code: Select all

sudo umount /media/share
[***] Edit /etc/fstab and add at the bottom of the file the following:

Code: Select all

//192.168.1.3/share /media/share cifs username=user-name,password=user-name-password,uid=bill,nounix,noauto,user,sec=ntlm,vers=1.0 0 0
Then save the file and run the following command which will check for syntax errors:

Code: Select all

sudo mount -a
Open your file manager. You should see on the left side panel a link to that mount. When selected it will mount the share based on the fstab declaration you just added. You can use the same link to unmount.

The reason I'm suggesting this is because you mentioned Win10 in your posts. All the things you have done to smb.conf is incompatible with Win10. CIFS is Linux kernel based, is far more reliable, doesn't rely on smb.conf, and for WIn10 it will be the best way to connect to it anyway. This way all of your mounts will show up on the side panel in one place.

This is sorta kinda the Linux equivalent of a Windows "mapped" network drive.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
coyote2
Level 3
Level 3
Posts: 138
Joined: Sat Jan 25, 2020 3:51 pm

Re: How to set up SAMBA sharing with 19.2 Xfce? [SOLVED]

Post by coyote2 »

That worked like a bloody dream, thank you very much altair4! Including thinking towards the Win machine in my future (which with this, I'm now turning to building).

You've blown me away with your skill and generosity. Those instructions were so easy for me the noob to follow, that I feel bad they must have taken more of your time to provide.

I feel like I should nominate you for some award or sainthood or something.

With a nod to many others who equally generously taught me some stuff so that I knew how to apply your instructions. What a wonderful community!
coyote2
Level 3
Level 3
Posts: 138
Joined: Sat Jan 25, 2020 3:51 pm

Re: How to set up SAMBA sharing with 19.2 Xfce?

Post by coyote2 »

altair4 wrote: Sun Sep 27, 2020 5:13 pm That's a blast from the past. How on earth does a Win10 machine ever connect to this thing.

Give this a shot: Turn off protocol negotiation.

Edit /etc/samba/smb.conf and under the workgroup = HOME or whatever you set it as add this one:

Code: Select all

client use spnego = no

Then try to connect again: smb://user-name@192.168.1.3

I'm not sure we can leave it that way if you have any other Windows machines in your network but ..........
Now I have a Windows10Pro x64 machine on my network. In order to get that machine to connect to my A500 I enabled smb1 as a client in Win10.

So now both my Mint 19.2Xfce and my Win10 machines can connect to the A500; which is usually my priority I think.

But occasionally I'll want to move files between the computers. I guess to do that I'll temporarily delete the line

Code: Select all

client use spnego = no
?
And I guess to from Mint grab files from Win10 I'd want to enable smb1 as a server too in Win10. (Do I also need to do that to, from Win10, put files into Mint?)

Might that be all I need to try?
Currently my smb.conf includes:

Code: Select all

workgroup = HOME
client use spnego = no
netbios name = Dual
client lanman auth = yes
ntlm auth = Yes
altair4
Level 20
Level 20
Posts: 11444
Joined: Tue Feb 03, 2009 10:27 am

Re: How to set up SAMBA sharing with 19.2 Xfce? [SOLVED]

Post by altair4 »

You don't need to enable smb1 on the server side of Win10 to be able to access it from Mint.

But you will need to ask for the Win10 host and it's share explicitly in your file manager.

For example: My Win10 machine is called vwin1064 and it has a share labeled shared. To access that share - with SMB1 disables on the WIn10 machine server-side I ask for it directly in the Mint file manager:
Win10-SMB-Share.png
Win10-SMB-Share.png (26.1 KiB) Viewed 835 times
Win10 can speak mDNS ( the .local part of the hostname above ) so the general syntax in the location bar of your file manager is:

Code: Select all

smb://host-name.local/share-name
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
coyote2
Level 3
Level 3
Posts: 138
Joined: Sat Jan 25, 2020 3:51 pm

Re: How to set up SAMBA sharing with 19.2 Xfce? [SOLVED]

Post by coyote2 »

Thank you very much altair4, with that I now can (from the Mint machine) move files in either direction between it and the Win10Pro machine.

But I can't login to the Mint machine from the Win10 machine; Win10 gives me a "The user name or password is incorrect" error.
Nothing changes if I comment out

Code: Select all

client use spnego = no
in the smb.conf
(And I mean nothing, from Mint I can still reach the shares on both Win10 and the ancient A500 (the later originally requiring that line for connection)!

It would be nice--but only if it's not a big deal--to reach Mint from the Win10 machine.
Locked

Return to “Beginner Questions”