Samba frustration

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.
Locked
MintyByte
Level 1
Level 1
Posts: 13
Joined: Fri Nov 08, 2019 8:46 pm

Samba frustration

Post by MintyByte »

My main reason for trying to make Mint work on my LAN is because I do want to migrate from Win to Linux and Mint seems to have been recommended as the friendliest distribution for that effort, but I have found it a 'bear' to try and fit a Mint box into my current Win-only LAN.
Several 'tutorials' have been of little help and from the comments for some of these tuts, I conclude that I am not the only one struggling with this problem and looking for help which seems very hard to come by.

After posting a couple of messages going back some time regarding my troubles with Samba shares under Mint, including the current Mint 21 - with no replies at all - and looking for any potentially helpful postings on this board, I have not found anything which has allowed me to share files between the Win PCs and my Mint box. Even accessing an XAMPP server on a Win PC was a major effort for a newb.

The hiatus in my efforts to resolve this issue is due, in large part, to the difficulties in making the transition work and being (almost) forced to return to a Win only workflow, just to get some work done.

Surely I can't be the only one wanting a two-way sharing of files between Linux and Windows PCs. I can understand M$ wanting to make migration away from Win difficult ... but ...
Then again, if Samba is not the 'proper' solution', what is?
Last edited by LockBot on Wed Dec 06, 2023 11:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
TaterChip
Level 5
Level 5
Posts: 643
Joined: Sat Apr 22, 2023 12:34 pm
Location: Everywhere USA

Re: Samba frustration

Post by TaterChip »

I have a win10 machine talking to my Linux machines via Samba. What are the problems that you are having? Maybe I can help.
MSI Steel series GL75 Leopard, i7-10750H, 64GB RAM ... LMDE6
MintyByte
Level 1
Level 1
Posts: 13
Joined: Fri Nov 08, 2019 8:46 pm

Re: Samba frustration

Post by MintyByte »

Almost nothing works ;-)
I cannot see my mint box from my win PCs nor see the win PC from the mint box
MintyByte
Level 1
Level 1
Posts: 13
Joined: Fri Nov 08, 2019 8:46 pm

Re: Samba frustration

Post by MintyByte »

About the only thing I have managed to do is to find some directories on the Mint box from the Win side, but I cannot do much in the folder other see the files.
The mint box' folders are only visible if I enter the URL in the Win 11 PC, same for a win 10 PC
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba frustration

Post by altair4 »

You have provided no information for anyone to help you.

Let's start with what samba does best and that is to be a server of shares. We need to see how you are set up for that.

So please post the output of the following commands:

Code: Select all

testparm -s

Code: Select all

net usershare info --long

Code: Select all

hostname
And if all of your Windows machines are >= Win10 have you installed wsdd in Mint:

Code: Select all

sudo apt install wsdd
And is avahi running:

Code: Select all

sudo service avahi-daemon status
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
TaterChip
Level 5
Level 5
Posts: 643
Joined: Sat Apr 22, 2023 12:34 pm
Location: Everywhere USA

Re: Samba frustration

Post by TaterChip »

MintyByte wrote: Tue Jun 06, 2023 2:39 pm Almost nothing works ;-)
I cannot see my mint box from my win PCs nor see the win PC from the mint box
When I first started trying to make the switch a guy had me download Webmin from the package manager. To access webmin you will need to pull up your web browser and put https://localhost:10000 in the url bar.

Use your user name and password to log into the system.

On the left under "Servers" click Samba file sharing

You will need to chose the option at the top to create a new file share. Give it a name, choose the directory, Change "create with root" to your User and press create

Click on the file share you just created and click the "security and access control" button at the bottom.

Add your user and ueser group to the "valid users" lines. On mine, I also changed the guest access to none at the top of the screen. Then click save.

Back to the main samba file sharing page.... scroll down till you see the "convert users" button under Samba users. Click that button

Click the little person button beside the first line, and select your user name, then click the green select button, set the password option that you want and then click the "convert users" button

Back to the main samba file sharing page.... scroll down till you see the "Samba users" button under Samba users. Click that button
Your user name should be listed there.

Now to windows computer.....

You will need your Linux computers IP address (I can't remember the linux terminal command to pull this up, but someone will be able to help with that.)

Pull up your file explorer and type \\yourIPaddress in the location bar at the top. It will ask you for your linux username and password. Once that is entered, you should be in.

Let me know if you need more help.

EDIT..... one thing that I forgot. On your linux machine... if you're using the firewall, you will have to go in and create a rule to allow Samba through your firewall... or it will drive you completely bonkers trying to figure out why it isn't working. I learned this the hard way.
MSI Steel series GL75 Leopard, i7-10750H, 64GB RAM ... LMDE6
MintyByte
Level 1
Level 1
Posts: 13
Joined: Fri Nov 08, 2019 8:46 pm

Re: Samba frustration

Post by MintyByte »

altair4 wrote: Tue Jun 06, 2023 3:06 pm You have provided no information for anyone to help you.
That is because I have no clue where to start troubleshooting this issue :-)
altair4 wrote: Tue Jun 06, 2023 3:06 pm Let's start with what samba does best and that is to be a server of shares. We need to see how you are set up for that.

So please post the output of the following commands:

Code: Select all

testparm -s
~$ testparm -s
Load smb config files from /etc/samba/smb.conf
Unknown parameter encountered: "valid user"
Ignoring unknown parameter "valid user"
Unknown parameter encountered: "valid user"
Ignoring unknown parameter "valid user"
Loaded services file OK.
Weak crypto is allowed

Server role: ROLE_STANDALONE

# Global parameters
[global]
bind interfaces only = Yes
ntlm auth = ntlmv1-permitted
server min protocol = NT1
idmap config * : backend = tdb
include = /etc/samba/shares.conf
[Public Files]
create mask = 0664
directory mask = 0775
force create mode = 0664
force directory mode = 0775
force group = smbgroup
force user = smbuser
guest ok = Yes
path = /share/public_files
read only = No
[Protected Files]
create mask = 0664
directory mask = 0775
force create mode = 0664
force directory mode = 0775
force group = smbgroup
force user = smbuser
guest ok = Yes
path = /share/private_files
[Docs]
create mask = 0777
directory mask = 0777
guest ok = Yes
guest only = Yes
path = /home/share
read only = No
[arnold]
browseable = No
force create mode = 0660
force directory mode = 02770
path = /home/share/arnold
read only = No
[smbadmin]
browseable = No
force create mode = 0660
force directory mode = 02770
path = /home/share/smbadmin
read only = No
arnold@CarbMint:~$
altair4 wrote: Tue Jun 06, 2023 3:06 pm

Code: Select all

net usershare info --long
no output from that command
altair4 wrote: Tue Jun 06, 2023 3:06 pm

Code: Select all

hostname
CarbMint
altair4 wrote: Tue Jun 06, 2023 3:06 pm And if all of your Windows machines are >= Win10 have you installed wsdd in Mint:

Code: Select all

sudo apt install wsdd
wsdd is now installed
altair4 wrote: Tue Jun 06, 2023 3:06 pm And is avahi running:

Code: Select all

sudo service avahi-daemon status
arnold@CarbMint:~$ sudo service avahi-daemon status
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
Loaded: loaded (/lib/systemd/system/avahi-daemon.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2023-06-06 08:01:38 PDT; 5h 40min ago
TriggeredBy: ● avahi-daemon.socket
Main PID: 957 (avahi-daemon)
Status: "avahi-daemon 0.8 starting up."
Tasks: 2 (limit: 18824)
Memory: 1.3M
CPU: 9.816s
CGroup: /system.slice/avahi-daemon.service
├─957 "avahi-daemon: running [CarbMint.local]"
└─991 "avahi-daemon: chroot helper"

Jun 06 08:01:38 CarbMint avahi-daemon[957]: Network interface enumeration completed.
Jun 06 08:01:38 CarbMint avahi-daemon[957]: Registering new address record for ::1 on lo.*.
Jun 06 08:01:38 CarbMint avahi-daemon[957]: Registering new address record for 127.0.0.1 on lo.IPv4.
Jun 06 08:01:39 CarbMint avahi-daemon[957]: Server startup complete. Host name is CarbMint.local. Local service cookie is 3904855904.
Jun 06 08:01:47 CarbMint avahi-daemon[957]: Joining mDNS multicast group on interface eno1.IPv4 with address 192.168.1.74.
Jun 06 08:01:47 CarbMint avahi-daemon[957]: New relevant interface eno1.IPv4 for mDNS.
Jun 06 08:01:47 CarbMint avahi-daemon[957]: Registering new address record for 192.168.1.74 on eno1.IPv4.
Jun 06 08:01:47 CarbMint avahi-daemon[957]: Joining mDNS multicast group on interface eno1.IPv6 with address fe80::8b19:1cbb:cccb:cce4.
Jun 06 08:01:47 CarbMint avahi-daemon[957]: New relevant interface eno1.IPv6 for mDNS.
Jun 06 08:01:47 CarbMint avahi-daemon[957]: Registering new address record for fe80::8b19:1cbb:cccb:cce4 on eno1.*.
arnold@CarbMint:~$
MintyByte
Level 1
Level 1
Posts: 13
Joined: Fri Nov 08, 2019 8:46 pm

Re: Samba frustration

Post by MintyByte »

@TaterChip
cannot find webmin in either Synaptic manager or Software manager.
Trying to connect to https://localhost:10000/ gives me nothing but an error "unable to connect"
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba frustration

Post by altair4 »

Wow.

Um....

As far as "discovery" of you Linux server from Explorer is concerned you should now be able to see it thanks to wsdd being installed.

You will not be able to see the [arnold] or [smbadmin] shares of course since you set them as non-browseable.

The [Public Files] and [Protected Files] and [Docs] shares allow guest access but you have disabled guest access completely from your server because of a missing line in the [global] section of smb.conf: map to guest = Bad User

I don't know what you have in the include reference but take a look at how it is defined:

Code: Select all

cat  /etc/samba/shares.conf
Then of course there is this: Unknown parameter encountered: "valid user"


It's valid users not valid user even if you only have one valid user if that makes any sense.

IT's about now that I mention ... you know ... just in passing ... that there is a factory fresh version of the original unmodified smb.conf located here: /usr/share/samba/smb.conf

You can copy that to /etc/samba if you choose to just reset yourself to the basics. Then just go through a simple checklist: Share Folders using Samba in Home Network with Mint 21
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
MintyByte
Level 1
Level 1
Posts: 13
Joined: Fri Nov 08, 2019 8:46 pm

Re: Samba frustration

Post by MintyByte »

altair4 wrote: Tue Jun 06, 2023 5:11 pm Wow.

Um....

As far as "discovery" of you Linux server from Explorer is concerned you should now be able to see it thanks to wsdd being installed.
Thank you ever so much for taking the time.

Yes, if I refresh the view in my Win Network panels, CarbMint now shows as well as the directories I had created following earlier attempts at getting this all working.
altair4 wrote: Tue Jun 06, 2023 5:11 pm
You will not be able to see the [arnold] or [smbadmin] shares of course since you set them as non-browseable.
fixed :-)
and now I can see the directories, can browse and add files/dirs
altair4 wrote: Tue Jun 06, 2023 5:11 pm The [Public Files] and [Protected Files] and [Docs] shares allow guest access but you have disabled guest access completely from your server because of a missing line in the [global] section of smb.conf: map to guest = Bad User
Those lines are an intentionally commented out left-over from earlier attempts; I'll remove them completely
altair4 wrote: Tue Jun 06, 2023 5:11 pm I don't know what you have in the include reference but take a look at how it is defined:

Code: Select all

cat  /etc/samba/shares.conf
[Public Files]
path = /share/public_files
force user = smbuser
force group = smbgroup
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
public = yes
writable = yes

[Protected Files]
path = /share/private_files
force user = smbuser
force group = smbgroup
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
public = yes
writable = no
altair4 wrote: Tue Jun 06, 2023 5:11 pm Then of course there is this: Unknown parameter encountered: "valid user"


It's valid users not valid user
that too is now fixed :-)
altair4 wrote: Tue Jun 06, 2023 5:11 pm IT's about now that I mention ... you know ... just in passing ... that there is a factory fresh version of the original unmodified smb.conf located here: /usr/share/samba/smb.conf
You can copy that to /etc/samba if you choose to just reset yourself to the basics. Then just go through a simple checklist: Share Folders using Samba in Home Network with Mint 21
[/quote]
for now I'll keep the fixed up files because it all looks workable from the Win side.
I will have a look at the reference you gave to see if I can now make it also work from the Mint side to see my Win PCs.

A brief look at the link raised a question for me:
They speak of SMB1 as being deprecated, is that something I need to worry about, i.e. is my current setup dependent on SMB1?
TaterChip
Level 5
Level 5
Posts: 643
Joined: Sat Apr 22, 2023 12:34 pm
Location: Everywhere USA

Re: Samba frustration

Post by TaterChip »

MintyByte wrote: Tue Jun 06, 2023 4:51 pm @TaterChip
cannot find webmin in either Synaptic manager or Software manager.
Trying to connect to https://localhost:10000/ gives me nothing but an error "unable to connect"
I was able to find wibmin in my Mint package manager. Here is a link to the .deb download though.

https://www.webmin.com/download/deb/webmin-current.deb

Once it downloads, then you can right click on the download and install it.

You won't be able to connect to https://localhost:10000/ until webmin has been installed.
MSI Steel series GL75 Leopard, i7-10750H, 64GB RAM ... LMDE6
MintyByte
Level 1
Level 1
Posts: 13
Joined: Fri Nov 08, 2019 8:46 pm

Re: Samba frustration

Post by MintyByte »

Thank you,
webmin installed and running
now I need to explore it and its capabilities
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba frustration

Post by altair4 »

A brief look at the link raised a question for me:
They speak of SMB1 as being deprecated, is that something I need to worry about, i.e. is my current setup dependent on SMB1?
SMBv1 will eventually go away.

Some pontificating: We need to differentiate between SMB Host discovery and SMB Host access.

No modern operating system requires SMBv1 on either the client or the server for file access to be successful.

If I just install samba and create a share without doing any further adds or adjustments:

Win10/11 can access the host with a \\hostname.local:
Win10Explorer.PNG
Win10Explorer.PNG (11.06 KiB) Viewed 656 times
MacOS can do the same thing through Connect to Server in Finder: smb://hostname.local
MacOSFinder.png
MacOSFinder.png (24.12 KiB) Viewed 656 times
The problem child is the Linux client. For that you need to specify both the host and the share in it's file manager: smb://hostname.local/share-name

This is true if the host is Windows or another Linux machine. This is because of a bug / design flaw in how the gnome backend connects to a server.

Host discovery is another matter. And I'm talking about the SMB server automatically showing up under Network is some file manager on the client.

The only OS that can discover a Linux Samba server without modification is MacOS. It does that through multicast.

Win10/11 can discover the Linux server only if wsdd is installed on that Linux server. It can still access the server and it's share as I described above it just doesn't show up under Network in Explorer.

At the moment nothing can be done on the Linux clinet to make it work becase of the bug / design flaw I mentioned above. The host and it's share must be specified explicitly.

That is without enabling SMBv1 on everything. That is a security risk and eventually the ability to invoke SMBv1 will go away./
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
TaterChip
Level 5
Level 5
Posts: 643
Joined: Sat Apr 22, 2023 12:34 pm
Location: Everywhere USA

Re: Samba frustration

Post by TaterChip »

MintyByte wrote: Tue Jun 06, 2023 7:15 pm Thank you,
webmin installed and running
now I need to explore it and its capabilities
Were you able to get your Samba up and running so your win can talk to Linux?
MSI Steel series GL75 Leopard, i7-10750H, 64GB RAM ... LMDE6
Locked

Return to “Networking”