Advertisement
Guest User

smb ubuntu

a guest
Sep 3rd, 2014
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.23 KB | None | 0 0
  1. # This is the main Samba configuration file. You should read the
  2. # smb.conf(5) manual page in order to understand the options listed
  3. # here. Samba has a huge number of configurable options (perhaps too
  4. # many!) most of which are not shown in this example
  5. #
  6. # Any line which starts with a ; (semi-colon) or a # (hash)
  7. # is a comment and is ignored. In this example we will use a #
  8. # for commentry and a ; for parts of the config file that you
  9. # may wish to enable
  10. #
  11. # NOTE: Whenever you modify this file you should run the command "testparm"
  12. # to check that you have not made any basic syntactic errors.
  13. #
  14. #======================= Global Settings =====================================
  15. [global]
  16.  
  17. # workgroup = NT-Domain-Name or Workgroup-Name
  18. workgroup = camilo
  19. netbios name = mdcsrvsmb4
  20. ;vfs objects = recycle
  21. ;recycle:keeptree = yes
  22. ;recycle:versions = yes
  23. ; recycle:repository = /samba/Lixeira/%U
  24. ; recycle:exclude = *.tmp, *.log, *.obj, ~*.*, *.bak, *.iso
  25. ; recycle:exclude_dir = tmp, cache
  26.  
  27. # server string is the equivalent of the NT Description field
  28. server string = Camilo Samba Server
  29. # This option is important for security. It allows you to restrict
  30. # connections to machines which are on your local network. The
  31. # following example restricts access to two C class networks and
  32. # the "loopback" interface. For more examples of the syntax see
  33. # the smb.conf man page
  34. ; hosts allow = 192.168.0.0\24 172.16.2.0\24
  35.  
  36. # if you want to automatically load your printer list rather
  37. # than setting them up individually then you'll need this
  38. printcap name = /etc/printcap
  39. load printers = yes
  40.  
  41. # It should not be necessary to spell out the print system type unless
  42. # yours is non-standard. Currently supported print systems include:
  43. # bsd, sysv, plp, lprng, aix, hpux, qnx
  44. ; printing = cups
  45.  
  46. # This option tells cups that the data has already been rasterized
  47. cups options = raw
  48.  
  49. # Uncomment this if you want a guest account, you must add this to /etc/passwd
  50. # otherwise the user "nobody" is used
  51. ; guest account = pcguest
  52.  
  53. # this tells Samba to use a separate log file for each machine
  54. # that connects
  55. log file = /var/log/samba/%m.log
  56. # all log information in one file
  57. # log file = /var/log/samba/smbd.log
  58.  
  59. # Put a capping on the size of the log files (in Kb).
  60. max log size = 100
  61.  
  62. # Security mode. Most people will want user level security. See
  63. # security_level.txt for details.
  64. security = share
  65. # Use password server option only with security = server
  66. ; password server = <NT-Server-Name>
  67.  
  68. # Password Level allows matching of _n_ characters of the password for
  69. # all combinations of upper and lower case.
  70. ; password level = 8
  71. ; username level = 8
  72.  
  73. # You may wish to use password encryption. Please read
  74. # ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
  75. # Do not enable this option unless you have read those documents
  76. ; encrypt passwords = yes
  77. ; smb passwd file = /etc/samba/smbpasswd
  78.  
  79. # The following are needed to allow password changing from Windows to
  80. # update the Linux system password also.
  81. # NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
  82. # NOTE2: You do NOT need these to allow workstations to change only
  83. # the encrypted SMB passwords. They allow the Unix password
  84. # to be kept in sync with the SMB password.
  85. ; unix password sync = Yes
  86. ; passwd program = /usr/bin/passwd %u
  87. ; passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
  88.  
  89. # Unix users can map to different SMB User names
  90. ; username map = /etc/samba/smbusers
  91.  
  92. # Using the following line enables you to customise your configuration
  93. # on a per machine basis. The %m gets replaced with the netbios name
  94. # of the machine that is connecting
  95. ; include = /etc/samba/smb.conf.%m
  96.  
  97. # Most people will find that this option gives better performance.
  98. # See speed.txt and the manual pages for details
  99. socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
  100.  
  101. # Configure Samba to use multiple interfaces
  102. # If you have multiple network interfaces then you must list them
  103. # here. See the man page for details.
  104. ; interfaces = 192.168.12.2/24 192.168.13.2/24
  105.  
  106. # Configure remote browse list synchronisation here
  107. # request announcement to, or browse list sync from:
  108. # a specific host or from / to a whole subnet (see below)
  109. ; remote browse sync = 192.168.3.25 192.168.5.255
  110. # Cause this host to announce itself to local subnets here
  111. ; remote announce = 192.168.1.255 192.168.2.44
  112.  
  113. # Browser Control Options:
  114. # set local master to no if you don't want Samba to become a master
  115. # browser on your network. Otherwise the normal election rules apply
  116. ; local master = no
  117.  
  118. # OS Level determines the precedence of this server in master browser
  119. # elections. The default value should be reasonable
  120. os level = 99
  121.  
  122. # Domain Master specifies Samba to be the Domain Master Browser. This
  123. # allows Samba to collate browse lists between subnets. Don't use this
  124. # if you already have a Windows NT domain controller doing this job
  125. ; domain master = yes
  126.  
  127. # Preferred Master causes Samba to force a local browser election on startup
  128. # and gives it a slightly higher chance of winning the election
  129. ; preferred master = yes
  130.  
  131. # Enable this if you want Samba to be a domain logon server for
  132. # Windows95 workstations.
  133. ; domain logons = yes
  134.  
  135. # if you enable domain logons then you may want a per-machine or
  136. # per user logon script
  137. # run a specific logon batch file per workstation (machine)
  138. ; logon script = %m.bat
  139. # run a specific logon batch file per username
  140. ; logon script = %U.bat
  141.  
  142. # Where to store roving profiles (only for Win95 and WinNT)
  143. # %L substitutes for this servers netbios name, %U is username
  144. # You must uncomment the [Profiles] share below
  145. ; logon path = \\%L\Profiles\%U
  146.  
  147. # All NetBIOS names must be resolved to IP Addresses
  148. # 'Name Resolve Order' allows the named resolution mechanism to be specified
  149. # the default order is "host lmhosts wins bcast". "host" means use the unix
  150. # system gethostbyname() function call that will use either /etc/hosts OR
  151. # DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf
  152. # and the /etc/resolv.conf file. "host" therefore is system configuration
  153. # dependant. This parameter is most often of use to prevent DNS lookups
  154. # in order to resolve NetBIOS names to IP Addresses. Use with care!
  155. # The example below excludes use of name resolution for machines that are NOT
  156. # on the local network segment
  157. # - OR - are not deliberately to be known via lmhosts or via WINS.
  158. ; name resolve order = wins lmhosts bcast
  159.  
  160. # Windows Internet Name Serving Support Section:
  161. # WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
  162. wins support = no
  163.  
  164. # WINS Server - Tells the NMBD components of Samba to be a WINS Client
  165. # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
  166. #wins server = 172.16.2.254
  167.  
  168. # WINS Proxy - Tells Samba to answer name resolution queries on
  169. # behalf of a non WINS capable client, for this to work there must be
  170. # at least one WINS Server on the network. The default is NO.
  171. ; wins proxy = yes
  172.  
  173. # DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
  174. # via DNS nslookups. The built-in default for versions 1.9.17 is yes,
  175. # this has been changed in version 1.9.18 to no.
  176. dns proxy = yes
  177.  
  178. # Case Preservation can be handy - system default is _no_
  179. # NOTE: These can be set on a per share basis
  180. ; preserve case = no
  181. ; short preserve case = no
  182. # Default case is normally upper case for all DOS files
  183. ; default case = lower
  184. # Be very careful with case sensitivity - it can break things!
  185. ; case sensitive = no
  186.  
  187. #============================ Share Definitions ==============================
  188. idmap uid = 16777216-33554431
  189. idmap gid = 16777216-33554431
  190. template shell = /bin/false
  191. winbind use default domain = no
  192. ;[homes]
  193. ; comment = Home Directories
  194. ; browseable = no
  195. ; writable = yes
  196.  
  197. # Un-comment the following and create the netlogon directory for Domain Logons
  198. ; [netlogon]
  199. ; comment = Network Logon Service
  200. ; path = /home/netlogon
  201. ; guest ok = yes
  202. ; writable = no
  203. ; share modes = no
  204.  
  205.  
  206. # Un-comment the following to provide a specific roving profile share
  207. # the default is to use the user's home directory
  208. ;[Profiles]
  209. ; path = /home/profiles
  210. ; browseable = no
  211. ; guest ok = yes
  212.  
  213.  
  214. # NOTE: If you have a BSD-style print system there is no need to
  215. # specifically define each individual printer
  216. ;[printers]
  217. ; comment = All Printers
  218. ; path = /var/spool/samba
  219. ; browseable = yes
  220. # Set public = yes to allow user 'guest account' to print
  221. ; guest ok = yes
  222. ; writable = yes
  223. ; printable = yes
  224. ;[rpdv]
  225. ; comment = Pasta do sistema RPDV - Check-outs
  226. ; path = /samba/rpdv
  227. ; guest ok = no
  228. ; write list = rpdv otavio ricardo camilo ferrarin
  229. ; create mask = 0777
  230. ; force group = rpdv
  231. ; directory mask = 0777
  232. ; force create mode = 0777
  233. ; force directory mode = 0777
  234. ; force user = rpdv
  235. # This one is useful for people to share files
  236. ;[tmp]
  237. ; comment = Temporary file space
  238. ; path = /tmp
  239. ; read only = no
  240. ; public = yes
  241.  
  242. # A publicly accessible directory, but read only, except for people in
  243. # the "staff" group
  244. ;[public]
  245. ; comment = Public Stuff
  246. ; path = /home/samba
  247. ; public = yes
  248. ; read only = yes
  249. ; write list = @staff
  250.  
  251. # Other examples.
  252. #
  253. # A private printer, usable only by fred. Spool data will be placed in fred's
  254. # home directory. Note that fred must have write access to the spool directory,
  255. # wherever it is.
  256. ;[fredsprn]
  257. ; comment = Fred's Printer
  258. ; valid users = fred
  259. ; path = /homes/fred
  260. ; printer = freds_printer
  261. ; public = no
  262. ; writable = no
  263. ; printable = yes
  264.  
  265. # A private directory, usable only by fred. Note that fred requires write
  266. # access to the directory.
  267. ;[fredsdir]
  268. ; comment = Fred's Service
  269. ; path = /usr/somewhere/private
  270. ; valid users = fred
  271. ; public = no
  272. ; writable = yes
  273. ; printable = no
  274.  
  275. # a service which has a different directory for each machine that connects
  276. # this allows you to tailor configurations to incoming machines. You could
  277. # also use the %u option to tailor it by user name.
  278. # The %m gets replaced with the machine name that is connecting.
  279. ;[pchome]
  280. ; comment = PC Directories
  281. ; path = /usr/pc/%m
  282. ; public = no
  283. ; writable = yes
  284.  
  285. # A publicly accessible directory, read/write to all users. Note that all files
  286. # created in the directory by users will be owned by the default user, so
  287. # any user with access can delete any other user's files. Obviously this
  288. # directory must be writable by the default user. Another user could of course
  289. # be specified, in which case all files would be owned by that user instead.
  290. ;[public]
  291. ; path = /usr/somewhere/else/public
  292. ; public = yes
  293. ; only guest = yes
  294. ; writable = yes
  295. ; printable = no
  296.  
  297. # The following two entries demonstrate how to share a directory so that two
  298. # users can place files there that will be owned by the specific users. In this
  299. # setup, the directory should be writable by both users and should have the
  300. # sticky bit set on it to prevent abuse. Obviously THIS could be extended to
  301. # as many users as required.
  302. ;[myshare]
  303. ; comment = Mary's and Fred's stuff
  304. ; path = /usr/somewhere/shared
  305. ; valid users = mary fred
  306. ; public = no
  307. ; writable = yes
  308. ; printable = no
  309. ; create mask = 0765
  310.  
  311. [Conexo]
  312. Comment = Pasta da rede
  313. path = /samba/Conexo
  314. public = yes
  315. writable = yes
  316. create mask = 0777
  317. ;guest ok = no
  318. force group = suporte, impressao
  319. directory mask = 0777
  320. force create mode = 0777
  321. force directory mode = 0777
  322. force group = suporte
  323. write list = suporte
  324. browseable = yes
  325. read list = suporte
  326.  
  327.  
  328. [Lixeira]
  329. Comment = Pasta da Lixeira
  330. path = /samba/Lixeira/%U
  331. public = yes
  332. writable = yes
  333. browseable = yes
  334. directory mask = 0777
  335. force create mode = 0777
  336. force directory mode = 0777
  337. create mask = 0777
  338.  
  339.  
  340. [Marketing]
  341. Comment = Pasta da Diretoria
  342. directory mask = 0777
  343. force create mode = 0777
  344. force directory mode = 0777
  345. path = /samba/Marketing
  346. writable = yes
  347. browseable = yes
  348. valid users = robson_bender
  349. vfs objects = recycle
  350. recycle:keeptree = yes
  351. recycle:versions = yes
  352. recycle:repository = /samba/Lixeira/%U
  353. recycle:exclude = *.tmp, *.log, *.obj, ~*.*, *.bak, *.iso, *.xls#, *.ods#, *.dic, *.lck, *aik
  354. recycle:exclude_dir = tmp, cache
  355.  
  356.  
  357. [Blink]
  358. Comment = Pasta da Blink
  359. path = /samba/blink-pc
  360. public = yes
  361. writable = yes
  362. create mask = 0777
  363. ;guest ok = no
  364. force group = suporte
  365. directory mask = 0777
  366. force create mode = 0777
  367. force directory mode = 0777
  368. force user = suporte
  369. write list = suporte
  370. browseable = yes
  371. read list = suporte
  372.  
  373. ;[Nfe]
  374. ; Comment = Pasta de Nfe
  375. ; path = /samba/Nfe
  376. ; public = yes
  377. ; writable = yes
  378. ; create mask = 0777
  379. ; ;guest ok = no
  380. ; force group = root
  381. ; directory mask = 0777
  382. ; force create mode = 0777
  383. ; force directory mode = 0777
  384. ; force user = root
  385. ; write list = root
  386. ; browseable = yes
  387. ; read list = suporte
  388.  
  389. [Arquivos]
  390. ; Comment = Pasta de Backup
  391. ; path = /samba/Arquivos
  392. ; public = yes
  393. ; writable = yes
  394. ; create mask = 0777
  395. ; ;guest ok = no
  396. ; force group = root
  397. ; directory mask = 0777
  398. ; force create mode = 0777
  399. ; force directory mode = 0777
  400. ; force user = root
  401. ; write list = root
  402. ; browseable = yes
  403. ; read list = suporte
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement