1.8 KiB
1.8 KiB
Ressources
Intro
As is often the case the Arch Wiki has a fantactically detailed entry on setting up and configuring a samba server.
Simple Config
Login at the server which should act as the samba server.
- First, install samba:
yum check-update && yum install samba
- Next, modify/create a file at
/etc/samba/smb.confwith the following contents (adapt this for your needs):
[global]
workgroup = SAMBA
server string = petar
security = user
guest ok = yes
map to guest = Bad Password
log file = /var/log/samba/%m.log
max log size = 50
printcap name = /dev/null
load printers = no
# Install samba-usershares package for support
include = /etc/samba/usershares.conf
[Share]
comment = Folder to share
path = /path/to/share
browseable = yes
read only = no
guest ok = no
- Samba requires setting a password separately from that used for login. You may use an existing user or create a new one for this purpose.
smbpasswd -a sbxadmin
- Existing samba users can be listed with:
pdbedit -L -v
- Once finished, ensure the samba service is restarted with:
systemctl restart smbd
Security config on server
Firewalld
- CentOS uses as standard local firewall
firewalld.
firewall-cmd --permanent --add-service={samba,samba-client,samba-dc} --zone=public
SELinux
SELinux not allow samba to access folders by default, to solve this, run:
setsebool -P samba_export_all_ro 1
Client
Depends on client OS. Just use Windows. Noob!