Network Linux&Windows

Networking, I have a few computers which I would like to network together, these machines are Linux and windows based and I would like to share folders and locations.

I am just wondering how to go about it? This morning I had to resort to using Google-drive as a way. I zipped all that I wanted to transfer, uploaded and downloaded.
Would one machine have to technically be a server or can it just be machine based?

On creating this thread I note another that was solved: MegaSync the post talks of it giving 50GB free storage. I would like to keep my data locally without it going through the router to the internet.

–
Data

Syncthing might be the perfect solution for you. It is available for Linux, Windows and Android. You tell it which folders to sync and keeps them mirrored on all devices without the need of a server.

1 Like

Thanks for the reply, I have read up on it and installed it on the main linux desktop.
Some posts suggest that it does not, NOT require it(internet). Both machines are connected to the internet, when I set it up on windows and set a decent password, I get error saying my internet is down when it clearly isn’t.
Thanks for the information.

I was thinking off something samba-related and network related when I created this thread. I do not want to put anyone down, this was to exist on my-own private network.

Syncthing does not require an internet connection when devices are connected to the same local network. If you post some images or logs I might be able to help more.

If you are looking for Samba the is an Endeavouros Wiki article but I have no experience with that.

Thanks for pointing out the wiki: samba

I have followed this but ended up with errors in the terminal.

The job identifier is 1205.
Sep 19 13:30:05 Main systemd[1]: nmb.service: Main process exited, code=exited,>
â–‘â–‘ Subject: Unit process exited
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
â–‘â–‘ 
â–‘â–‘ An ExecStart= process belonging to unit nmb.service has exited.
â–‘â–‘ 
â–‘â–‘ The process' exit code is 'exited' and its exit status is 1.
Sep 19 13:30:05 Main systemd[1]: nmb.service: Failed with result 'exit-code'.
â–‘â–‘ Subject: Unit failed
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
â–‘â–‘ 
â–‘â–‘ The unit nmb.service has entered the 'failed' state with result 'exit-code'.
Sep 19 13:30:05 Main systemd[1]: Failed to start Samba NMB Daemon.
â–‘â–‘ Subject: A start job for unit nmb.service has failed
â–‘â–‘ Defined-By: systemd
â–‘â–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
â–‘â–‘ 
â–‘â–‘ A start job for unit nmb.service has finished with a failure.
â–‘â–‘ 
â–‘â–‘ The job identifier is 1205 and the job result is failed.

I don’t know who created the wiki article, great guide has sections for various DE’s I am using plasma.

–
Data

You can also use Warpinator to send/ receive files but it doesn’t support constant synchorization like Syncthing.

1 Like

I use syncthing to sync files between Linux machines, Windows machines and even Android.

HI
I like this Warpinator, available on Arch repos, installed and running, transferring files as I type, so far so good.

Was trying to get samba up and running, trying a youtube video from “EF - Linux made simple” think I have made a typo someplace setting it up.

–
Steve

I like the idea I just could not get it working!

Does it work with firewalld disabled?

Pudge

You will have to look into more details what is the source of error.
systemctl status smb.service

My vague memory say it has something to do with log files. In config (/etc/samba/smb.conf) there is this path which does not exists and samba cannot create the parent directory.

log file = /usr/local/samba/var/log.%m

Try something like

log file = /var/log/samba/smbclient_log.%m

Also this section in the guide does not look familiar

add following lines at the end of [global] section of smb.conf file then save file and exit the editor…

usershare path = /var/lib/samba/usershare
usershare max shares = 100
usershare allow guests = yes
usershare owner only = yes

I had to create a new section like:

[storage]
path = /storage/smb
writable = yes
public = yes
guest ok = yes

but you will have to search for the correct options for your use case.

syncthing works with firewalld enabled for me. And I didn’t configure a port for it separately

1 Like

warpinator works
synchting did not work for me, @sradjoker I haven’t retryed, setting up samba see below.

I am trying as at least one machine on the network is windows based to setup samba, this is failing at the moment,

❯ systemctl status smb.service
Ă— smb.service - Samba SMB Daemon
     Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Tue 2022-09-20 02:26:20 BST; 36s ago
       Docs: man:smbd(8)
             man:samba(7)
             man:smb.conf(5)
    Process: 5408 ExecStart=/usr/bin/smbd --foreground --no-process-group $SMBDOPTIONS (code=exited, st>
   Main PID: 5408 (code=exited, status=1/FAILURE)
        CPU: 22ms

Sep 20 02:26:20 Main systemd[1]: Starting Samba SMB Daemon...
Sep 20 02:26:20 Main systemd[1]: smb.service: Main process exited, code=exited, status=1/FAILURE
Sep 20 02:26:20 Main systemd[1]: smb.service: Failed with result 'exit-code'.
Sep 20 02:26:20 Main systemd[1]: Failed to start Samba SMB Daemon.

Why this is I don’t know.

I have reduced the smb.conf

[global]

# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
   workgroup = Workgroup

# server string is the equivalent of the NT Description field
   server string = Samba Server

include = /etc/samba/smb.conf
dns proxy = no 

usershare path = /var/lib/samba/usershare
usershare max shares = 100
usershare allow guests = yes
usershare owner only = yes

#============================ Share Definitions ==============================
[homes]
   comment = Home Directories
   browseable = yes
   writable = yes

[Share]
   path = ~/home/XXDataXX/Share/
   available = yes  
   valid users = data
   readonly = no
   browseable = yes
   public = yes
   writable = yes
   printable = no
   create mask = 0765

I have changed the path variable above to try and add a bit of security.
@vlkon Hoping you can help here if possible, the service is failing but I have no idea why, must be a command to give more information than above.

–
Data

I’ve found it’s actually the NMB service that you want to run, not SMB, for local networking so that Windows finds the machine. SMB is the active directory fluff emulator for Microsoft enterprise networks.
https://wiki.archlinux.org/title/Samba

and your smb.conf is trying to include itself.

Once you’ve got the smb.conf right, and you’ve added the user with smbpasswd -a username, then start the nmb service, and the windows machines should be able to find your linux box, and connect with that username and password.

Thanks for that yes I now have it working windows ->Linux
I just have to sort out the linux->windows

@onyxnz I did sus that out, I # every line and it worked, so I unhashed it line by line.

–
Data

1 Like

Linux-> Windows relies upon the windows firewall being configured correctly. By default it gets in your way.