Cookbooks
samba
documentation
Samba Server

samba_server

Installs and configures Samba server

NameTypeDefaultAllowed ValuesDescription
server_stringStringName of the server
workgroupString'SAMBA'The SMB workgroup to use
interfacesString'lo 127.0.0.1'Interfaces to listen on
hosts_allowString'127.0.0.0/8'Allowed hosts/networks
bind_interfaces_onlytrue, falsefalsetrue falseLimit interfaces to serve SMB
load_printerstrue, falsefalsetrue falseWhether to load printers
passdb_backendString'tdbsam''ldapsam' 'tdbsam' 'smbpasswd'Which password backend to use
dns_proxytrue, falsefalsetrue falseWhether to search NetBIOS names through DNS
securityString'user''user' 'domain' 'ADS' 'share' 'server'Samba security mode
map_to_guestString'Bad User'What Samba should do with logins that do not match Unix users
realmStringKerberos realm to use
kerberos_methodString'secrets only'See resource for full listHow kerberos tickets are verified
password_serverString'*'Use a specific remote server for auth
encrypt_passwordstrue, falsetruetrue falseWhether to negotiate encrypted passwords
log_levelString, Integer'0'Sets the logging level from 0-10
winbind_separatorString\The character used when listing a username of the form of DOMAIN \user
idmap_configStringDefine the mapping between SIDS and Unix users and groups
socket_optionsString, Integer'TCP_NODELAY'See resource for full listOptions for connection tuning
log_dirString,Platform specific valueLocation of Samba logs
max_log_sizeString, Integer5000Maximum log file size
optionsHashHash of additional options
config_fileString'/etc/samba/smb.conf'Location of Samba configuration'
samba_servicesArrayPlatform specific valueAn array of services to start

Examples

samba_server 'samba server' do
  workgroup 'FOXTROT'
  interfaces 'lo 192.168.0.1'
  hosts_allow '192.168.0.0/8'
  passdb_backend 'smbpasswd'
  security 'domain'
  options { 'unix charset' => 'UTF8' }
end