For the life off me i can not get samba working at all

I want to go from windows to linux and started trying cachyos 3 weeks ago.
And have been trying for 2-3 hours a day for 2 weeks to share a folder on cachyos. And i mean share NOT mount an samba folder from windows/unraid that worked right away.

I also tried out a bunch of different DE’s first since i had absolutely no ide’ what i wanted since 10+ years alot has changed.
Then i stuck with KDE/plasma and tried out programs/apps like crazy, some games and at the same time tried getting samba working now and then.
So after about a week i reinstalled and pretty much only tried getting samba working tried everything i could find/install but noting.

So now i reinstalled again and have only updated and installed the game pack and snapper.
And i ask what do i have to do to get samba working?
I would ultimately like to have kdenetwork-filesharing so i can share and stop a folder from dolphin or any of the other for nemo/thunar and so on.

I´m pretty sure i have to start by making a smb.conf or download/use smb.conf.default file as a start.
But i tried sooooooooooooooooo many different ways of setting that up and none worked at all!
So what the hell should be in it?

Then i have to add a samba user/pass i tried many different ways of doing that, used my cachyos user/used another test user.
Used same as cahcyos pass/tried different pass for samba.
Tried guests/tried writable=yes and no for guests and for the users noting.

Firewall rule?
I did try apparmor the first install round but did open for samba in them, and after that i have only used the ufw FW with samba/cifs rule added.
Tried changing “default incoming policy” from the standard ignore to allow, tried disable ufw.
But noting.

I can simply not connect from any other computer, have tried win11/win10/win7 /unraid machines.
If i boot into windows on this computer i have cachy on, smb works fine to and from all the above machines.

The only glimmer of hope i have is that i have managed to get different error messages from windows/unarid.
So i assume that atleast some times the cachyos samba is seen/connected too.

For now i want to share a test folder in for example /home/grizzly/test
But i could ofcourse use /samba/test or /mnt/test or /mount/test or any of the other 3-4 folders i seen other people use.
Whatever will work is fine :woozy_face:

O i also played around with groups but noting again.
I have mostly used ip adress but have tried names instead of ip too.

Maybe this will help:
https://wiki.archlinux.org/title/Samba

Samba share connection timeout Does this help?

[quote=“Sunda-Spirit, post:2, topic:5733, full:true”]
Maybe this will help:
https://wiki.archlinux.org/title/Samba
[/quote]Not for the 3 first times but maybe number 4?

Did not get any timeout errors.
And it seems like that problem was the other way around mount a windows folder in cachyos which works fine for me.

Open samba port in ufw?
Yes if you mean use CIFS as “application” or even turning ufw off did not change anything.

Use name instaead of ip adress?
Yes tried both no change at all.

Network discovery turned off?
On one win7 pc yes it is off but can mount shares from unraid fine.
On a w11 and a w10 pc net disc is on.
And i also tried unraid with the “Unassigned Devices addon”.
Nothing worked.

But as i said after my fresh install i have not done anything yet not even installed samba.
Since i did want to start the right way and doing everything right from the start.

I haven’t used samba since…oh my goodness, 2000? But it was always a bit freaky and suddenly it works (after the millionth try). Good luck :wink: And the hassle for me was the network announce, nmbd.

Hi Grizzly,

Is there no useful info from smbd and nmbd logfiles?

Yes, in the distant past this has been my problem with Samba - very flaky on a general network setup. Windows machines decide they don’t want to connect, turning machines off and back on again doesn’t cause connections to be announced properly, etc. etc. Samba is annoying that way.

Sooo, right now I do still use a samba share, BUT it’s hosted from my Ubuntu server which is always on, every machine is on my Tailnet via Tailscale (check it out if you haven’t already - total game changer for ease of networking amongst the family computers/phones/devices!), and my samba share primarily exists to make sharing non-concurrent file read/writes easier between laptops. Eventually I’ll rely on a better file-sharing setup, but for now as I’ve been redesigning my home network with Tailscale, it’s worked.

For your situation I would try to see if the reason you are having trouble with samba is whether connectivity happens or improves if you use one machine as the always-on, primary host of a single samba share, and then have other computers connect to it. Good luck though, because unless you’re using samba in the old-school “clients-server” model I’ve never found it to be a pleasant experience.

Have been reading up on tailscale/net/drive now.
It took me a while and almost gave up since i could not find anything at first about mounting a networkdrive/place like smb/samba/cifs/nfs.
Finally found taildrive and started to get excited but at the end of this https://tailscale.com/kb/1369/taildrive?tab=windows i found.

Blockquote
By default, Windows limits WebDAV files to 50MB. This can be changed by editing the registry key:

  1. Change the value to 4294967295, which is 4GB. This is the maximum allowed value.

4GB is a total show stopper, i would say i will use more files over 4gb then under in this particular use case “shared cachyos folder mounted on one windows pc”.

I have reformated/new install since so no log files left until i try again.

Screw Samba!
I did try again but the same do not work at all.

So tried sshfs that i found out about when reading up on tailscale/drive.
But did a speed test and it was way slower then smb/samba from unraid to windows also read about ftpfs but supposedly is even slower, and the sftpfs one step slower again.

So tried NFS and actually got it setup and running in no time on both windows and cachyos, i don´t count unraids three mouseclicks to be an setup.
I do have different user account on win/cachy which made it so i could only read files and some looking around and about 15min that was solved by adding uid=1000,gid=1000 to the NFS options.

I really did not want to use NFS since i tried to use it many moons ago somewhere around the stoneage.
And it work so damn bad the only thing that worked fairly well was getting connected to and from linux<>win but speeds/stability/and so on, scared me for life!
Hell even linux<>linux did not work good back then for me either.
Hope it works ok now :woozy_face:

Hi
I will tell you how I make it work, hope this also works for you. I use KDE and Dolphin file manager and share folder with another cachyos laptop.

Let’s assume that the firewall and apparmor are totally disabled for this example.

you need to install: kdenetwork-filesharing, samba, avahi, nss-mdns, winbind

First problem: there is no /etc/samba/smb.conf file so you need to create o copy one. I just copy mi Manjaro version that was working perfectly for me. Leave yo a copy
here my smb.conf

Second problem: there is no “usershare” folder so you have to make it. Be careful here with the syntax, in this example it is usershare in singular, in the Arch Samba wiki it is written in plural.

create a directory

sudo mkdir /var/lib/samba/usershare

Create user group

sudo groupadd -r sambashare

Change the owner of the directory to root and the group to sambashare:

sudo chown root:sambashare /var/lib/samba/usershare
sudo chmod 1770 /var/lib/samba/usershare

Add the user to the sambashare group. Replace your_username with the name of your user:

sudo gpasswd sambashare -a your_username

now enable samba:

sudo systemctl enable smb nmb winbind avahi-daemon

But there is a final step and that is why I could not connect to any computer at the beginning of everything: Edit /etc/nsswitch.conf and comment / delete / modify the line starting with “hosts” so it has to be:

hosts: mymachines mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname dns

restart you computer and it should work.