Configure Samba to have a shared folder

Hi everyone, I would like to configure Samba to share a folder with my other operating systems, windows11 and arch, although preferably it’s fine just between W11 and EOS.

I’m a newbie to linux, and to EOS. I tried to follow this guide here on the forum, but without success:

What I have at the moment is samba installed, a smb.conf file, which a friend wrote to me because I wasn’t able to create it, and I manually placed it in the /etc/samba folder.

I would basically like to have the Public folder (/home/username/Public) active so I can exchange files between the various operating systems.

Could you help me understand how to take it one step at a time, without me getting into trouble? XD

This is my smb.conf file:

[global]
........
# Configure correct UTP 
 unix charset = UTF-8 
# Change this to the workgroup/NT-domain name your Samba server will be part of 
  workgroup = WORKGROUP 
  server min protocol = NT1
  ntlm auth = yes
  netbios name = sermor-endeavourpc
  security = user
  #interfaces = 127.0.0.0/8 eth0 
  bind interfaces only = yes

# add at the end
[Pubblici]
   comment = EndeavourOS File Share
   path = /home/sermor/Pubblici
   browsable = yes
   writable = yes
   guest ok = yes
   read only = no
   create mode = 0777
   directory mode = 0777
   force user = nobody

My system:

[sermor@sermor-endeavourpc ~]$  inxi -v7azy
System:
  Kernel: 6.6.8-arch1-1 arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc available: hpet,acpi_pm
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux
    root=UUID=3a9139f8-cba1-4093-9a94-ff596677e1eb rw rootflags=subvol=@
    nowatchdog nvme_load=YES loglevel=3
  Desktop: KDE Plasma v: 5.27.10 tk: Qt v: 5.15.11 wm: kwin_x11 vt: 2
    dm: SDDM Distro: EndeavourOS base: Arch Linux
Machine:
  Type: Desktop Mobo: ASUSTeK model: PRIME X570-P v: Rev X.0x
    serial: <superuser required> UEFI: American Megatrends v: 5003
    date: 10/07/2023
Battery:
  Device-1: gip0.0 model: Microsoft X-Box One pad serial: N/A
    charge: 50% (should be ignored) rechargeable: yes status: not charging
  Device-2: hidpp_battery_0 model: Logitech Marathon Mouse/Performance Plus
    M705 serial: <filter> charge: 55% (should be ignored) rechargeable: yes
    status: discharging
  Device-3: hidpp_battery_1 model: Logitech Wireless Keyboard
    serial: <filter> charge: 55% (should be ignored) rechargeable: yes
    status: discharging
Memory:
  System RAM: total: 64 GiB note: est. available: 62.71 GiB
    used: 5.01 GiB (8.0%)
  RAM Report: permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: AMD Ryzen 7 5700X bits: 64 type: MT MCP arch: Zen 3+ gen: 4
    level: v3 note: check built: 2022 process: TSMC n6 (7nm) family: 0x19 (25)
    model-id: 0x21 (33) stepping: 2 microcode: 0xA20120E
  Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
    L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 4 MiB desc: 8x512 KiB L3: 32 MiB
    desc: 1x32 MiB
  Speed (MHz): avg: 2200 min/max: 2200/4662 boost: enabled scaling:
    driver: acpi-cpufreq governor: schedutil cores: 1: 2200 2: 2200 3: 2200
    4: 2200 5: 2200 6: 2200 7: 2200 8: 2200 9: 2200 10: 2200 11: 2200 12: 2200
    13: 2200 14: 2200 15: 2200 16: 2200 bogomips: 108836
  Flags: 3dnowprefetch abm adx aes aperfmperf apic arat avic avx avx2 bmi1
    bmi2 bpext cat_l3 cdp_l3 clflush clflushopt clwb clzero cmov cmp_legacy
    constant_tsc cpb cpuid cqm cqm_llc cqm_mbm_local cqm_mbm_total
    cqm_occup_llc cr8_legacy cx16 cx8 de debug_swap decodeassists erms extapic
    extd_apicid f16c flushbyasid fma fpu fsgsbase fsrm fxsr fxsr_opt ht
    hw_pstate ibpb ibrs ibs invpcid irperf lahf_lm lbrv lm mba mca mce
    misalignsse mmx mmxext monitor movbe msr mtrr mwaitx nonstop_tsc nopl npt
    nrip_save nx ospke osvw overflow_recov pae pat pausefilter pclmulqdq
    pdpe1gb perfctr_core perfctr_llc perfctr_nb pfthreshold pge pku pni popcnt
    pse pse36 rapl rdpid rdpru rdrand rdseed rdt_a rdtscp rep_good sep sha_ni
    skinit smap smca smep ssbd sse sse2 sse4_1 sse4_2 sse4a ssse3 stibp succor
    svm svm_lock syscall tce topoext tsc tsc_scale umip user_shstk v_spec_ctrl
    v_vmsave_vmload vaes vgif vmcb_clean vme vmmcall vpclmulqdq wbnoinvd wdt
    x2apic xgetbv1 xsave xsavec xsaveerptr xsaveopt xsaves
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow mitigation: Safe RET
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: always-on, RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT]
    vendor: Sapphire driver: amdgpu v: kernel arch: RDNA-2 code: Navi-2x
    process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 4 speed: 16 GT/s lanes: 16
    ports: active: HDMI-A-1 empty: DP-1,DP-2,DP-3 bus-ID: 0a:00.0
    chip-ID: 1002:73df class-ID: 0300
  Display: x11 server: X.Org v: 21.1.10 with: Xwayland v: 23.2.3
    compositor: kwin_x11 driver: X: loaded: amdgpu unloaded: modesetting,radeon
    alternate: fbdev,vesa dri: radeonsi gpu: amdgpu display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93")
  Monitor-1: HDMI-A-1 mapped: HDMI-A-0 model: VG258 serial: <filter>
    built: 2021 res: 1920x1080 dpi: 90 gamma: 1.2 size: 544x303mm (21.42x11.93")
    diag: 623mm (24.5") ratio: 16:9 modes: max: 1920x1080 min: 720x400
  API: EGL v: 1.5 hw: drv: amd radeonsi platforms: device: 0 drv: radeonsi
    device: 1 drv: swrast surfaceless: drv: radeonsi x11: drv: radeonsi
    inactive: gbm,wayland
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 23.3.1-arch1.1
    glx-v: 1.4 direct-render: yes renderer: AMD Radeon RX 6750 XT (radeonsi
    navi22 LLVM 16.0.6 DRM 3.54 6.6.8-arch1-1) device-ID: 1002:73df
    memory: 11.72 GiB unified: no
  API: Vulkan v: 1.3.274 layers: 7 device: 0 type: discrete-gpu name: AMD
    Radeon RX 6750 XT (RADV NAVI22) driver: mesa radv v: 23.3.1-arch1.1
    device-ID: 1002:73df surfaces: xcb,xlib
Audio:
  Device-1: AMD Navi 21/23 HDMI/DP Audio driver: snd_hda_intel v: kernel pcie:
    gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 0a:00.1 chip-ID: 1002:ab28
    class-ID: 0403
  Device-2: AMD Starship/Matisse HD Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 0c:00.4 chip-ID: 1022:1487 class-ID: 0403
  Device-3: HP OMEN Blast Headset driver: hid-generic,snd-usb-audio,usbhid
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-4:3
    chip-ID: 03f0:4941 class-ID: 0300 serial: <filter>
  API: ALSA v: k6.6.8-arch1-1 status: kernel-api
    tools: alsactl,alsamixer,amixer
  Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
  Server-2: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: ASUSTeK PRIME B450M-A driver: r8169 v: kernel pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 port: f000 bus-ID: 04:00.0 chip-ID: 10ec:8168
    class-ID: 0200
  IF: enp4s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: global
  IP v6: <filter> type: noprefixroute scope: link
  WAN IP: <filter>
Bluetooth:
  Message: No bluetooth data found.
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 14.55 TiB used: 1.07 TiB (7.4%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: SSD 980 PRO 2TB
    size: 1.82 TiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: 5B2QGXA7 temp: 36.9 C
    scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Western Digital model: WD60EFZX-68B3FN0
    size: 5.46 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    tech: HDD rpm: 5640 serial: <filter> fw-rev: 0A81 scheme: GPT
  ID-3: /dev/sdb maj-min: 8:16 vendor: Samsung model: SSD 870 QVO 4TB
    size: 3.64 TiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 2B6Q scheme: GPT
  ID-4: /dev/sdc maj-min: 8:32 vendor: Samsung model: SSD 870 EVO 2TB
    size: 1.82 TiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 2B6Q scheme: GPT
  ID-5: /dev/sdd maj-min: 8:48 vendor: Samsung model: SSD 860 QVO 1TB
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 2B6Q scheme: GPT
  ID-6: /dev/sde maj-min: 8:64 vendor: Samsung model: SSD 870 QVO 1TB
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 2B6Q scheme: GPT
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 3.64 TiB size: 3.64 TiB (100.00%) used: 1.07 TiB (29.5%)
    fs: btrfs dev: /dev/sdb2 maj-min: 8:18 label: endeavouros
    uuid: 3a9139f8-cba1-4093-9a94-ff596677e1eb
  ID-2: /boot/efi raw-size: 1000 MiB size: 998 MiB (99.80%)
    used: 27.2 MiB (2.7%) fs: vfat dev: /dev/sdb1 maj-min: 8:17 label: N/A
    uuid: 0706-DC58
  ID-3: /home raw-size: 3.64 TiB size: 3.64 TiB (100.00%)
    used: 1.07 TiB (29.5%) fs: btrfs dev: /dev/sdb2 maj-min: 8:18
    label: endeavouros uuid: 3a9139f8-cba1-4093-9a94-ff596677e1eb
  ID-4: /var/cache raw-size: 3.64 TiB size: 3.64 TiB (100.00%)
    used: 1.07 TiB (29.5%) fs: btrfs dev: /dev/sdb2 maj-min: 8:18
    label: endeavouros uuid: 3a9139f8-cba1-4093-9a94-ff596677e1eb
  ID-5: /var/log raw-size: 3.64 TiB size: 3.64 TiB (100.00%)
    used: 1.07 TiB (29.5%) fs: btrfs dev: /dev/sdb2 maj-min: 8:18
    label: endeavouros uuid: 3a9139f8-cba1-4093-9a94-ff596677e1eb
Swap:
  Alert: No swap data was found.
Unmounted:
  ID-1: /dev/nvme0n1p1 maj-min: 259:1 size: 16 MiB fs: <superuser required>
    label: N/A uuid: N/A
  ID-2: /dev/nvme0n1p2 maj-min: 259:2 size: 1.82 TiB fs: ntfs label: OS
    uuid: 14FF8B7A4851E3D0
  ID-3: /dev/sda1 maj-min: 8:1 size: 16 MiB fs: <superuser required>
    label: N/A uuid: N/A
  ID-4: /dev/sda2 maj-min: 8:2 size: 5.46 TiB fs: ntfs label: STORAGE
    uuid: C256EB3656EB29BD
  ID-5: /dev/sdc1 maj-min: 8:33 size: 512 MiB fs: vfat label: N/A
    uuid: B014-3A39
  ID-6: /dev/sdc2 maj-min: 8:34 size: 1.82 TiB fs: btrfs label: N/A
    uuid: 2a6bb5b3-7f93-4395-89d3-da2d4b1c751f
  ID-7: /dev/sdd1 maj-min: 8:49 size: 931.51 GiB fs: ntfs
    label: SSD SECONDARY uuid: DC0265EF0265CF58
  ID-8: /dev/sde1 maj-min: 8:65 size: 931.51 GiB fs: ntfs
    label: LINUX STORAGE uuid: 267551946004129A
USB:
  Hub-1: 1-0:1 info: hi-speed hub with single TT ports: 6 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 1d6b:0002
    class-ID: 0900
  Device-1: 1-3:2 info: Seiko Epson ET-2850 Series type: printer
    driver: usblp interfaces: 5 rev: 2.0 speed: 480 Mb/s (57.2 MiB/s) lanes: 1
    mode: 2.0 power: 2mA chip-ID: 04b8:118b class-ID: 0701 serial: <filter>
  Device-2: 1-4:3 info: HP OMEN Blast Headset type: audio,HID
    driver: hid-generic,snd-usb-audio,usbhid interfaces: 4 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 power: 100mA
    chip-ID: 03f0:4941 class-ID: 0300 serial: <filter>
  Device-3: 1-5:4 info: Nacon Evol-X type: <vendor specific>
    driver: xone-wired interfaces: 2 rev: 2.0 speed: 12 Mb/s (1.4 MiB/s) lanes: 1
    mode: 1.1 power: 500mA chip-ID: 3285:0663 class-ID: ff00 serial: <filter>
  Hub-2: 1-6:5 info: Terminus Hub ports: 4 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 power: 100mA
    chip-ID: 1a40:0101 class-ID: 0900
  Hub-3: 1-6.1:6 info: Terminus Hub ports: 4 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 power: 100mA
    chip-ID: 1a40:0101 class-ID: 0900
  Device-1: 1-6.1.3:8 info: Logitech Unifying Receiver
    type: keyboard,mouse,HID driver: logitech-djreceiver,usbhid interfaces: 3
    rev: 2.0 speed: 12 Mb/s (1.4 MiB/s) lanes: 1 mode: 1.1 power: 98mA
    chip-ID: 046d:c52b class-ID: 0300
  Device-2: 1-6.2:7 info: Logitech Unifying Receiver type: keyboard,mouse
    driver: logitech-djreceiver,usbhid interfaces: 2 rev: 2.0
    speed: 12 Mb/s (1.4 MiB/s) lanes: 1 mode: 1.1 power: 98mA
    chip-ID: 046d:c534 class-ID: 0301
  Hub-4: 2-0:1 info: super-speed hub ports: 4 rev: 3.1
    speed: 10 Gb/s (1.16 GiB/s) lanes: 1 mode: 3.2 gen-2x1 chip-ID: 1d6b:0003
    class-ID: 0900
  Hub-5: 3-0:1 info: hi-speed hub with single TT ports: 6 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 1d6b:0002
    class-ID: 0900
  Device-1: 3-6:2 info: ASUSTek AURA LED Controller type: HID
    driver: hid-generic,usbhid interfaces: 2 rev: 2.0 speed: 12 Mb/s (1.4 MiB/s)
    lanes: 1 mode: 1.1 power: 16mA chip-ID: 0b05:18f3 class-ID: 0300
    serial: <filter>
  Hub-6: 4-0:1 info: super-speed hub ports: 4 rev: 3.1
    speed: 10 Gb/s (1.16 GiB/s) lanes: 1 mode: 3.2 gen-2x1 chip-ID: 1d6b:0003
    class-ID: 0900
  Hub-7: 5-0:1 info: hi-speed hub with single TT ports: 4 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 1d6b:0002
    class-ID: 0900
  Hub-8: 6-0:1 info: super-speed hub ports: 4 rev: 3.1
    speed: 10 Gb/s (1.16 GiB/s) lanes: 1 mode: 3.2 gen-2x1 chip-ID: 1d6b:0003
    class-ID: 0900
Sensors:
  System Temperatures: cpu: 35.5 C mobo: N/A gpu: amdgpu temp: 33.0 C
    mem: 26.0 C
  Fan Speeds (rpm): N/A gpu: amdgpu fan: 0
Info:
  Processes: 373 Uptime: 28m wakeups: 0 Init: systemd v: 255 default: graphical
  tool: systemctl Compilers: gcc: 13.2.1 clang: 16.0.6 Packages: pm: pacman
  pkgs: 1654 libs: 406 tools: octopi,pamac,yay pm: flatpak pkgs: 0 Shell: Bash
  v: 5.2.21 running-in: konsole inxi: 3.3.31

A thousand thanks.

PS: the command in the guide I linked “sudo leafpad /etc/samba/smb.conf” doesn’t work for me, the terminal tells me leafpad command not found or something similar.

PPS: I have the firewall active, and I use firewalld, which I believe is what is installed by default when installing EOS.

I don’t know if this helps but you want to share the public file and in your conf file you have it spelled pubblici.Also on firewalld you will have to allow it to to be able to have files shared.

Can´t help you with Samba (I’m a nfs man myself) but as to leafpad: it’s a text editor. You can use nano, vim, mousepad, kate or any other comparable text editor in stead.

Edit: typo’s.

If your using plasma you can just type your changes click save and it will ask for your password just enter it and it should save.

Ok, thanks. sudo nano works.

For the rest, a different firewall is used in the guide, or at least with a different interface. I need to enable samba from the firewall, and add the rules for smb.conf. The problem is that I don’t know where to look to create this rule for smb that is mentioned in the guide (for samba, it seems that you have to enable it in the home section, at least from what you can see in the image).

Furthermore, in the images for the Windows configuration, he enters an IP address that I don’t have, I imagine it is obtained by configuring Samba and SMB probably, but in any case at the moment I don’t have this IP address and I don’t know how to get it.

As I stated i don’t know about samba, but you’d expect to have to use an IP address of the server you want to connect to, and an IP address of the machine that needs to connect to the server (the client). You also need to find the port number that samba is using.
The firewall needs to know that it needs to allow traffic between these addresses over these ports.

That’s in very generic terms what I expect you need to do.

Perhaps this is more helpful:

Thanks for the guide, but maybe I’m too inexperienced to know how to operate. My problem is right there: knowing the IP address. In the case of the guide I posted in the open post (which is 3 years old anyway), the IP address of the folder to be shared (which I don’t have and haven’t understood how to obtain).

you can open a terminal and type
ip a
this will give you the information about your network including IP Address. For windows maybe someone who uses it can chime in but if memory serves me i think it was ipconfig or something similar its been a long time since i have even looked at Windows much less used it.

Thanks, I will also try on windows.

Meanwhile, what I get on eos is this:

[sermor@sermor-endeavourpc ~]$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute 
       valid_lft forever preferred_lft forever
2: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 50:eb:f6:5c:20:1b brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.227/24 brd 192.168.1.255 scope global dynamic noprefixroute enp4s0
       valid_lft 85158sec preferred_lft 85158sec
    inet6 2001:b07:6462:a871:9ce8:3fb3:49b2:d377/64 scope global noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fe80::e0c5:4c34:9fbb:e305/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

the ip address (V 4) for your EndeavourOS system

Thanks!