Advertisement
Guest User

Untitled

a guest
Jul 17th, 2018
512
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.59 KB | None | 0 0
  1.  
  2. # This is the main Samba configuration file. You should read the
  3. # smb.conf(5) manual page in order to understand the options listed
  4. # here. Samba has a huge number of configurable options (perhaps too
  5. # many!) most of which are not shown in this example
  6. #
  7. # Any line which starts with a ; (semi-colon) or a # (hash)
  8. # is a comment and is ignored. In this example we will use a #
  9. # for commentry and a ; for parts of the config file that you
  10. # may wish to enable
  11. #
  12. # NOTE: Whenever you modify this file you should run the command "testparm"
  13. # to check that you have not made any basic syntactic errors.
  14. #
  15. #======================= Global Settings =====================================
  16. [global]
  17.  
  18. # 1. Server Naming Options:
  19. # workgroup = NT-Domain-Name or Workgroup-Name
  20.  
  21. workgroup = workgroup
  22.  
  23. realm = workgroup
  24.  
  25. # netbios name is the name you will see in "Network Neighbourhood",
  26. # but defaults to your hostname
  27. ; netbios name = maknas
  28.  
  29. # server string is the equivalent of the NT Description field
  30. server string = samba
  31.  
  32. # Message command is run by samba when a "popup" message is sent to it.
  33. # The example below is for use with LinPopUp:
  34. ; message command = /usr/bin/linpopup "%f" "%m" %s; rm %s
  35.  
  36. # 2. Printing Options:
  37. # Required to load all CUPS printers
  38. printcap name = /dev/null
  39. load printers = no
  40. show add printer wizard = no
  41. # disable spools = yes
  42.  
  43.  
  44. # printcap cache time, so samba will automatically load new cups printers
  45.  
  46.  
  47. # It should not be necessary to spell out the print system type unless
  48. # yours is non-standard. Currently supported print systems include:
  49. # bsd, sysv, plp, lprng, aix, hpux, qnx, cups
  50. # printing = cups
  51.  
  52. # Samba 2.2 supports the Windows NT-style point-and-print feature. To
  53. # use this, you need to be able to upload print drivers to the samba
  54. # server. The printer admins (or root) may install drivers onto samba.
  55. # Note that this feature uses the print$ share, so you will need to
  56. # enable it below.
  57. # Printer admins are now defined by granting the SePrintOperatorPrivilege, ie:
  58. # run: net rpc rights grant 'DOMAIN\Printer Operators' SePrintOperatorPrivilege
  59.  
  60. # 3. Logging Options:
  61. # this tells Samba to use a separate log file for each machine
  62. # that connects
  63. log file = /var/log/samba/%m.log
  64.  
  65. # Put a capping on the size of the log files (in Kb).
  66. max log size = 50
  67.  
  68. # Set the log (verbosity) level (0 <= log level <= 10)
  69. # log level = 3
  70.  
  71. # 4. Security and Domain Membership Options:
  72. # This option is important for security. It allows you to restrict
  73. # connections to machines which are on your local network. The
  74. # following example restricts access to two C class networks and
  75. # the "loopback" interface. For more examples of the syntax see
  76. # the smb.conf man page. Do not enable this if (tcp/ip) name resolution does
  77. # not work for all the hosts in your network.
  78. hosts allow = 192.168.2. 127.0.0.
  79.  
  80. # Uncomment this if you want a guest account, you must add this to /etc/passwd
  81. # otherwise the user "nobody" is used
  82. # guest account = pcguest
  83. # Allow users to map to guest:
  84. map to guest = bad user
  85. # Use password server option only with security = server or security = domain
  86. # When using security = domain, you should use password server = *
  87. # password server = <NT-Server-Name>
  88. # password server = *
  89.  
  90. # Password Level allows matching of _n_ characters of the password for
  91. # all combinations of upper and lower case.
  92. # password level = 8
  93. # username level = 8
  94.  
  95. # You may wish to use password encryption. Please read
  96. # ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
  97. # Do not enable this option unless you have read those documents
  98. # Encrypted passwords are required for any use of samba in a Windows NT domain
  99. # The smbpasswd file is only required by a server doing authentication, thus
  100. # members of a domain do not need one.
  101. encrypt passwords = true
  102. ; smb passwd file = /etc/samba/smbpasswd
  103.  
  104. # The following are needed to allow password changing from Windows to
  105. # also update the Linux system password.
  106. # NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
  107. # NOTE2: You do NOT need these to allow workstations to change only
  108. # the encrypted SMB passwords. They allow the Unix password
  109. # to be kept in sync with the SMB password.
  110. ; unix password sync = Yes
  111. # You either need to setup a passwd program and passwd chat, or
  112. # enable pam password change
  113. ; pam password change = yes
  114. # passwd program = /usr/bin/passwd '%u'
  115. ; passwd chat = *New*UNIX*password* %n\n *Re*ype*new*UNIX*password* %n\n \
  116. ;*passwd:*all*authentication*tokens*updated*successfully*
  117.  
  118. # Unix users can map to different SMB User names
  119. ; username map = /etc/samba/smbusers
  120.  
  121. # Using the following line enables you to customise your configuration
  122. # on a per machine basis. The %m gets replaced with the netbios name
  123. # of the machine that is connecting
  124. # include = /etc/samba/smb.conf.%m
  125.  
  126. # Options for using winbind. Winbind allows you to do all account and
  127. # authentication from a Windows or samba domain controller, creating
  128. # accounts on the fly, and maintaining a mapping of Windows RIDs to unix uid's
  129. # and gid's. winbind uid and winbind gid are the only required parameters.
  130. #
  131. # winbind uid is the range of uid's winbind can use when mapping RIDs to uid's
  132. idmap uid = 10000-20000
  133. #
  134. # winbind gid is the range of uid's winbind can use when mapping RIDs to gid's
  135. idmap gid = 10000-20000
  136. #
  137. # winbind separator is the character a user must use between their domain
  138. # name and username, defaults to "\"
  139.  
  140. # winbind separator = winbind use default domain = yes
  141. #
  142. # winbind use default domain allows you to have winbind return usernames
  143. # in the form user instead of DOMAIN+user for the domain listed in the
  144. # workgroup parameter.
  145. #
  146. # template homedir determines the home directory for winbind users, with
  147. # %D expanding to their domain name and %U expanding to their username:
  148. # template homedir = /home/%D/%U
  149.  
  150. # When using winbind, you may want to have samba create home directories
  151. # on the fly for authenticated users. Ensure that /etc/pam.d/samba is
  152. # using 'service=system-auth-winbind' in pam_stack modules, and then
  153. # enable obedience of pam restrictions below:
  154. # obey pam restrictions = yes
  155.  
  156. #
  157. # template shell determines the shell users authenticated by winbind get
  158. # template shell = /bin/bash
  159.  
  160. # 5. Browser Control and Networking Options:
  161. # Configure Samba to use multiple interfaces
  162. # If you have multiple network interfaces then you must list them
  163. # here. See the man page for details.
  164. # interfaces = 192.168.12.2/24 192.168.13.2/24
  165.  
  166. # Configure remote browse list synchronisation here
  167. # request announcement to, or browse list sync from:
  168. # a specific host or from / to a whole subnet (see below)
  169. # remote browse sync = 192.168.3.25 192.168.5.255
  170. # Cause this host to announce itself to local subnets here
  171. # remote announce = 192.168.1.255 192.168.2.44
  172.  
  173. # set local master to no if you don't want Samba to become a master
  174. # browser on your network. Otherwise the normal election rules apply
  175. local master = yes
  176.  
  177. # OS Level determines the precedence of this server in master browser
  178. # elections. The default value should be reasonable
  179. os level = 33
  180.  
  181. # Domain Master specifies Samba to be the Domain Master Browser. This
  182. # allows Samba to collate browse lists between subnets. Don't use this
  183. # if you already have a Windows NT domain controller doing this job
  184. domain master = yes
  185.  
  186. # Preferred Master causes Samba to force a local browser election on startup
  187. # and gives it a slightly higher chance of winning the election
  188. preferred master = yes
  189.  
  190. # 6. Domain Control Options:
  191. # Enable this if you want Samba to be a domain logon server for
  192. # Windows95 workstations or Primary Domain Controller for WinNT and Win2k
  193. # domain logons = yes
  194.  
  195. # if you enable domain logons then you may want a per-machine or
  196. # per user logon script
  197. # run a specific logon batch file per workstation (machine)
  198. # logon script = %m.bat
  199. # run a specific logon batch file per username
  200. # logon script = %u.bat
  201.  
  202. # Where to store roaming profiles for WinNT and Win2k
  203. # %L substitutes for this servers netbios name, %u is username
  204. # You must uncomment the [Profiles] share below
  205. # logon path = \\%L\Profiles\%u
  206.  
  207. # Where to store roaming profiles for Win9x. Be careful with this as it also
  208. # impacts where Win2k finds it's /HOME share
  209. # logon home = \\%L\%u\.profile
  210.  
  211.  
  212. # The add user script is used by a domain member to add local user accounts
  213. # that have been authenticated by the domain controller, or when adding
  214. # users via the Windows NT Tools (ie User Manager for Domains).
  215.  
  216. # Scripts for file (passwd, smbpasswd) backend:
  217. # add user script = /usr/sbin/useradd -s /bin/false '%u'
  218. # delete user script = /usr/sbin/userdel '%s'
  219. # add user to group script = /usr/bin/gpasswd -a '%u' '%g'
  220. # delete user from group script = /usr/bin/gpasswd -d '%u' '%g'
  221. # set primary group script = /usr/sbin/usermod -g '%g' '%u'
  222. # add group script = /usr/sbin/groupadd %g && getent group '%g'|awk -F: '{print $3}'
  223. # delete group script = /usr/sbin/groupdel '%g'
  224.  
  225. # Scripts for LDAP backend (assumes nss_ldap is in use on the domain controller,
  226. # and needs configuration in smbldap_conf.pm
  227. # add user script = /usr/sbin/smbldap-useradd -m '%u'
  228. # delete user script = /usr/sbin/smbldap-userdel '%u'
  229. # add user to group script = /usr/sbin/smbldap-groupmod -m '%u' '%g'
  230. # delete user from group script = /usr/sbin/smbldap-groupmod -x '%u' '%g'
  231. # set primary group script = /usr/sbin/smbldap-usermod -g '%g' '%u'
  232. # add group script = /usr/sbin/smbldap-groupadd '%g' && /usr/sbin/smbldap-groupshow %g|awk '/^gidNumber:/ {print $2}'
  233. # delete group script = /usr/sbin/smbldap-groupdel '%g'
  234.  
  235.  
  236. # The add machine script is use by a samba server configured as a domain
  237. # controller to add local machine accounts when adding machines to the domain.
  238. # The script must work from the command line when replacing the macros,
  239. # or the operation will fail. Check that groups exist if forcing a group.
  240. # Script for domain controller for adding machines:
  241. # add machine script = /usr/sbin/useradd -d /dev/null -g machines -c 'Machine Account' -s /bin/false -M '%u'
  242. # Script for domain controller with LDAP backend for adding machines (please
  243. # configure in /etc/samba/smbldap_conf.pm first):
  244. # add machine script = /usr/sbin/smbldap-useradd -w -d /dev/null -c 'Machine Account' -s /bin/false '%u'
  245.  
  246. # Domain groups:
  247. # Domain groups are now configured by using the 'net groupmap' tool
  248.  
  249. # Enable priveleges, ie allowing members of Domain Admins to join machines
  250. # to the domain
  251. # enable privileges = yes
  252.  
  253. # Samba Password Database configuration:
  254. # Samba now has runtime-configurable password database backends. Multiple
  255. # passdb backends may be used, but users will only be added to the first one
  256. # Default:
  257. # passdb backend = tdbsam
  258. # TDB backen with fallback to smbpasswd and guest
  259. # passdb backend = tdbsam smbpasswd guest
  260. # LDAP with fallback to smbpasswd guest
  261. # Enable SSL by using an ldaps url, or enable tls with 'ldap ssl' below.
  262. # passdb backend = ldapsam:ldaps://ldap.mydomain.com smbpasswd guest
  263. # Use the samba2 LDAP schema:
  264. # passdb backend = ldapsam_compat:ldaps://ldap.mydomain.com smbpasswd guest
  265.  
  266. # Idmap settings (set idmap uid and idmap gid above):
  267. # Idmap backend to use:
  268. # idmap backend = ldap:ldap://ldap.mydomain.com
  269.  
  270. # LDAP configuration for Domain Controlling:
  271. # The account (dn) that samba uses to access the LDAP server
  272. # This account needs to have write access to the LDAP tree
  273. # You will need to give samba the password for this dn, by
  274. # running 'smbpasswd -w mypassword'
  275. # ldap admin dn = cn=root,dc=mydomain,dc=com
  276. # ldap ssl = start_tls
  277. # start_tls should run on 389, but samba defaults incorrectly to 636
  278. # ldap port = 389
  279. # ldap suffix = dc=mydomain,dc=com
  280. # Seperate suffixes are available for machines, users, groups, and idmap, if
  281. # ldap suffix appears first, it is appended to the specific suffix.
  282. # Example for a unix-ish directory layout:
  283. # ldap machine suffix = ou=Hosts
  284. # ldap user suffix = ou=People
  285. # ldap group suffix = ou=Group
  286. # ldap idmap suffix = ou=Idmap
  287. # Example for AD-ish layout:
  288. # ldap machine suffix = cn=Computers
  289. # ldap user suffix = cn=Users
  290. # ldap group suffix = cn=Groups
  291. # ldap idmap suffix = cn=Idmap
  292.  
  293.  
  294. # 7. Name Resolution Options:
  295. # All NetBIOS names must be resolved to IP Addresses
  296. # 'Name Resolve Order' allows the named resolution mechanism to be specified
  297. # the default order is "host lmhosts wins bcast". "host" means use the unix
  298. # system gethostbyname() function call that will use either /etc/hosts OR
  299. # DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf
  300. # and the /etc/resolv.conf file. "host" therefore is system configuration
  301. # dependant. This parameter is most often of use to prevent DNS lookups
  302. # in order to resolve NetBIOS names to IP Addresses. Use with care!
  303. # The example below excludes use of name resolution for machines that are NOT
  304. # on the local network segment
  305. # - OR - are not deliberately to be known via lmhosts or via WINS.
  306. # name resolve order = wins lmhosts bcast
  307.  
  308. # Windows Internet Name Serving Support Section:
  309. # WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
  310. wins support = yes
  311.  
  312. # WINS Server - Tells the NMBD components of Samba to be a WINS Client
  313. # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
  314. # wins server = w.x.y.z
  315.  
  316. # WINS Proxy - Tells Samba to answer name resolution queries on
  317. # behalf of a non WINS capable client, for this to work there must be
  318. # at least one WINS Server on the network. The default is NO.
  319. # wins proxy = yes
  320.  
  321. # DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
  322. # via DNS nslookups. The built-in default for versions 1.9.17 is yes,
  323. # this has been changed in version 1.9.18 to no.
  324. dns proxy = no
  325. ; socket options = tcp_nodelay
  326. security = user
  327.  
  328.  
  329. # 8. File Naming Options:
  330. # Case Preservation can be handy - system default is _no_
  331. # NOTE: These can be set on a per share basis
  332. # preserve case = no
  333. # short preserve case = no
  334. # Default case is normally upper case for all DOS files
  335. # default case = lower
  336. # Be very careful with case sensitivity - it can break things!
  337. # case sensitive = no
  338.  
  339. # Enabling internationalization:
  340. # you can match a Windows code page with a UNIX character set.
  341. # Windows: 437 (US), 737 (GREEK), 850 (Latin1 - Western European),
  342. # 852 (Eastern Eu.), 861 (Icelandic), 932 (Cyrillic - Russian),
  343. # 936 (Japanese - Shift-JIS), 936 (Simpl. Chinese), 949 (Korean Hangul),
  344. # 950 (Trad. Chin.).
  345. # UNIX: ISO8859-1 (Western European), ISO8859-2 (Eastern Eu.),
  346. # ISO8859-5 (Russian Cyrillic), KOI8-R (Alt-Russ. Cyril.)
  347. # This is an example for french users:
  348.  
  349. ; unix charset = UTF-8
  350. dos charset = UTF-8
  351. display charset = UTF-8
  352.  
  353. #============================ Share Definitions ==============================
  354. [homes]
  355. comment = Home Directories
  356. browseable = no
  357. writable = yes
  358. # You can enable VFS recycle bin and on-access virus-scanning on a per
  359. # share basis:
  360. # Uncomment the next 2 lines (make sure you create a .recycle folder in
  361. # the base of the share and ensure all users will have write access to it.
  362. # For virus scanning, install samba-vscan-clamav and ensure the clamd service
  363. # is running
  364. # vfs objects = vscan-clamav recycle
  365. # vscan-clamav: config-file = /etc/samba/vscan-clamav.conf
  366.  
  367. # Un-comment the following and create the netlogon directory for Domain Logons
  368. # [netlogon]
  369. # comment = Network Logon Service
  370. # path = /var/lib/samba/netlogon
  371. # guest ok = yes
  372. # writable = no
  373.  
  374. #Uncomment the following 2 lines if you would like your login scripts to
  375. #be created dynamically by ntlogon (check that you have it in the correct
  376. #location (the default of the ntlogon rpm available in contribs)
  377. #root preexec = /usr/bin/ntlogon -u '%u' -g '%g' -o %a -d /var/lib/samba/netlogon/
  378. #root postexec = rm -f '/var/lib/samba/netlogon/%u.bat'
  379.  
  380. # Un-comment the following to provide a specific roving profile share
  381. # the default is to use the user's home directory
  382. #[Profiles]
  383. # path = /var/lib/samba/profiles
  384. # browseable = no
  385. # guest ok = yes
  386. # writable = yes
  387. # This script can be enabled to create profile directories on the fly
  388. # You may want to turn off guest acces if you enable this, as it
  389. # hasn't been thoroughly tested.
  390. #root preexec = PROFILE='/var/lib/samba/profiles/%u'; if [ ! -e $PROFILE ]; \
  391. # then mkdir -pm700 $PROFILE; chown '%u':'%g' $PROFILE;fi
  392. # If you want read-only profiles, fake permissions so windows clients think
  393. # they have written to the files
  394. # vfs objects = fake_perms
  395.  
  396. # NOTE: If you have a CUPS print system there is no need to
  397. # specifically define each individual printer.
  398. # You must configure the samba printers with the appropriate Windows
  399. # drivers on your Windows clients or upload the printer driver to the
  400. # server from Windows (NT/2000/XP). On the Samba server no filtering is
  401. # done. If you wish that the server provides the driver and the clients
  402. # send PostScript ("Generic PostScript Printer" under Windows), you have
  403. # to use 'printcap name = cups' or swap the 'print command' line below
  404. # with the commented one. Note that print commands only work if not using
  405. # 'printing=cups'
  406. [printers]
  407. comment = All Printers
  408. path = /var/spool/samba
  409. browseable = no
  410. # to allow user 'guest account' to print.
  411. guest ok = yes
  412. ; writable = No
  413. printable = yes
  414. create mode = 0700
  415. # =====================================
  416. # print command: see above for details.
  417. # =====================================
  418. print command = lpr-cups -P %p -o raw %s -r # using client side printer drivers.
  419. # print command = lpr-cups -P %p %s # using cups own drivers (use generic PostScript on clients).
  420. # If you install drivers on the server, you will want to uncomment this so
  421. # clients request the driver
  422. use client driver = yes
  423.  
  424. # This share is used for Windows NT-style point-and-print support.
  425. # To be able to install drivers, you need to be either root, or listed
  426. # in the printer admin parameter above. Note that you also need write access
  427. # to the directory and share definition to be able to upload the drivers.
  428. # For more information on this, please see the Printing Support Section of
  429. # /usr/share/doc/samba-<version>/docs/Samba-HOWTO-Collection.pdf
  430. #
  431. # A special case is using the CUPS Windows Postscript driver, which allows
  432. # all features available via CUPS on the client, by publishing the ppd file
  433. # and the cups driver by using the 'cupsaddsmb' tool. This requires the
  434. # installation of the CUPS driver (http://www.cups.org/windows.php)
  435. # on the server, but doesn't require you to use Windows at all :-).
  436. #[print$]
  437. # path = /var/lib/samba/printers
  438. #; browseable = yes
  439. # write list = @adm root
  440. # guest ok = yes
  441. # inherit permissions = yes
  442. # Settings suitable for Winbind:
  443. # write list = @"Domain Admins" root
  444. # force group = +@"Domain Admins"
  445.  
  446. # A useful application of samba is to make a PDF-generation service
  447. # To streamline this, install windows postscript drivers (preferably colour)
  448. # on the samba server, so that clients can automatically install them.
  449. # Note that this only works if 'printing' is *not* set to 'cups'
  450.  
  451. #[pdf-gen]
  452. # path = /var/tmp
  453. #; guest ok = no
  454. # printable = Yes
  455. # comment = PDF Generator (only valid users)
  456. # printing = bsd
  457. # #prinroott command = /usr/share/samba/scripts/print-pdf file path win_path recipient IP &
  458. # print command = /usr/share/samba/scripts/print-pdf "%s" "%H" "//%L/%u" "%m" "%I" "%J" &
  459. # lpq command = /bin/true
  460.  
  461. [250GB_public]
  462. path = /mnt/250GB/public
  463. comment = shara
  464. ; browseable = yes
  465. guest ok = yes
  466. writeable = yes
  467.  
  468. [250GB_soft]
  469. path = /mnt/250GB/soft
  470. comment = shara
  471. ; browseable = yes
  472. guest ok = yes
  473. writeable = no
  474.  
  475. [250GB_shared]
  476. path = /mnt/250GB/shared
  477. comment = shara
  478. ; browseable = yes
  479. guest ok = yes
  480. writeable = yes
  481.  
  482.  
  483. [250GB_torrent]
  484. path = /mnt/250GB/torrent
  485. comment = shara
  486. ; browseable = yes
  487. guest ok = yes
  488. writeable = yes
  489.  
  490. [160GB_shared]
  491. path = /mnt/160GB/shared
  492. comment = shara
  493. ; browseable = yes
  494. guest ok = yes
  495. writeable = yes
  496.  
  497. [160GB_torrent]
  498. path = /mnt/160GB/torrent
  499. comment = shara
  500. ; browseable = yes
  501. guest ok = yes
  502. writeable = no
  503.  
  504.  
  505. [40GB_shared]
  506. path = /mnt/40GB/shared
  507. comment = shara
  508. ; browseable = yes
  509. guest ok = yes
  510. writeable = yes
  511.  
  512.  
  513.  
  514.  
  515. #[Drivers]
  516. # path = /mnt/160GB/Drivers
  517. # comment = shara
  518. #; browseable = yes
  519. # guest ok = yes
  520. # writeable = no
  521.  
  522. #[soft]
  523. # path = /mnt/160GB/soft
  524. # comment = shara
  525. #; browseable = yes
  526. # guest ok = yes
  527. # writeable = no
  528.  
  529. #[DRP]
  530. # path = /media/cdrom0
  531. # comment = cdrom-virt
  532. # browseable = yes
  533. # guest ok = yes
  534. # writable = no
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement