Last active
June 18, 2024 13:57
-
-
Save raresteak/7837c31c83b7650dddda6af2994db09e to your computer and use it in GitHub Desktop.
Simple Samba configuration with Guest/Anonymous share access
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# smb.conf | |
# Fix seLinux perms | |
# semanage fcontext -a -t samba_share_t '/etc/samba/smb.conf' | |
# restorecon -v '/etc/samba/smb.conf' | |
[global] | |
workgroup = SAMBA | |
server role = standalone server | |
restrict anonymous = 0 | |
guest account = ftp # map guest access to a low privileged user | |
passdb backend = tdbsam | |
printing = cups | |
printcap name = cups | |
load printers = yes | |
cups options = raw | |
[homes] | |
comment = Home Directories | |
valid users = %S, %D%w%S | |
browseable = No | |
read only = No | |
inherit acls = Yes | |
# fix seLinux perms | |
# sudo semanage fcontext -a -t samba_share_t "/home(/.*)?" | |
# sudo restorecon -R -v /home | |
# add users | |
# smbpasswd -a <user> | |
[tmp] | |
path = /tmp | |
hide dot files = no | |
read only = no | |
guest ok = yes # Guest access allowed | |
browseable = yes | |
[stuff] | |
# grant permissions | |
# sudo chmod 1777 /stuff | |
# fix seLinux perms | |
# sudo semanage fcontext -a -t samba_share_t "/stuff(/.*)?" | |
# sudo restorecon -R -v /stuff | |
path = /stuff | |
comment = The good stuff | |
read only = no | |
guest ok = yes # Guest access allowed | |
browseable = yes | |
[printers] | |
comment = All Printers | |
path = /var/tmp | |
printable = Yes | |
create mask = 0600 | |
browseable = No | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment