PageRenderTime 52ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/trkinitrd/etc/samba/smb-winbind.conf

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