Skip to content

Instantly share code, notes, and snippets.

@osya
Last active October 4, 2015 13:08
Show Gist options
  • Save osya/7b4e7d039b8ef87bef08 to your computer and use it in GitHub Desktop.
Save osya/7b4e7d039b8ef87bef08 to your computer and use it in GitHub Desktop.
smb.conf
# 1st variant of [global] section
[global]
server string = %h server (Samba, Ubuntu)
client schannel = Yes
server schannel = Yes
map to guest = Bad User
obey pam restrictions = Yes
passdb backend = tdbsam
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
local master = No
dns proxy = No
usershare allow guests = Yes
panic action = /usr/share/samba/panic-action %d
valid users = sergant, kuza, nobody
admin users = sergant
read list = kuza
write list = sergant
# 2nd variant of [global] section
[global]
dos charset = 866
unix charset = UTF-8
display charset = UTF-8
workgroup = MIPT
netbios name = rosso
server string = Samba Server %v
interfaces = lo, eth2
bind interfaces only = yes
log file = /var/log/samba/log.%m
max log size = 50
map to guest = Bad User
socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
security = share
guest ok = yes
#restrict anonymous = no
#preferred master = no
#max protocol = NT
#ldap ssl = No
#server signing = Auto
[homes]
valid users = %S
read only = No
guest ok = Yes
browseable = No
browsable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
printable = Yes
browseable = No
[supper]
available = No
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment