Live data from Hacker News

Samba on Linux the Easy Way

glovesoff.substack.com

31–40 of 43 posts

Re: Samba on Linux the Easy Way

#31

Personally, I think that SFTP can be a decent option. Though on Windows hosts that want to access said files, I've found myself needing something like RaiDrive or a similar piece of software: https://www.raidrive.com/ That said, the performance is pretty good and it seems rather stable, I haven't had many issues to date at all. Though my use case is also decidedly simple: just a "push" setup for files/backups when I…

> No idea why Windows doesn't support something like that natively

I think the answer is right at hand. Or maybe I'm just too cynical.

Re: Samba on Linux the Easy Way

#32
post #20

Once I figured it out, over 20 years ago, I’ve found it trivial since. Though not as simple as sharing on Windows. A friend of mine has been trying to learning Linux this month, and he came to me frustrated, losing his mind. A whole day going all over the place on the Internet, obviously following tutorials he didn’t understand, and installing who knows what, and I asked, did you install SAMBA? He asked, what’s that?…

I remember doing something like this on Ubuntu recently. All I needed to do was right click a folder, hit properties, then share. Samba wasn't installed so there was a prompt that says "required software not installed, want to install it?" and after hitting yes and giving it my password it just worked.

I don't know if Ubuntu 22.04 changed this process or if your friend is using a less user friendly distro but I found this to be one of the easier things to do in Linux. You don't need to bother with smb.conf or whatever if your software ecosystem has built in SMB integrations (like they should, if they target the non-technically minded).

I do know that recent GNOME installs come with built in remote desktop over RDP which is a godsent. xrdp works great once you get it working but to do that you should be prepared to take the three hour deep dive into display/windows manager terminology, internals, and configuration files unless you're running a minimalist DE.

Really, common distros should have a button in the installer that says "install the software packages I'll probably need" to install all of this stuff and not rely on the user knowing what arbitrarily named packages they need. Let the purists disable that stuff if they want to, but let the normal people start out with a desktop that Just Works.

Re: Samba on Linux the Easy Way

#33
A related point is that I recently discovered that, with the right incantations in the config file, macOS clients to a samba server can store their metadata in filesystem extended attributes, preventing them from vomiting dotfiles all over your share.

Re: Samba on Linux the Easy Way

#34
post #20

Once I figured it out, over 20 years ago, I’ve found it trivial since. Though not as simple as sharing on Windows. A friend of mine has been trying to learning Linux this month, and he came to me frustrated, losing his mind. A whole day going all over the place on the Internet, obviously following tutorials he didn’t understand, and installing who knows what, and I asked, did you install SAMBA? He asked, what’s that?…

A few hours or trial and error can save you minutes of reading the manual.

Assuming the documentation is up to date, we'll written, and easy to follow.

Of course I'm more of a tinker, so I'll mess with something first intentionally before going to the manual. What you get stuck on is what teaches you what part of the manual is most important for you.

Re: Samba on Linux the Easy Way

#35
post #27
post #20

Once I figured it out, over 20 years ago, I’ve found it trivial since. Though not as simple as sharing on Windows. A friend of mine has been trying to learning Linux this month, and he came to me frustrated, losing his mind. A whole day going all over the place on the Internet, obviously following tutorials he didn’t understand, and installing who knows what, and I asked, did you install SAMBA? He asked, what’s that?…

Don't lead people to believe manuals/manpages are good, complete or readable. I often fine that coming up with an option line that does what I want requires more study than is presented in the manual. A quick forum search will probably be a much better starting point. Also, I recall that reading though a Samba config file (it's been a decade, maybe it's gotten better) while instructive, is nearly equivalent to readin…

Manuals are written by the people who know the software better than anyone else. But that knowledge comes at a price of being completely unable to shift their perspective to that of someone coming in with fresh eyes.

Documentation needs two parts, a reference written by the authors and a tutorial written by someone with no prior experience with the software going though their process learning it from scratch.

Re: Samba on Linux the Easy Way

#37
post #19

I have given up on Samba on my home network. It's just 2 pi, 2 laptops but client randomly loses connection to folders or dolphin/nautilus stop seeing folders, hit refresh, there it is again, etc. I just use sshfs and I am done with it. I just want to easily move files around my network and samba took too many hours of my life to look at what's wrong this year with client version or spaces in shared folders. It's alw…

NFS gets a bad rep. I use it everywhere with 0 problems or configuration headaches. Sure, I wouldn't use it in situations where security is a concern, but for me and all my computers? It's wonderful. And SO much faster than sshfs.

Sorry for the rant, obviously NFS is fine for a homelab.

Nobody should use NFS ever if it can be avoided. Run screaming. The entire idea of “remote file system that is transparent to applications that just write files normally” fundamentally just does not work on Linux. There is too much software that assumes the characteristics and reliability of local filesystems like ext4 and xfs and there not enough control exposed by the kernel to handle when things go wrong. It’s the wrong layer.

Remote block storage as well as application layer object storage work really really well but the filesystem APIs are a mess intertwined with so many different parts of the system and assumptions made 40 years ago.

Re: Samba on Linux the Easy Way

#38
post #11

So. I don't know if it's a samba thing, an ubuntu thing, a gnome thing, or yet another thing. But accessing smb folders with a large amount of files is waaaay slower with Ubuntu than with windows. Also: will we ever get thumbnails?

It could very likely be Gnome. I would try accessing the same smb folders using a different desktop environment and file manager (eg. Thunar under XFCE, etc). The fastest one I'm aware of out there is Rox Filer which is already available on many distros and can be used in place of the stock one, but as far as I can tell it doesn't know anything about network shares, that is, it won't mount the share when the relevant mount point is accessed, the user has to provide an already mounted directory or implement automount. That's the price to pay for something that is like orders of magnitude faster than most used file managers.

https://github.com/rox-desktop/rox-filer

Re: Samba on Linux the Easy Way

#39
post #20

Once I figured it out, over 20 years ago, I’ve found it trivial since. Though not as simple as sharing on Windows. A friend of mine has been trying to learning Linux this month, and he came to me frustrated, losing his mind. A whole day going all over the place on the Internet, obviously following tutorials he didn’t understand, and installing who knows what, and I asked, did you install SAMBA? He asked, what’s that?…

> The problem is people are lazy

doesn't describe

> they will spend days searching the web, reading through the endless ‘blind leading the blind’ user forums

as for "instead of RTFM" you have to know where and what to read

Re: Samba on Linux the Easy Way

#40
post #5

I love NixOS for this. It's a few lines of Nix config to set up samba sharing for a directory + a .local domain for discoverability.

Can you share a link?

This is my Samba config https://gist.github.com/benpye/34b3a788d90c259528885943029d0... . I've also got it configured so that ZFS snapshots are visible in file history. I use this most for storing my Lightroom catalogue, and then have B2 backups setup from the home server as well.
Post reply on HN