1. #======================= Global Settings =======================
  2. [global]
  3. usershare allow guests = Yes
  4. ; socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=524288 SO_RCVBUF=524288 SO_KEEPALIVE
  5. read only = no
  6. ## Browsing/Identification ###
  7. # Change this to the workgroup/NT-domain name your Samba server will part of
  8. workgroup = WORKGROUP
  9. # server string is the equivalent of the NT Description field
  10. server string = %h server (Samba, Ubuntu)
  11. # Windows Internet Name Serving Support Section:
  12. # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
  13. wins support = yes
  14. # WINS Server - Tells the NMBD components of Samba to be a WINS Client
  15. # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
  16. ; wins server = w.x.y.z
  17. # This will prevent nmbd to search for NetBIOS names through DNS.
  18. dns proxy = no
  19. #### Networking ####
  20. # The specific set of interfaces / networks to bind to
  21. # This can be either the interface name or an IP address/netmask;
  22. # interface names are normally preferred
  23. ; interfaces = 127.0.0.0/8 eth0
  24. # Only bind to the named interfaces and/or networks; you must use the
  25. # 'interfaces' option above to use this.
  26. # It is recommended that you enable this feature if your Samba machine is
  27. # not protected by a firewall or is a firewall itself. However, this
  28. # option cannot handle dynamic or non-broadcast interfaces correctly.
  29. ; bind interfaces only = yes
  30. #### Debugging/Accounting ####
  31. # This tells Samba to use a separate log file for each machine
  32. # that connects
  33. log file = /var/log/samba/log.%m
  34. # Cap the size of the individual log files (in KiB).
  35. max log size = 1000
  36. # If you want Samba to only log through syslog then set the following
  37. # parameter to 'yes'.
  38. # syslog only = no
  39. # We want Samba to log a minimum amount of information to syslog. Everything
  40. # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
  41. # through syslog you should set the following parameter to something higher.
  42. syslog = 0
  43. # Do something sensible when Samba crashes: mail the admin a backtrace
  44. panic action = /usr/share/samba/panic-action %d
  45. ####### Authentication #######
  46. # Server role. Defines in which mode Samba will operate. Possible
  47. # values are "standalone server", "member server", "classic primary
  48. # domain controller", "classic backup domain controller", "active
  49. # directory domain controller".
  50. #
  51. # Most people will want "standalone sever" or "member server".
  52. # Running as "active directory domain controller" will require first
  53. # running "samba-tool domain provision" to wipe databases and create a
  54. # new domain.
  55. server role = standalone server
  56. # If you are using encrypted passwords, Samba will need to know what
  57. # password database type you are using.
  58. ; passdb backend = tdbsam
  59. obey pam restrictions = yes
  60. # This boolean parameter controls whether Samba attempts to sync the Unix
  61. # password with the SMB password when the encrypted SMB password in the
  62. # passdb is changed.
  63. unix password sync = yes
  64. # For Unix password sync to work on a Debian GNU/Linux system, the following
  65. # parameters must be set (thanks to Ian Kahan <<[email protected]> for
  66. # sending the correct chat script for the passwd program in Debian Sarge).
  67. passwd program = /usr/bin/passwd %u
  68. passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
  69. # This boolean controls whether PAM will be used for password changes
  70. # when requested by an SMB client instead of the program listed in
  71. # 'passwd program'. The default is 'no'.
  72. pam password change = yes
  73. # This option controls how unsuccessful authentication attempts are mapped
  74. # to anonymous connections
  75. map to guest = bad user
  76. ########## Domains ###########
  77. #
  78. # The following settings only takes effect if 'server role = primary
  79. # classic domain controller', 'server role = backup domain controller'
  80. # or 'domain logons' is set
  81. #
  82. # It specifies the location of the user's
  83. # profile directory from the client point of view) The following
  84. # required a [profiles] share to be setup on the samba server (see
  85. # below)
  86. ; logon path = \\%N\profiles\%U
  87. # Another common choice is storing the profile in the user's home directory
  88. # (this is Samba's default)
  89. # logon path = \\%N\%U\profile
  90. # The following setting only takes effect if 'domain logons' is set
  91. # It specifies the location of a user's home directory (from the client
  92. # point of view)
  93. ; logon drive = H:
  94. # logon home = \\%N\%U
  95. # The following setting only takes effect if 'domain logons' is set
  96. # It specifies the script to run during logon. The script must be stored
  97. # in the [netlogon] share
  98. # NOTE: Must be store in 'DOS' file format convention
  99. ; logon script = logon.cmd
  100. # This allows Unix users to be created on the domain controller via the SAMR
  101. # RPC pipe. The example command creates a user account with a disabled Unix
  102. # password; please adapt to your needs
  103. ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
  104. # This allows machine accounts to be created on the domain controller via the
  105. # SAMR RPC pipe.
  106. # The following assumes a "machines" group exists on the system
  107. ; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
  108. # This allows Unix groups to be created on the domain controller via the SAMR
  109. # RPC pipe.
  110. ; add group script = /usr/sbin/addgroup --force-badname %g
  111. ############ Misc ############
  112. # Using the following line enables you to customise your configuration
  113. # on a per machine basis. The %m gets replaced with the netbios name
  114. # of the machine that is connecting
  115. ; include = /home/samba/etc/smb.conf.%m
  116. # Some defaults for winbind (make sure you're not using the ranges
  117. # for something else.)
  118. ; idmap uid = 10000-20000
  119. ; idmap gid = 10000-20000
  120. ; template shell = /bin/bash
  121. # Setup usershare options to enable non-root users to share folders
  122. # with the net usershare command.
  123. # Maximum number of usershare. 0 (default) means that usershare is disabled.
  124. ; usershare max shares = 100
  125. # Allow users who've been granted usershare privileges to create
  126. # public shares, not just authenticated ones
  127. username map = /etc/samba/smbusers
  128. security = user
  129. ; encrypt passwords = yes
  130. ; guest ok = no
  131. ; guest account = nobody
  132. #======================= Share Definitions =======================
  133. # Un-comment the following (and tweak the other settings below to suit)
  134. # to enable the default home directory shares. This will share each
  135. # user's home directory as \\server\username
  136. ;[homes]
  137. ; comment = Home Directories
  138. ; browseable = no
  139. # By default, the home directories are exported read-only. Change the
  140. # next parameter to 'no' if you want to be able to write to them.
  141. ; read only = yes
  142. # File creation mask is set to 0700 for security reasons. If you want to
  143. # create files with group=rw permissions, set next parameter to 0775.
  144. ; create mask = 0700
  145. # Directory creation mask is set to 0700 for security reasons. If you want to
  146. # create dirs. with group=rw permissions, set next parameter to 0775.
  147. ; directory mask = 0700
  148. # By default, \\server\username shares can be connected to by anyone
  149. # with access to the samba server.
  150. # Un-comment the following parameter to make sure that only "username"
  151. # can connect to \\server\username
  152. # This might need tweaking when using external authentication schemes
  153. ; valid users = %S
  154. # Un-comment the following and create the netlogon directory for Domain Logons
  155. # (you need to configure Samba to act as a domain controller too.)
  156. ;[netlogon]
  157. ; comment = Network Logon Service
  158. ; path = /home/samba/netlogon
  159. ; guest ok = yes
  160. ; read only = yes
  161. # Un-comment the following and create the profiles directory to store
  162. # users profiles (see the "logon path" option above)
  163. # (you need to configure Samba to act as a domain controller too.)
  164. # The path below should be writable by all users so that their
  165. # profile directory may be created the first time they log on
  166. ;[profiles]
  167. ; comment = Users profiles
  168. ; path = /home/samba/profiles
  169. ; guest ok = no
  170. ; browseable = no
  171. ; create mask = 0600
  172. ; directory mask = 0700
  173. [printers]
  174. comment = All Printers
  175. browseable = no
  176. path = /var/spool/samba
  177. printable = yes
  178. ; guest ok = no
  179. ; read only = yes
  180. create mask = 0700
  181. # Windows clients look for this share name as a source of downloadable
  182. # printer drivers
  183. [print$]
  184. comment = Printer Drivers
  185. path = /var/lib/samba/printers
  186. ; browseable = yes
  187. ; read only = yes
  188. ; guest ok = no
  189. # Uncomment to allow remote administration of Windows print drivers.
  190. # You may need to replace 'lpadmin' with the name of the group your
  191. # admin users are members of.
  192. # Please note that you also need to set appropriate Unix permissions
  193. # to the drivers directory for these users to have write rights in it
  194. ; write list = root, @lpadmin
  195. [Téléchargements]
  196. path = /home/marco/Téléchargements
  197. writeable = yes
  198. ; browseable = yes
  199. guest ok = yes
  200. [Documents]
  201. path = /home/marco/Documents
  202. writeable = yes
  203. ; browseable = yes
  204. guest ok = yes