Advertisement
thioshp

Best SMB.CONF [CINNAMON]

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