Hi everyone !

Right now I can’t decide wich one is the most versatile and fit my personal needs, so I’m looking into your personal experience with each one of them, if you mind sharing your experience.

It’s mostly for secure shared volumes containing ebooks and media storage/files on my home network. Adding some security into the mix even tough I actually don’t need it (mostly for learning process).

More precisely how difficult is the NFS configuration with kerberos? Is it actually useful? Never used kerberos and have no idea how it works, so it’s a very much new tech on my side.

I would really apreciate some indepth personal experience and why you would considere one over another !

Thank you !

  • NFS v4 with krb is probably the best option of these if Linux/macOS is all you need to support because everything just works transparently with one system-wide mount. I had it set up for a couple years until recently (had to basically completely give up on my network setup including the box the KDC was running on for unrelated reasons recently and have still yet to set it up completely again).

    Kerberos is pretty straightforward to set up if you know how it works, I think the main problem is lack of documentation and pretty awful NFS error messages (you pretty much have to enable nfsd/rpc debug kernel options if you want to even begin figuring out what’s going wrong when your mount doesn’t work). The first time I set it up it took me a whole day to get it to actually work, and in the end a reboot of the NFS server solved the problem I had.

    Look at the Arch wiki article for Kerberos, I think that’s what I used mostly. Feel free to ask if you need help setting it up.

    (Unfortunately IMO all of these suck in different ways though: sshfs dies if your SSH connection gets interrupted, NFS v4 (v3 is unusable imo because it doesn’t have idmap so you have to make sure your user IDs match on every machine) isn’t supported by Windows and mobile devices, Samba doesn’t map well to Unix permissions and I can’t tell what its “unix extensions” are actually supposed to do if it isn’t permissions. Integrating Samba with NFS, if you want to use both, also is pretty hard because while Samba theoretically uses Kerberos, it doesn’t work with a normal KDC but needs Samba AD because Microsoft (I haven’t taken a look at Samba AD yet). And forget integrating Samba with anything that isn’t Kerberos-based entirely because NTLM is the only other auth mechanism and it’s pretty much incompatible with anything because the client only sends the password hashed with a unique mechanism. So you’re going to have a pretty bad time if you want to use a single auth mechanism for everything if SMB is involved, and that’s pretty much your only option if you want to access stuff on a mobile device.)

    •  N0x0n   ( @N0x0n@lemmy.ml ) OP
      link
      fedilink
      46 months ago

      Thank you for your friendly and detailed response !!!

      Look at the Arch wiki article for Kerberos, I think that’s what I used mostly. Feel free to ask if you need help setting it up.

      It’s always Arch wiki :D. Thank you, but I will probably stay with samba at the moment which will probably fullfil my current needs and seems more complex than I thought ! Also, it’s in a multi-OS environnement (Windows, MacOS, Linux) and NFS seems to not work very well with Windows :/ If I could I would switch my whole family to Linux, but old habits die hard…

      Anyway, will keep Kerberos under my radar ! I really want to learn more about it seems very interesting, especially the cybersecurity aspect !

      If you don’t mind… Can you tell very briefly what kerberos actually solves in a coporate environnement ? Please, give me a sneek peak of the subject that awaits me :) !!

      • Thank you, but I will probably stay with samba at the moment which will probably fullfil my current needs and seems more complex than I thought !

        Then, take a look at ksmbd which is basically a mini SMB implementation in the kernel. I haven’t used it yet, but apparently it’s more performant and easier to set up.

        If you don’t mind… Can you tell very briefly what kerberos actually solves in a coporate environnement ? Please, give me a sneek peak of the subject that awaits me :) !!

        It provides single sign-on capability. As I already said Active Directory is built on Kerberos for authentication, but it’s used similarly on Linux, logging in to Kerberos gives you a TGT (ticket-granting ticket) which essentially allows you to also authenticate to other services like NFS, SSH (in which case it can forward your ticket to the machine you log on to), stuff like IMAP, even websites (though as far as I’ve seen you need to do some stupid per-domain manual setup for at least Firefox) without having to enter your password again, at least, until the ticket expires, or storing it anywhere. There’s much more that supports it but I’ve only used it for NFS and I’ve experimented with using it for SSH auth, and only for personal use, so I can’t tell you what exactly.

        It’s worth noting that it’s purely for authentication and not authorization, so if you want central permission management, something else will have to do that, such as LDAP which is also what AD uses.

  • Sshfs afaik is used for a different purpose than the others

    I usually use it when I’m working on a remote machine for a long duration and want to use my local tools (so I don’t have to install them on the server, and because using neovim over SSH on a crappy connection sucks)

  • Moved to Truenas Scale and decided to setup NFS shares for my Linux server. Spent a lot of time troubleshooting the fstab config and file/share permissions. Switched to CIFS/SAMBA and had it working in about 15 minutes.

    • NFS : historically insecure by default. Don’t know about Kerberos making it secure but Kerberos does not look easy to configure.

    • sshfs : probably most easy to setup. Can be confusing with ownership and permissions sometimes.

    • Samba : solid but has a learning curve, even for a simple setup. For example, for a standalone Samba server omitting the Active Directory part, you need to know that in order to create a Samba user you must first have created a local user with the same username.

    https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Standalone_Server

    •  N0x0n   ( @N0x0n@lemmy.ml ) OP
      link
      fedilink
      26 months ago

      Thanks for the link :) I have already setup a samba share (actually I have setup all 3 on my server xD). But Didn’t knew they have a whole tutorial on it :) Thanks for the resource, I think I will stay with samba :) Looks the most versatil and has also “easier” security function setup. I mean I don’t think I need Kerberos in my homelab setup and SSHFS… Yeah people tend to argue it’s a pain in the ass with Windows !

      • Thanks for the link :) I have already setup a samba share (actually I have setup all 3 on my server xD).

        Nice :) With Samba you can also create guest entries without passwords for visitors while having your private files behind your own login. Here an example of guest access : https://std.rocks/gnulinux_samba_no_password.html

        And apart from that Samba should be fine for access from MacOS and Windows clients unlike with the ancient NFS, which I expect to be more troublesome to connect especially on Windows, though that is a wild guess.

  • i use nfs. always. every minute my computer is online it has a mounted directory from my server.

    via nfs and wireguard.

    i tried lots of things but nfs which listens on wireguard ip is the best i ever achieved.

  • You’ll probbly want samba then. Much easier to set up, including account security.

    I personally switched from samba to nfs for my linux iso collection because the overhead was causing lag on my tv box. Books won’t have this issue.

  • Honestly I just use SMB with Samba now it’s very fast and secure with the v3 protocol, It gets more complicated if you need AD/LDAP auth but most people don’t especially on a home network.

    NFS is too much of a pain in the ass. I would not use sshfs unless you need to connect over the Internet and a VPN isn’t an option available to you.

    Other options like SFTP, DAV, emulating S3 aren’t really aiming to fill the same use cases SMB does.

  • I ran SSHFS for a while maybe half a year ago? I quite liked it cause we obviously already use SSH so setup was quick and easy, performance was good too. Then I learnt it’s no longer maintained so switched to NFS.

    NFS is good, if you aren’t accessing from Windows I would go for that. Setup is pretty simple too, just change /etc/exports and a few permissions or ownerships (after installing the package obviously) then start the systemd service.

    Can’t comment on Kerberos, but considering NFS popularity I can’t imagine it being difficult.

  • I use SSHFS when I want to quickly grab a file off my server at home.

    It is not a permanent solution, but it is fast and SSH is almost never blocked so the network I’m coming from doesn’t matter.

    Also SSH is great, if I don’t trust the network I’m on, I tunnel all of my traffic through my home server over a SSH connection (this worked whilst I was in China a few years ago, waiting for my connecting flight).

  •  eggbert1234   ( @flei@feddit.de ) 
    link
    fedilink
    1
    edit-2
    6 months ago

    In my personal experience and for my personal needs smb has worked best for me even though it feels kinda “bad” because of the windows background. However that also makes it useful, too, as it is compatible with most os’es…

    Security setup is easy. Performance good (in my experience better than sshfs but i am sure sshfs transfers are more secure than smb).

    •  N0x0n   ( @N0x0n@lemmy.ml ) OP
      link
      fedilink
      16 months ago

      Isn’t samba a fork and open source package from Windows’s samba/cif ? I think I read something like that on the web, but not sure about that information. So it hasn’t anything to do with windows. I may be wrong on that tough !