Skip to content

Instantly share code, notes, and snippets.

@hkwi
Last active December 16, 2015 19:38
Show Gist options
  • Save hkwi/5486194 to your computer and use it in GitHub Desktop.
Save hkwi/5486194 to your computer and use it in GitHub Desktop.

Using samba on fedora

yum install samba

Use pdbedit to enable the samba user accounts. For example:

pdbedit -u kawai -a

To access user home directory, set SELinux flags (as described in smb.conf)

setsebool -P samba_enable_home_dirs on

Enable the samba service

systemctl enable smb.service
systemctl start smb.service

Without firewalld

Just stop firewalld

systemctl stop firewalld.service
# or, if you'd like to set it peremanent
systemctl disable firewalld.service

With firewalld

Set the network interface zone with NetworkManager. In the NetworkManager tool pane, there you see "Firewall zone" setting. Set it to "home" for example. The setting will be saved in ifcfg-XX script, so you can manually edit the file and add ZONE=home line.

samba service is not enabled by default in firewalld. To enable samba for a specific zone with GUI:

firewll-config

You can create a custom setting manually:

cp /usr/lib/fiewalld/zones/home.xml /etc/firewalld/zones/

Edit it and add samba service

+  <service name="samba"/>

Restart firewalld to load the configuration.

systemctl restart firewalld.service

Check samba is enabled in firewalld home zone.

firewall-cmd --list-all-zones
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment