Advertisement
Guest User

smb.conf

a guest
Aug 30th, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.18 KB | None | 0 0
  1. #
  2. # Sample configuration file for the Samba suite for Debian GNU/Linux.
  3. #
  4. #
  5. # This is the main Samba configuration file. You should read the
  6. # smb.conf(5) manual page in order to understand the options listed
  7. # here. Samba has a huge number of configurable options most of which
  8. # are not shown in this example
  9. #
  10. # Some options that are often worth tuning have been included as
  11. # commented-out examples in this file.
  12. # - When such options are commented with ";", the proposed setting
  13. # differs from the default Samba behaviour
  14. # - When commented with "#", the proposed setting is the default
  15. # behaviour of Samba but the option is considered important
  16. # enough to be mentioned here
  17. #
  18. # NOTE: Whenever you modify this file you should run the command
  19. # "testparm" to check that you have not made any basic syntactic
  20. # errors.
  21.  
  22. #======================= Global Settings =======================
  23.  
  24. [global]
  25.  
  26. ## Browsing/Identification ###
  27.  
  28. # Change this to the workgroup/NT-domain name your Samba server will part of
  29. workgroup = LOGLIMASSIMO
  30. realm = LOGLIMASSIMO.IT
  31. security = ADS
  32.  
  33. load printers = yes
  34. spoolss: architecture = Windows x64
  35.  
  36. # Important: The ranges of the default (*) idmap config
  37. # and the domain(s) must not overlap!
  38.  
  39. # Default idmap config used for BUILTIN and local accounts/groups
  40. idmap config *:backend = tdb
  41. idmap config *:range = 2000-9999
  42.  
  43. # idmap config for domain SAMDOM
  44. idmap config SAMDOM:backend = ad
  45. idmap config SAMDOM:schema_mode = rfc2307
  46. idmap config SAMDOM:range = 10000-99999
  47.  
  48. # Use settings from AD for login shell and home directory
  49. winbind nss info = rfc2307
  50.  
  51. # server string is the equivalent of the NT Description field
  52. server string = %h server (Samba, Ubuntu)
  53.  
  54. # Windows Internet Name Serving Support Section:
  55. # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
  56. # wins support = no
  57.  
  58. # WINS Server - Tells the NMBD components of Samba to be a WINS Client
  59. # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
  60. ; wins server = w.x.y.z
  61.  
  62. # This will prevent nmbd to search for NetBIOS names through DNS.
  63. dns proxy = no
  64.  
  65. #### Networking ####
  66.  
  67. # The specific set of interfaces / networks to bind to
  68. # This can be either the interface name or an IP address/netmask;
  69. # interface names are normally preferred
  70. ; interfaces = 127.0.0.0/8 eth0
  71.  
  72. # Only bind to the named interfaces and/or networks; you must use the
  73. # 'interfaces' option above to use this.
  74. # It is recommended that you enable this feature if your Samba machine is
  75. # not protected by a firewall or is a firewall itself. However, this
  76. # option cannot handle dynamic or non-broadcast interfaces correctly.
  77. ; bind interfaces only = yes
  78.  
  79.  
  80.  
  81. #### Debugging/Accounting ####
  82.  
  83. # This tells Samba to use a separate log file for each machine
  84. # that connects
  85. log file = /var/log/samba/log.%m
  86.  
  87. # Cap the size of the individual log files (in KiB).
  88. max log size = 1000
  89.  
  90. # If you want Samba to only log through syslog then set the following
  91. # parameter to 'yes'.
  92. # syslog only = no
  93.  
  94. # We want Samba to log a minimum amount of information to syslog. Everything
  95. # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
  96. # through syslog you should set the following parameter to something higher.
  97. syslog = 0
  98.  
  99. # Do something sensible when Samba crashes: mail the admin a backtrace
  100. panic action = /usr/share/samba/panic-action %d
  101.  
  102. ####### Authentication #######
  103.  
  104. # Server role. Defines in which mode Samba will operate. Possible
  105. # values are "standalone server", "member server", "classic primary
  106. # domain controller", "classic backup domain controller", "active
  107. # directory domain controller".
  108. #
  109. # Most people will want "standalone sever" or "member server".
  110. # Running as "active directory domain controller" will require first
  111. # running "samba-tool domain provision" to wipe databases and create a
  112. # new domain.
  113. server role = member server
  114.  
  115. # If you are using encrypted passwords, Samba will need to know what
  116. # password database type you are using.
  117. passdb backend = tdbsam
  118.  
  119. obey pam restrictions = yes
  120.  
  121. # This boolean parameter controls whether Samba attempts to sync the Unix
  122. # password with the SMB password when the encrypted SMB password in the
  123. # passdb is changed.
  124. unix password sync = yes
  125.  
  126. # For Unix password sync to work on a Debian GNU/Linux system, the following
  127. # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
  128. # sending the correct chat script for the passwd program in Debian Sarge).
  129. passwd program = /usr/bin/passwd %u
  130. passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
  131.  
  132. # This boolean controls whether PAM will be used for password changes
  133. # when requested by an SMB client instead of the program listed in
  134. # 'passwd program'. The default is 'no'.
  135. pam password change = yes
  136.  
  137. # This option controls how unsuccessful authentication attempts are mapped
  138. # to anonymous connections
  139. map to guest = bad user
  140.  
  141. ########## Domains ###########
  142.  
  143. #
  144. # The following settings only takes effect if 'server role = primary
  145. # classic domain controller', 'server role = backup domain controller'
  146. # or 'domain logons' is set
  147. #
  148.  
  149. # It specifies the location of the user's
  150. # profile directory from the client point of view) The following
  151. # required a [profiles] share to be setup on the samba server (see
  152. # below)
  153. ; logon path = \\%N\profiles\%U
  154. # Another common choice is storing the profile in the user's home directory
  155. # (this is Samba's default)
  156. # logon path = \\%N\%U\profile
  157.  
  158. # The following setting only takes effect if 'domain logons' is set
  159. # It specifies the location of a user's home directory (from the client
  160. # point of view)
  161. ; logon drive = H:
  162. # logon home = \\%N\%U
  163.  
  164. # The following setting only takes effect if 'domain logons' is set
  165. # It specifies the script to run during logon. The script must be stored
  166. # in the [netlogon] share
  167. # NOTE: Must be store in 'DOS' file format convention
  168. ; logon script = logon.cmd
  169.  
  170. # This allows Unix users to be created on the domain controller via the SAMR
  171. # RPC pipe. The example command creates a user account with a disabled Unix
  172. # password; please adapt to your needs
  173. ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
  174.  
  175. # This allows machine accounts to be created on the domain controller via the
  176. # SAMR RPC pipe.
  177. # The following assumes a "machines" group exists on the system
  178. ; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
  179.  
  180. # This allows Unix groups to be created on the domain controller via the SAMR
  181. # RPC pipe.
  182. ; add group script = /usr/sbin/addgroup --force-badname %g
  183.  
  184. ############ Misc ############
  185.  
  186. # Using the following line enables you to customise your configuration
  187. # on a per machine basis. The %m gets replaced with the netbios name
  188. # of the machine that is connecting
  189. ; include = /home/samba/etc/smb.conf.%m
  190.  
  191. # Some defaults for winbind (make sure you're not using the ranges
  192. # for something else.)
  193. ; idmap uid = 10000-20000
  194. ; idmap gid = 10000-20000
  195. ; template shell = /bin/bash
  196.  
  197. # Setup usershare options to enable non-root users to share folders
  198. # with the net usershare command.
  199.  
  200. # Maximum number of usershare. 0 (default) means that usershare is disabled.
  201. ; usershare max shares = 100
  202.  
  203. # Allow users who've been granted usershare privileges to create
  204. # public shares, not just authenticated ones
  205. usershare allow guests = yes
  206.  
  207. #======================= Share Definitions =======================
  208.  
  209. # Un-comment the following (and tweak the other settings below to suit)
  210. # to enable the default home directory shares. This will share each
  211. # user's home directory as \\server\username
  212. ;[homes]
  213. ; comment = Home Directories
  214. ; browseable = no
  215.  
  216. # By default, the home directories are exported read-only. Change the
  217. # next parameter to 'no' if you want to be able to write to them.
  218. ; read only = yes
  219.  
  220. # File creation mask is set to 0700 for security reasons. If you want to
  221. # create files with group=rw permissions, set next parameter to 0775.
  222. ; create mask = 0700
  223.  
  224. # Directory creation mask is set to 0700 for security reasons. If you want to
  225. # create dirs. with group=rw permissions, set next parameter to 0775.
  226. ; directory mask = 0700
  227.  
  228. # By default, \\server\username shares can be connected to by anyone
  229. # with access to the samba server.
  230. # Un-comment the following parameter to make sure that only "username"
  231. # can connect to \\server\username
  232. # This might need tweaking when using external authentication schemes
  233. ; valid users = %S
  234.  
  235. # Un-comment the following and create the netlogon directory for Domain Logons
  236. # (you need to configure Samba to act as a domain controller too.)
  237. ;[netlogon]
  238. ; comment = Network Logon Service
  239. ; path = /home/samba/netlogon
  240. ; guest ok = yes
  241. ; read only = yes
  242.  
  243. # Un-comment the following and create the profiles directory to store
  244. # users profiles (see the "logon path" option above)
  245. # (you need to configure Samba to act as a domain controller too.)
  246. # The path below should be writable by all users so that their
  247. # profile directory may be created the first time they log on
  248. ;[profiles]
  249. ; comment = Users profiles
  250. ; path = /home/samba/profiles
  251. ; guest ok = no
  252. ; browseable = no
  253. ; create mask = 0600
  254. ; directory mask = 0700
  255.  
  256. [printers]
  257. comment = All Printers
  258. browseable = yes
  259. path = /var/spool/samba
  260. printable = yes
  261. # guest ok = no
  262. # read only = yes
  263. # create mask = 0700
  264. printing = CUPS
  265.  
  266. # Windows clients look for this share name as a source of downloadable
  267. # printer drivers
  268. [print$]
  269. comment = Printer Drivers
  270. path = /var/lib/samba/printers
  271. writeable = yes
  272.  
  273. # Uncomment to allow remote administration of Windows print drivers.
  274. # You may need to replace 'lpadmin' with the name of the group your
  275. # admin users are members of.
  276. # Please note that you also need to set appropriate Unix permissions
  277. # to the drivers directory for these users to have write rights in it
  278. #write list = root, @"LOGLIMASSIMO\Domain Admins"
  279. (END)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement