How do you share folders/drives between 2 Linux boxes

Deadjasper

[H]ard|Gawd
Joined
Oct 28, 2001
Messages
1,911
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:
 

Chuklr

Gawd
Joined
Nov 1, 2009
Messages
775
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:

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.
 

cjcox

[H]ard|Gawd
Joined
Jun 7, 2004
Messages
1,935
NFS, sshfs, there are lots of ways apart from Samba (if that matters to you)
 

Deadjasper

[H]ard|Gawd
Joined
Oct 28, 2001
Messages
1,911
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.
 

ChadD

Supreme [H]ardness
Joined
Feb 8, 2016
Messages
5,150
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)
 

jeremyshaw

[H]F Junkie
Joined
Aug 26, 2009
Messages
12,512
meanwhile, dumb dumb here has been using a mix of scp and git to transfer files across linux boxes/installs. :/
 

cjcox

[H]ard|Gawd
Joined
Jun 7, 2004
Messages
1,935
Why would I use NFS or sshfs instead of Samba?

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
 

IdiotInCharge

NVIDIA SHILL
Joined
Jun 13, 2003
Messages
14,710
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.
 

Deadjasper

[H]ard|Gawd
Joined
Oct 28, 2001
Messages
1,911
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
 

Mazzspeed

2[H]4U
Joined
Dec 27, 2017
Messages
2,874
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

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.
 

DogsofJune

2[H]4U
Joined
Nov 7, 2008
Messages
3,952
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)
Stored for future reference
 

IdiotInCharge

NVIDIA SHILL
Joined
Jun 13, 2003
Messages
14,710
You don't really want to use samba for linux to linux. Just use NFS

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

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.
 

ChadD

Supreme [H]ardness
Joined
Feb 8, 2016
Messages
5,150
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.

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

NVIDIA SHILL
Joined
Jun 13, 2003
Messages
14,710
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...
 
  • Like
Reactions: ChadD
like this

ChadD

Supreme [H]ardness
Joined
Feb 8, 2016
Messages
5,150
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...

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.
 
Top