Back to main index

Samba Server

For more options read the full tutorial here

Install Samba
dnf install samba samba-common samba-client
Setup the share location
mkdir -pv /var/samba
chmod -Rv 777 /var/samba
chown -Rv nobody:nobody /var/samba
chcon -u system_u -t samba_share_t -v /var/samba
Backup existing configuration
mv /etc/samba/smb.conf /etc/samba/smb.conf.bak
Edit /etc/samba/smb.conf
See example
[global]
    unix charset = UTF-8
    workgroup = SAMBA
    security = user
    map to guest = Bad User

[Public]
    path = /var/samba
    writeable = yes
    guest ok = yes
    guest only = yes
    force create mode = 777
    force directory mode = 777
Check if smb.conf is correct with:
testparm -s
Activate the services
systemctl enable smb nmb
systemctl start smb nmb
systemctl status smb nmb
Allow samba ports in firewalld
firewall-cmd --zone=public --add-service=samba --permanent
firewall-cmd --reload
firewall-cmd --list-services


Access the share on Windows with Explorer
samba windows client


Access the share on Linux with Thunar
samba linux client

Access the share on Linux terminal

sudo mount -t cifs //192.168.178.20/Public /mnt/windows_share -o username=mihai


Access the share on Android with
samba android client


To share a Private folder and protect it with a password, read the second part of the tutorial



Back to main index