With the advent of samba4, seems a few stuff have changed (havent really gone through the changes list). Till now used to copy previous Fedora installation’s smb.conf file. However, doing the same didnt really help creating the share.
Reverting back to the original smb.conf file (ALWAYS, ALWAYS back up conf files before making any changes!), added the hostname restriction as had mentioned in one of the previous posts. Once done, added in the “Share Definitions” section shared folder information:
[Share_Name] comment = Shared Folder path = <location> read only = no ; browseable = yes guest ok = yes
This step can also be achieved using a gui tool : system-config-samba (sudo yum / dnf install system-config-samba).
Next comes SELinux policy settings. Either using the gui policycoreutils-gui (sudo yum / dnf install policycoreutils-gui) or through terminal set the following Booleans:
- setsebool -P allow_smbd_anon_write=1
For full read / write access :
- setsebool -P samba_export_all_rw on
For only read access :
- setsebool -P samba_export_all_ro on
and Finally relabeling for the shared folder:
- chcon -t samba_share_t <path_to_shared_folder>/
And we are ALMOST done. Just install samba-client and set samba password for the user:
- smbpasswd -a <username>
Finally, restart / enable smb.service and nmb.service to ensure samba server starts at boot from next time:
- systemctl enable smb.service
- systemctl enable nmb.service
- systemctl restart smb.service
- systemctl restart nmb.service
Thats it! Enjoy samba shares on Linux and Windows from a fresh, moowing F18 system..
P.S : (1) also check if firewall allows samba connections, i.e., Firewall > Persistent Configuration > check on samba.
(2) change the permissions of the folder you want to share, i.e., chmod -R a+rwx folder_location/ .