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

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

Post by coyote2 »

According to one thread I want to "Create Samba Shares Directly from Thunar" but there is so much I don't understand.

I have no Windows machine at the moment; I'm trying to share with a networked media player ("Popcorn Hour A-500") whose SAMBA server I have used to share with deceased Windows machines. I have enabled Samba in the Firewall both directions.

I want to be able to copy to the A-500 from Mint 19.2 Xfce (which I guess only needs Read-Only, and needs Mint's SAMBA Server enabled--is it by default?), and I want full Read-Write access of the A-500 from Mint.

I'd also prefer the SAMBA in both directions to be username/password protected.

1.
In that Samba-Thunar HowTo:

A. when I get to "Configure Custom Actions"
Image
which item do I choose?

B. Both the "Public" and "Private" code samples contain the word "guest"; am I right to think that means they aren't giving me password-secured access?

2.
As for connecting to the A-500 from Mint, I have no idea how to.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

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

Post by MrEen »

Hi again coyote2,

I can't help much with this, but what you need to click on first is the plus sign to add a new Custom Action.

I can see yours is not active, so I'm guessing you're logged in as a guest right now? Anyway, there's your first stumbling block we need fixed.

If you're logged in as your normal user that was created when you installed, then something is wrong. Does this return a list of items:

Code: Select all

find $HOME ! -user $USER
EDIT: And I just noticed you're using the old Debian Xfce instructions. Use this one instead: viewtopic.php?f=42&t=235248&p=1250732#p1250732
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 »

Ooops right I hadn't even got far enough to notice that the buttons were greyed out.

I'm logged in as my normal user created when installed. That command returned nothing:
Image

(I think I got that right because I tried swapping -bill and/or $BILL for -user and/or $USER but all that gave errors.)

Thanks very much for the new instructions! I see that thread isn't locked, which reminds me:
I posted here in Newbie Questions because I am an intimidated noob. Should such a question have been posted in Networking instead?
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

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

Post by MrEen »

Here is certainly fine.

I'll need to think why your + button isn't active, or we'll need someone else to offer help with it. I thought for sure an ownership issue, but that's not the case.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

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

Post by MrEen »

I just realized, all that this tutorial is helping with is to set folders as shareable. This isn't really getting you all that much closer to what you eventually want to achieve. Let me find a better tut from altair4 for the actual samba stuff.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

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

Post by MrEen »

Here's the only 19.x related topic of his I can find right now: viewtopic.php?f=42&t=270442&p=1476315#p1476315

For some reason, I cannot find the tutorial he created that I used ages ago.
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 »

MrEen wrote: Mon Sep 21, 2020 6:59 pm I just realized, all that this tutorial is helping with is to set folders as shareable. This isn't really getting you all that much closer to what you eventually want to achieve.
I guess that's true; I thought I might possibly be able to Samba stuff off the share from the other device as soon as it was shared.
Let me find a better tut from altair4 for the actual samba stuff.
Thank you very much in advance!!
User avatar
Larry78723
Level 14
Level 14
Posts: 5476
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

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

Post by Larry78723 »

Here's a link to Altair's samba tutorial: viewtopic.php?f=42&t=23169&hilit=samba+setup
Image
If you have found the solution to your initial post, please open your original post, click on the pencil, and add (Solved) to the Subject, it helps other users looking for help, and keeps the forum clean.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

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

Post by MrEen »

Thanks Larry. I stopped looking when I saw I was back at 2011. I just didn't go far enough back. :oops:
User avatar
Larry78723
Level 14
Level 14
Posts: 5476
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

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

Post by Larry78723 »

I have it bookmarked.
Image
If you have found the solution to your initial post, please open your original post, click on the pencil, and add (Solved) to the Subject, it helps other users looking for help, and keeps the forum clean.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

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

Post by MrEen »

Larry78723 wrote: Mon Sep 21, 2020 7:28 pm I have it bookmarked.
I'm sure I do as well, but my bookmarks are royal mess! I really need to clean them up. :(
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 »

Thank you very much, gentlemen!

But that was the thread I linked to (in the first 4 words of my OP) which directed me to the other thread that I asked about in #1.

(On the bright side, now I don't feel like I didn't get as far as I could without crawling here begging for help.)

Maybe if I can get past the Thunar step I asked about in #1, that thread will do the trick for me, I just haven't been able to.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

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

Post by MrEen »

Well, crap. I clicked on BOTH of the other 2 links in your OP, but not that one! :oops:

I was going to give you my copy of the custom action, but then saw it had a "unique id" that Thunar must have generated. I'll paste it here regardless:

Code: Select all

<action>
	<icon></icon>
	<name>Samba Public Writeable</name>
	<unique-id>1583871382304669-1</unique-id>
	<command>net usershare add %n %f &quot;&quot; Everyone:F guest_ok=y &amp;&amp; chmod 777 %f</command>
	<description></description>
	<patterns>*</patterns>
	<directories/>
</action>
For your case, that would be inserted immediately above the last line, </actions> in /home/YourUserName/.config/Thunar/uca.xml.

But I suspect the unique ID thing is going to mess it up.
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

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

Post by altair4 »

Maybe if I can get past the Thunar step I asked about in #1, that thread will do the trick for me, I just haven't been able to.
If you are having that many problems creating a Thunar Custom Action don't use it. Create your share in smb.conf directly.

[1] Make sure samba is installed:

Code: Select all

sudo apt install samba
[2] Run the following command:

Code: Select all

net usershare info --long
If it comes back empty go to step [3]. If it has entries go to /var/lib/samba/usershares and delete the individual files you find there.

[3] Now edit /etc/samba/smb.conf and at the bottom of the file create the share definition for your shared folder.

In this example I will share my Music folder:

Code: Select all

[Music]
path = /home/altair/Music
read only = No
guest ok = No
force user = altair
Save smb.conf, then restart smbd: sudo service smbd restart

[4] Create samba users. Since you want to limit access to credentialed users this is a necessary step.

Unlike Windows that has only one user that is used locally and across the network Linux has two. The local login user and the samba user. For a network user to gain access to that share a local login user will need to be created for that remote user and then he will need to be added to the samba password database.

You can use your own username if you want. Here is how I would add myself to samba:

Code: Select all

sudo smbpasswd -a altair
Note: I have tried repeatedly to download the user manual for this device and have been unsuccessful. A check on their forums indicates that this device uses a version of samba that is very old. Mint19 may be too new. It can be modified to work with an older version of samba but it will take a bit. There is no way for me to know how old the A500 samba server is.
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 »

OMG it's the esteemed Altair4, thank you so very much!!

I don't think the A-500 User Manual would've been any help, I can't see any indication of the SAMBA version. They didn't do firmware updates for long after the device debuted almost 4 years ago. Regardless I apologize for not linking to it, particularly since I see the manufacturer's site has a broken link (I think streaming killed it). In case anyone wants, here's a live link: https://static.qobuz.com/info/IMG/pdf/A ... Manual.pdf
altair4 wrote: Tue Sep 22, 2020 7:34 am You can use your own username if you want. Here is how I would add myself to samba:

Code: Select all

sudo smbpasswd -a altair
When I do this, I get:

Code: Select all

New SMB password:
Retype new SMB password:
I got confused by that the nothing appeared on the screen when I typed and retyped the password. I could enter passwords, or enter nothing, they both appeared to work, so I wonder if they did: is nothing supposed to appear onscreen as I type the password? (If so I think I succeeded.)
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

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

Post by altair4 »

is nothing supposed to appear onscreen as I type the password?
Yes.
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 made progress but not to SAMBA-completion either to or from the A-500.

From:
Thunar doesn't present me with a login opportunity:
Image

To:
The A-500 "sees" both shares I created and offers me a login opportunity to each of them, but the username and password I created aren't working.

I've retyped them to log in many times, I've tried re-creating the SAMBA username and password many times.

I tried logging in with the username all caps (even though I didn't create it with any).

I can't think of anything else to try.
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

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

Post by altair4 »

Can't offer much help here since I don't have your device. The only suggestion I would have - and this assumes the device is really WinXP centric - is to bring Samba on your Mint machine back to an earlier era.

Edit /etc/samba/smb.conf and add - below the workgroup = WORKGROUP line:

Code: Select all

client lanman auth = yes
ntlm auth = Yes
Then reboot your Mint box.

You might also want to verify that your samba user is in the database:

Code: Select all

sudo pdbedit -L
You will not be able to see the actual password since it's encrypted but you should see a record for that user.
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 »

Wow, I can now connect to the Mint shares from my A500! (Thank you very much Altair4!)

So I guess I don't need to tell you that I have a SAMBA user:

Code: Select all

bill@Dual:~$ sudo pdbedit -L
[sudo] password for bill:           
bill:1000:Bill
bill@Dual:~$
(I don't know where the capital "B" came from, and I found I could login from the A500 as "bill".)

However, Thunar is still giving me the previously-pictured "Failed to open" error. (And it's more important to me to be able to connect from Mint to the A500 than the other way around.) Maybe this provides a clue?
Image
Does this mean I'd need to be logged in as root to connect to the A500?
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

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

Post by altair4 »

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?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Locked

Return to “Beginner Questions”