I’m trying to setup sharing between computers. I had an attempt about 4 years ago but it was all to hard and I gave up. Recently when I was transferring files using a thunbdrive, I thought I really should try and setup basic networking!
I google networking Manjaro linux and found out that there are many different ways of doing it (like SSH, Samba, FTP, rsync, nemo file manager, and more…)
To narrow down the choices I list my devices and expectations:
Minimum security, I will be the only one accessing files
Initially I just like to network 2 computers (a laptop and a desktop) that are both running Manjaro Cinnamon edition
I need the network to work in both direction from each computer and not limited to a special ‘Share’ folder. At least the entire home folder (and all sub-folder) should be accessible
The computers are connected to a router (Fritz!Box 730 az) over lan
As mentioned I use the ‘Cinnamon’ edition, Nemo is my default file manager and it does have a network tab That’s how I expect to access network files.
My partner uses Windows 10/11 pcs It would be nice if they can also be access but not essential. Also my partner would not want to install anything on her system.
What can you suggest? Thanks
This alone already suggests that the only viable solution would be to use Samba. The Samba client is installed by default in Manjaro, and allows you to connect to a Windows server — provided that everything’s properly configured, of course.
And likewise, you can set up your GNU/Linux machines as emulated Windows servers, so that your partner can access either of them from her Windows machine. You will then of course need to install the samba package if it’s not installed already — it includes the server side of the SMB protocol.
I seem to be missing some basic knowledge - trying to setup simple networking between 2 Linux computer is like trying to do gene splicing without having studied biology?!
When I asked for suggestions/help to setup basic networking, I admit I was hoping for more than just links to Samba wiki and man page. I have read a lot of it several times as well as other post/articles as well, but still I can’t get my head around it.
Heres what I have done/established so far for both computers:
I fixed the IP address for both computer (I did that in the router settings)
I checked that Samba (smbclient) is installed - it is
Also installed is: gvfs-smb, python-pysmbc, manjaro-settings-samba
I checked that the firewall is on. there are currently no rules. under report I can see that the ip of the computer is listed next to udp 137 and 138
in users/groups, I added sambashare to my user. Groups in my user are: autologin, ip, network, sambashare, sys, vboxuser, wheel
I do have a smb.conf with the following content.
[global]
workgroup = WORKGROUP
dns proxy = no
log file = /var/log/samba/%m.log
max log size = 1000
client min protocol = SMB2
server role = standalone server
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
pam password change = yes
map to guest = Bad Password
usershare allow guests = yes
name resolve order = lmhosts bcast host wins
security = user
guest account = nobody
usershare path = /var/lib/samba/usershare
usershare max shares = 100
usershare owner only = yes
force create mode = 0070
force directory mode = 0070
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
show add printer wizard = no
[homes]
comment = Home Directories
browseable = no
read only = yes
create mask = 0700
directory mask = 0700
valid users = %S
[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = no
read only = yes
create mask = 0700
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no
I believe this file has been generated by installing ‘manjaro-settings-samba’ and may need editing?
well that’s where i’m at and I’m not sure where to from here
OK after looking at many youtube videos and reading many posts, I finally managed to get Samba to work for me. I’m able to access the ‘Home’ folder (and all the folders/files within) from laptop to desktop and vice-versa.
I do however still have an issue trying to share a separate partition on the laptop computer.
When I initially installed Manjaro on the laptop I partitioned the single SSD as follow:
sda1 = boot/efi
sda2 = root
sda3 = swap
sda4 = home
sda5 = data laptop
It’s sda5 ‘data laptop’ that I have an issue with. It is permanently mounted and accessable from nemo on the laptop. I modified smb.conf to share it
[global]
workgroup = WORKGROUP
dns proxy = no
log file = /var/log/samba/%m.log
max log size = 1000
client min protocol = SMB2
server role = standalone server
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
pam password change = yes
map to guest = Bad Password
usershare allow guests = yes
name resolve order = lmhosts bcast host wins
security = user
guest account = nobody
usershare path = /var/lib/samba/usershare
usershare max shares = 100
usershare owner only = yes
force create mode = 0070
force directory mode = 0070
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
show add printer wizard = no
[homes]
comment = Home Directories
browseable = yes
read only = no
create mask = 0700
directory mask = 0700
valid users = %S
[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = no
read only = yes
create mask = 0700
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no
[Data Laptop]
comment = Data Laptop
path = /mnt/data laptop
browsable = yes
read only = no
create mask = 0700
directory mask = 0700
In the ‘data laptop’ section, I tried with “valid users = %S” or “valid users = my user-name”
(please note: my ‘user-name’ and my ‘password’ is the same for ‘root’ and ‘samba’)
When I try to set this folder to share in ‘Nemo file manager’ /data laptop/properties/Share tab/Share this folder - I get this error message:
The permissions for Wrong number of arguments prevent other users from accessing this share
Any idea where I when wrong? This folder (on sda5) is also the destination for ‘Timeshift’s’ files that are owned by ‘root’ could that cause the issue?? thanks
Well, the space in this path isn’t doing you any favours.
For what it’s worth, this is how I’ve shared a “Public” directory beneath the /home heirarchy;
[public]
comment = Public
path = /home/public
browseable = yes
writable = yes
guest ok = no
read only = no
valid users = @sambashare
This allows anyone in the sambashare group to access the share, provided everything else is configured.
I suggest a change in [Global];
client min protocol = SMB3
Make sure each Windows client is also using SMB3 protocol; Windows 10/11 should be already, but if not, look for “Turn Windows features on or off”, select SMB Direct, and reboot Windows.
It will likely be a good idea (on each Windows machine) to enter your samba user credentials in “Credential Manager”.
OK I changed the name to ‘Datalaptop’ I also added the same name as the ‘Label’ in Gparted so regardless of what samba looks for to ID the share, it will see the same name. After I did that (and restarted) I could set this folder to share without getting an error message - so looks like samba does not like white space in a share name.
To give myself the maximum chance of success I ticked both:
‘Allow others to create and delete files in this folder’
‘Guest access (for people without a user account)’
Also as per your suggestion I set ‘client min protocol’ to SMB3 in the global section (on both computers).
After those changes I can still share the ‘Home’ folders from 1 computer to the other as I could before so that’s good, but I still can’t get ‘Datalaptop’ to work.
As per your suggestion I added “valid users = @sambashare” (I also tried @myuser and @nobody). I also added guest ok = yes
[Datalaptop]
comment = Datalaptop
path = /mnt/Datalaptop
browseable = yes
read only = no
guest ok = yes
create mask = 0700
directory mask = 0700
valid user = @sambashare
When I try to access this share from the desktop computer using ‘nemo gui file manager’ File/Connect to Server. I get a window with the following fields:
Server details:
Server: IP address
Port: (greyed out)
Type: Windows share (dropdown box with options - SSH, FTP (with login), Public FTP, Windows share)
Share: Datalaptop (share name)
Folder: mnt/Datalaptop (path)
User Details:
Domain name: WORKGROUP
User name: myusername
Password: myuserpassword
Please note: myuserpassword is the same for myusername and sambashare.
on first click ‘continue’ I get the message: Please verify your user details
on second click I get the message: Failed to mount Windows share: No such file or directory
Thanks for the link, but (correct me if I’m wrong) ‘Cockpit’ does its things over the internet? I like to keep the sharing within my home network (over Cat5 cables not WiFi) for security and privacy reasons.
As i said ‘Home’ directories (and all sub-directories/files) are sharing fine from each computer in both direction - so I think it’s just a small little setting somewhere that’s stopping my Data partition to share?? I had a look at the ‘fstab’ file on the laptop and it looks like the ‘Data’ partition is listed 3 times (line 13,14,15) could that cause an issue?
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=37F9-A99D /boot/efi vfat umask=0077 0 2
UUID=e7e26554-6ed4-4fdd-9199-9a668fb9b9b8 / ext4 defaults,noatime 0 1
UUID=37338d05-938e-4731-bbc2-9fbad238f95d swap swap defaults,noatime 0 0
UUID=b0754fb2-d51e-4a02-9349-adc0b10ac951 /home ext4 defaults,noatime 0 2
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
LABEL=Data\040laptop /mnt/Data\040laptop auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-partlabel/DataLaptop /mnt/DataLaptop auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/7ea830f5-8c38-4bce-988a-8f3e2b076d7a /mnt/7ea830f5-8c38-4bce-988a-8f3e2b076d7a auto nosuid,nodev,nofail,x-gvfs-show 0 0
Does that fstab look OK to you?
I have read somewhere that Samba shares can be “flaky”?
It is true you use a browser to configure the setup but there is no internet involved only local network.
You access the administrative interface using the systems network address e.g. 192.168.1.10:9090 and that is all there is to it.
It works much the same way you can configure your printer using a browser application.
It can be fairly easy to setup - but reading guides on the internet will only complicate your efforts - mostly because the guides you read has not all been written by users who understand what they are doing - they are well intended - but complicates matters by adding settings which may be irrelevant for your setup.
I have written a step by step guide for simple office setup
That was a typo when I type the post - It is spelled with an ‘s’ in smb.conf
Changed that entry in fstab
Alas it made no difference! it keeps telling me: 'Please verify your user details!?
The user details are correct - they worked fine for sharing the ‘Home’ folder???
it’s a mystery why it does not work!
That depends on what you mean with “flaky” but if you update your system and kernel is updated or samba is updated - you will need to restart your system otherwise the sharing may fail.
When you have nofail in fstab there is no guarantee the path is available.
Possibly why you get the File Not Found message
If the device is a fixed device you should mount it at boot but if the device is a removable device you have an issue if the device is not available - your system will boot - but your share will fail.
When the path is mounted by the system it is mounted by root and permissions will reflect the fact. The permissions on the file system does not change because samba defines it otherwise.
If you want the mount location to be writable you will need to change permissions on the folder.
If the permissions is limited to your user - you can do
Even if you have defined the smb share DataLaptop as readwrite the filesystem will prevent write access if the mount point permissions do not allow it.
Hi just seen your reply - when I first got the notification, I only seen your reply above this sentence?
I quickly read your post and I can see there are 2 parts to it The mounting of the partition and the sharing (over the network) of that partition.
I also tied to separate those 2 to see if the issue is with the Mounting or the Sharing. to that effect, I create a folder ‘Data’ under /mnt/ without mounting the partition
I tried to simply share this empty folder, but as before I get the same message/error in Nemo (file/ connect to server/ enter all the details in the window) “Please verify your user details” When I click ‘continue’ I get “Failed to mount windows share: No such file or directory”
Anyway I will read and try to follow your instruction and get back here