How do you share folders/drives between 2 Linux boxes

Discussion in 'Linux/BSD/Free Systems' started by Deadjasper, Jun 12, 2019.

  1. Deadjasper

    Deadjasper [H]ard|Gawd

    Messages:
    1,667
    Joined:
    Oct 28, 2001
    Samba is installed on both boxes and shares are created. On box A I can see Box B but the share isn't showing. On box B I can't see Box A at all.

    Funny thing is, sharing works flawlessly between a Linux box and Windows. You'd think the Linux code monkeys would make it equally easy or easier between 2 Linux boxes. :confused:
     
  2. Chuklr

    Chuklr Gawd

    Messages:
    734
    Joined:
    Nov 1, 2009
    I have never done this, but have you tried:

    https://www.linux.com/news/using-samba-share-files-between-linux-and-windows;

    https://askubuntu.com/questions/16104/share-between-ubuntu-machines (if you're using Ubuntu) ; or

    https://unix.stackexchange.com/ques...are-files-between-two-linux-machines-over-lan?

    Hope this helps.
     
  3. cjcox

    cjcox [H]ard|Gawd

    Messages:
    1,133
    Joined:
    Jun 7, 2004
    NFS, sshfs, there are lots of ways apart from Samba (if that matters to you)
     
    KarsusTG likes this.
  4. Deadjasper

    Deadjasper [H]ard|Gawd

    Messages:
    1,667
    Joined:
    Oct 28, 2001
  5. Deadjasper

    Deadjasper [H]ard|Gawd

    Messages:
    1,667
    Joined:
    Oct 28, 2001
    Why would I use NFS or sshfs instead of Samba?
     
  6. Deadjasper

    Deadjasper [H]ard|Gawd

    Messages:
    1,667
    Joined:
    Oct 28, 2001
    Forgot to mention, there is one share that shows - print$
     
  7. auntjemima

    auntjemima [H]ardness Supreme

    Messages:
    4,616
    Joined:
    Mar 1, 2014
  8. Deadjasper

    Deadjasper [H]ard|Gawd

    Messages:
    1,667
    Joined:
    Oct 28, 2001
    I'm making progress. I can see the share but when I try to connect it appears to be rejecting the password. There's only one password and zero doubt it's correct.
     
  9. ChadD

    ChadD 2[H]4U

    Messages:
    3,962
    Joined:
    Feb 8, 2016
    You don't really want to use samba for linux to linux. Just use NFS

    http://www.linuceum.com/Server/srvNFSIntro.php

    For most hone setups your /etc/exports to have something like
    /directory_to_share 192.168.1.1/24(rw,no_root_squash,async)
    Then after restarting the server or rebooting... you would want to mount them on the client. (or add them to the FSTAB so they are always there on boot)
     
    Deadjasper and DogsofJune like this.
  10. jeremyshaw

    jeremyshaw [H]ardForum Junkie

    Messages:
    12,046
    Joined:
    Aug 26, 2009
    meanwhile, dumb dumb here has been using a mix of scp and git to transfer files across linux boxes/installs. :/
     
  11. Deadjasper

    Deadjasper [H]ard|Gawd

    Messages:
    1,667
    Joined:
    Oct 28, 2001
    Got it to work by allowing guest access. I guess that will do. :)
     
  12. cjcox

    cjcox [H]ard|Gawd

    Messages:
    1,133
    Joined:
    Jun 7, 2004
    NFS because it's going to much faster. Ssshfs because (maybe) simpler. Though NFS is also simpler. It depends. I you don't have centralized account mgmt of some kind there can be problems with any of the solutions mentioned (even Samba). But it depends on what you are doing (e.g. read only shares, or shares with "world" like privs that don't care). The name of the client host below is "samba-test", but I'm doing client tests from it (ignore the name). First set is smb (to a samba server) Second set is NFS (to an NFS server). Both targets are actually the same NAS on the same network. Homegrown NAS (again, both Samba/SMB and NFS) on an iSCSI SAN. Note that random seeks were better on SMB (which could be very interesting for all random workloads). But in most cases NFS was the winner.

    smb-vs-nfs.png
     
    Deadjasper likes this.
  13. IdiotInCharge

    IdiotInCharge [H]ardForum Junkie

    Messages:
    10,449
    Joined:
    Jun 13, 2003
    Use Samba exclusively sharing from CentOS 7 (previously FreeNAS and a few Ubuntu derivatives), to various Linux machines and Windows 10, no problems that I didn't create first.
     
  14. Deadjasper

    Deadjasper [H]ard|Gawd

    Messages:
    1,667
    Joined:
    Oct 28, 2001
    I have zero security concerns as this is a private network not connected to the Internet and only 3 possible users. Under my use case I find it maddening to have to deal with security issues. I wish There was a way to just turn them all off. You can pretty much do this in Windows but not so in Linux. I'll look into NSF, faster is always better. Thanks
     
  15. Mazzspeed

    Mazzspeed [H]ard|Gawd

    Messages:
    1,522
    Joined:
    Dec 27, 2017
    The same issues exist under Windows, in fact the same issues have existed under every OS since Wannacry due to SMB1 being disabled across the board.

    Don't browse for shares, map shares directly using either the IP address of the share or the netbios name. As stated, browsing for shares has been a fail since SMB1 was disabled across all operating systems.
     
  16. DogsofJune

    DogsofJune 2[H]4U

    Messages:
    2,406
    Joined:
    Nov 7, 2008
    Stored for future reference
     
  17. IdiotInCharge

    IdiotInCharge [H]ardForum Junkie

    Messages:
    10,449
    Joined:
    Jun 13, 2003
    This is a pretty ancient resource- while I don't doubt that it'd be useful for setting up NFS, I do question the speed concerns. I've seen my Samba connection max out my 10Gbit connections locally, so perhaps there is a percent or two more overhead, but that does allow everything on the network (Windows, Linux, BSD) to share using the same settings.
     
    Chuklr and Deadjasper like this.
  18. ChadD

    ChadD 2[H]4U

    Messages:
    3,962
    Joined:
    Feb 8, 2016
    Some things don't really change.

    https://wiki.archlinux.org/index.php/NFS
    https://access.redhat.com/documenta...deployment_guide/s1-nfs-server-config-exports
    http://manpages.ubuntu.com/manpages/disco/en/man5/exports.5.html
    https://doc.opensuse.org/documentation/leap/reference/html/book.opensuse.reference/cha.nfs.html
    https://wiki.gentoo.org/wiki/Nfs-utils

    Having said that I didn't read that old resource in some time... can't remember if it had systemd stuff in it.
    systemctl start nfs-server.service might have been missing, won't bother to go look. Probably if you need to know how to setup NFS you should just look at your distro (or base distros) instructions. :)
     
    IdiotInCharge likes this.
  19. IdiotInCharge

    IdiotInCharge [H]ardForum Junkie

    Messages:
    10,449
    Joined:
    Jun 13, 2003
    I honestly should give NFS a try and see what difference it makes with my Linux boxes. I tried iSCSI for a minute, with a specific goal in mind- game load times from the NAS were actually pretty good, but permissions issues were insurmountable. iSCSI doesn't appear to be designed to share one volume out to multiple operating systems...
     
    ChadD likes this.
  20. ChadD

    ChadD 2[H]4U

    Messages:
    3,962
    Joined:
    Feb 8, 2016
    iSCSI is nice for a larger private network.... I guess it can work over the internet as well. I would think you could share to other OSs via that method, I would imagine the setup is a lot more complicated though. (and likely not all that fast... but I'm just guessing)

    For a simple home type server I like NFS. Its fair to say its not a simple GUI powered click click like windows tends to be (although ime a lot of people more fluke their "working" windows networks together then really understand what they are doing). Its not that there is anything wrong with just using samba... and if you have windows PCs around that is logical. But for just simple speedy linux to linux NFS is hard to beat. (I haven't touched it in a while but I was reminded today that SUSEs Yast config tool does have some GUI NFS setup tools.) In any event NFS setup is one of those things where its nice to have at least a passable understanding of what /etc/exports is... how fstab works... how to create some symbolic links ect. And in the end NFS is the fastest small network box to box I have found.