Advertisement
Guest User

Untitled

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