[HowTo] Minimal configuration for Manjaro Samba share

Minimal configuration for Manjaro Samba share

Install samba package

Ensure the samba package is installed and the system is fully updated.

sudo pacman -Syu samba

Basic configuration

Create the config file /etc/samba/smb.conf

sudo nano /etc/samba/smb.conf

Insert the following and save the file

   workgroup = Manjaro
   server string = Samba Server
   server role = standalone server
   log file = /var/log/samba/log.%m
   max log size = 50
   guest account = nobody
   map to guest = Bad Password

   path = /srv/samba
   public = yes
   writable = yes
   printable = no

Test your config

sudo testparm /etc/samba/smb.conf

Create share and set permissions

Create the shared folder

sudo mkdir -p /srv/samba

Set permissions to any and all

sudo chmod ugo+rwx /srv/samba -R

Start the services

sudo systemctl enable --now smb nmb

Accessing the share

Linux client

Ensure you have the smbclient package installed. Open your file manager and enter the servername or IP address in a filemanager's location bar using the smb protocol


Windows client

Access the share using the filemanager and input the servername in this format - it is of course possible to use the IP address as well.


More reading

Samba on Arch Wiki

Sample Samba configuration with comments smb.conf on samba.org


Typing error

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


1 Like

I see the wiki has changed since my last read.

I don't think it is a typo - it is intentional as it refers to the log for machine - and it is copied from the sample smb.conf

# this tells Samba to use a separate log file for each machine
# that connects
   log file = /usr/local/samba/var/log.%m

I know - usually log files end with .log and in this case it consolidates listing logs by starting with log.


I copy from my working (old) smb.conf :wink:

~ >>> ls /var/log/samba/                                                                                                            
insgesamt 60K
drwx------ 4 root root 4,0K 03.10.2018 21:55 cores/
-rw-r--r-- 1 root root    0 31.01.2019 23:24
-rw-r--r-- 1 root root    0 03.10.2018 21:55 log.nmbd
-rw-r--r-- 1 root root    0 03.10.2018 21:55 log.smbd
-rw-r--r-- 1 root root    0 24.03.2019 00:00 nmbd.log
-rw-r--r-- 1 root root 7,3K 24.03.2019 00:00 nmbd.log.1
-rw-r--r-- 1 root root 7,6K 17.03.2019 00:00 nmbd.log.2
-rw-r--r-- 1 root root 7,9K 10.03.2019 00:00 nmbd.log.3
-rw-r--r-- 1 root root  13K 03.03.2019 06:57 nmbd.log.4
-rw-r--r-- 1 root root    0 31.01.2019 23:24 odroid.log
-rw-r--r-- 1 root root    0 24.03.2019 00:00 smbd.log
-rw-r--r-- 1 root root 2,5K 24.03.2019 00:00 smbd.log.1
-rw-r--r-- 1 root root 2,7K 17.03.2019 00:00 smbd.log.2
-rw-r--r-- 1 root root 2,5K 10.03.2019 00:00 smbd.log.3
-rw-r--r-- 1 root root 3,5K 03.03.2019 06:57 smbd.log.4

   workgroup = WORKGROUP
   dns proxy = no
   log file = /var/log/samba/%m.log
   max log size = 1000
   client max protocol = NT1
   server role = standalone server


Now I see where you are getting at - /log/ - fixed

Forum kindly sponsored by