Guest User

Untitled

a guest
Aug 17th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.72 KB | None | 0 0
  1. #SAMBA CONF YAO
  2. #======================= Global Settings =======================
  3.  
  4. [global]
  5.  
  6. ## Browsing/Identification ###
  7.  
  8. # Change this to the workgroup/NT-domain name your Samba server will part of
  9. workgroup = WORKGROUP
  10.  
  11. # server string is the equivalent of the NT Description field
  12. server string = %h server (Samba, Ubuntu)
  13.  
  14. # Windows Internet Name Serving Support Section:
  15. # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
  16. # wins support = no
  17.  
  18. # WINS Server - Tells the NMBD components of Samba to be a WINS Client
  19. # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
  20. ; wins server = w.x.y.z
  21.  
  22. # This will prevent nmbd to search for NetBIOS names through DNS.
  23. dns proxy = no
  24.  
  25. # What naming service and in what order should we use to resolve host names
  26. # to IP addresses
  27. ; name resolve order = lmhosts host wins bcast
  28.  
  29. #### Networking ####
  30.  
  31. # The specific set of interfaces / networks to bind to
  32. # This can be either the interface name or an IP address/netmask;
  33. # interface names are normally preferred
  34. ; interfaces = 127.0.0.0/8 eth0
  35.  
  36. # Only bind to the named interfaces and/or networks; you must use the
  37. # 'interfaces' option above to use this.
  38. # It is recommended that you enable this feature if your Samba machine is
  39. # not protected by a firewall or is a firewall itself. However, this
  40. # option cannot handle dynamic or non-broadcast interfaces correctly.
  41. ; bind interfaces only = yes
  42.  
  43.  
  44.  
  45. #### Debugging/Accounting ####
  46.  
  47. # This tells Samba to use a separate log file for each machine
  48. # that connects
  49. log file = /var/log/samba/log.%m
  50.  
  51. # Cap the size of the individual log files (in KiB).
  52. max log size = 1000
  53.  
  54. # If you want Samba to only log through syslog then set the following
  55. # parameter to 'yes'.
  56. # syslog only = no
  57.  
  58. # We want Samba to log a minimum amount of information to syslog. Everything
  59. # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
  60. # through syslog you should set the following parameter to something higher.
  61. syslog = 0
  62.  
  63. # Do something sensible when Samba crashes: mail the admin a backtrace
  64. panic action = /usr/share/samba/panic-action %d
  65.  
  66.  
  67. ####### Authentication #######
  68.  
  69. # "security = user" is always a good idea. This will require a Unix account
  70. # in this server for every user accessing the server. See
  71. # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
  72. # in the samba-doc package for details.
  73. # security = user
  74.  
  75. # You may wish to use password encryption. See the section on
  76. # 'encrypt passwords' in the smb.conf(5) manpage before enabling.
  77. encrypt passwords = true
  78.  
  79. # If you are using encrypted passwords, Samba will need to know what
  80. # password database type you are using.
  81. passdb backend = tdbsam
  82.  
  83. obey pam restrictions = yes
  84.  
  85. # This boolean parameter controls whether Samba attempts to sync the Unix
  86. # password with the SMB password when the encrypted SMB password in the
  87. # passdb is changed.
  88. unix password sync = yes
  89.  
  90. # For Unix password sync to work on a Debian GNU/Linux system, the following
  91. # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
  92. # sending the correct chat script for the passwd program in Debian Sarge).
  93. passwd program = /usr/bin/passwd %u
  94. passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
  95.  
  96. # This boolean controls whether PAM will be used for password changes
  97. # when requested by an SMB client instead of the program listed in
  98. # 'passwd program'. The default is 'no'.
  99. pam password change = yes
  100.  
  101. # This option controls how unsuccessful authentication attempts are mapped
  102. # to anonymous connections
  103. map to guest = bad user
  104.  
  105. ########## Domains ###########
  106.  
  107. # Is this machine able to authenticate users. Both PDC and BDC
  108. # must have this setting enabled. If you are the BDC you must
  109. # change the 'domain master' setting to no
  110. #
  111. ; domain logons = yes
  112. #
  113. # The following setting only takes effect if 'domain logons' is set
  114. # It specifies the location of the user's profile directory
  115. # from the client point of view)
  116. # The following required a [profiles] share to be setup on the
  117. # samba server (see below)
  118. ; logon path = \\%N\profiles\%U
  119. # Another common choice is storing the profile in the user's home directory
  120. # (this is Samba's default)
  121. # logon path = \\%N\%U\profile
  122.  
  123. # The following setting only takes effect if 'domain logons' is set
  124. # It specifies the location of a user's home directory (from the client
  125. # point of view)
  126. ; logon drive = H:
  127. # logon home = \\%N\%U
  128.  
  129. # The following setting only takes effect if 'domain logons' is set
  130. # It specifies the script to run during logon. The script must be stored
  131. # in the [netlogon] share
  132. # NOTE: Must be store in 'DOS' file format convention
  133. ; logon script = logon.cmd
  134.  
  135. # This allows Unix users to be created on the domain controller via the SAMR
  136. # RPC pipe. The example command creates a user account with a disabled Unix
  137. # password; please adapt to your needs
  138. ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
  139.  
  140. # This allows machine accounts to be created on the domain controller via the
  141. # SAMR RPC pipe.
  142. # The following assumes a "machines" group exists on the system
  143. ; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
  144.  
  145. # This allows Unix groups to be created on the domain controller via the SAMR
  146. # RPC pipe.
  147. ; add group script = /usr/sbin/addgroup --force-badname %g
  148.  
  149. ########## Printing ##########
  150.  
  151. # If you want to automatically load your printer list rather
  152. # than setting them up individually then you'll need this
  153. # load printers = yes
  154.  
  155. # lpr(ng) printing. You may wish to override the location of the
  156. # printcap file
  157. ; printing = bsd
  158. ; printcap name = /etc/printcap
  159.  
  160. # CUPS printing. See also the cupsaddsmb(8) manpage in the
  161. # cupsys-client package.
  162. ; printing = cups
  163. ; printcap name = cups
  164.  
  165. ############ Misc ############
  166.  
  167. # Using the following line enables you to customise your configuration
  168. # on a per machine basis. The %m gets replaced with the netbios name
  169. # of the machine that is connecting
  170. ; include = /home/samba/etc/smb.conf.%m
  171.  
  172. # Most people will find that this option gives better performance.
  173. # See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
  174. # for details
  175. # You may want to add the following on a Linux system:
  176. # SO_RCVBUF=8192 SO_SNDBUF=8192
  177. # socket options = TCP_NODELAY
  178.  
  179. # The following parameter is useful only if you have the linpopup package
  180. # installed. The samba maintainer and the linpopup maintainer are
  181. # working to ease installation and configuration of linpopup and samba.
  182. ; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
  183.  
  184. # Domain Master specifies Samba to be the Domain Master Browser. If this
  185. # machine will be configured as a BDC (a secondary logon server), you
  186. # must set this to 'no'; otherwise, the default behavior is recommended.
  187. # domain master = auto
  188.  
  189. # Some defaults for winbind (make sure you're not using the ranges
  190. # for something else.)
  191. ; idmap uid = 10000-20000
  192. ; idmap gid = 10000-20000
  193. ; template shell = /bin/bash
  194.  
  195. # The following was the default behaviour in sarge,
  196. # but samba upstream reverted the default because it might induce
  197. # performance issues in large organizations.
  198. # See Debian bug #368251 for some of the consequences of *not*
  199. # having this setting and smb.conf(5) for details.
  200. ; winbind enum groups = yes
  201. ; winbind enum users = yes
  202.  
  203. # Setup usershare options to enable non-root users to share folders
  204. # with the net usershare command.
  205.  
  206. # Maximum number of usershare. 0 (default) means that usershare is disabled.
  207. ; usershare max shares = 100
  208.  
  209. # Allow users who've been granted usershare privileges to create
  210. # public shares, not just authenticated ones
  211. usershare allow guests = yes
  212.  
  213. #======================= Share Definitions =======================
  214.  
  215. # Un-comment the following (and tweak the other settings below to suit)
  216. # to enable the default home directory shares. This will share each
  217. # user's home director as \\server\username
  218. ;[homes]
  219. ; comment = Home Directories
  220. ; browseable = no
  221.  
  222. # By default, the home directories are exported read-only. Change the
  223. # next parameter to 'no' if you want to be able to write to them.
  224. ; read only = yes
  225.  
  226. # File creation mask is set to 0700 for security reasons. If you want to
  227. # create files with group=rw permissions, set next parameter to 0775.
  228. ; create mask = 0700
  229.  
  230. # Directory creation mask is set to 0700 for security reasons. If you want to
  231. # create dirs. with group=rw permissions, set next parameter to 0775.
  232. ; directory mask = 0700
  233.  
  234. # By default, \\server\username shares can be connected to by anyone
  235. # with access to the samba server. Un-comment the following parameter
  236. # to make sure that only "username" can connect to \\server\username
  237. # The following parameter makes sure that only "username" can connect
  238. #
  239. # This might need tweaking when using external authentication schemes
  240. ; valid users = %S
  241.  
  242. # Un-comment the following and create the netlogon directory for Domain Logons
  243. # (you need to configure Samba to act as a domain controller too.)
  244. ;[netlogon]
  245. ; comment = Network Logon Service
  246. ; path = /home/samba/netlogon
  247. ; guest ok = yes
  248. ; read only = yes
  249.  
  250. # Un-comment the following and create the profiles directory to store
  251. # users profiles (see the "logon path" option above)
  252. # (you need to configure Samba to act as a domain controller too.)
  253. # The path below should be writable by all users so that their
  254. # profile directory may be created the first time they log on
  255. ;[profiles]
  256. ; comment = Users profiles
  257. ; path = /home/samba/profiles
  258. ; guest ok = no
  259. ; browseable = no
  260. ; create mask = 0600
  261. ; directory mask = 0700
  262.  
  263. [printers]
  264. comment = All Printers
  265. browseable = no
  266. path = /var/spool/samba
  267. printable = yes
  268. guest ok = no
  269. read only = yes
  270. create mask = 0700
  271.  
  272. # Windows clients look for this share name as a source of downloadable
  273. # printer drivers
  274. [print$]
  275. comment = Printer Drivers
  276. path = /var/lib/samba/printers
  277. browseable = yes
  278. read only = yes
  279. guest ok = no
  280. # Uncomment to allow remote administration of Windows print drivers.
  281. # You may need to replace 'lpadmin' with the name of the group your
  282. # admin users are members of.
  283. # Please note that you also need to set appropriate Unix permissions
  284. # to the drivers directory for these users to have write rights in it
  285. ; write list = root, @lpadmin
  286.  
  287. # A sample share for sharing your CD-ROM with others.
  288. ;[cdrom]
  289. ; comment = Samba server's CD-ROM
  290. ; read only = yes
  291. ; locking = no
  292. ; path = /cdrom
  293. ; guest ok = yes
  294.  
  295. # The next two parameters show how to auto-mount a CD-ROM when the
  296. # cdrom share is accesed. For this to work /etc/fstab must contain
  297. # an entry like this:
  298. #
  299. # /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0
  300. #
  301. # The CD-ROM gets unmounted automatically after the connection to the
  302. #
  303. # If you don't want to use auto-mounting/unmounting make sure the CD
  304. # is mounted on /cdrom
  305. #
  306. ; preexec = /bin/mount /cdrom
  307. ; postexec = /bin/umount /cdrom
  308. [film]
  309.  
  310. path = /home/robin/film
  311. read only = no
  312. guest ok = yes
  313. force user = robin
  314.  
  315. [serier]
  316.  
  317. path = /home/robin/serier
  318. read only = no
  319. guest ok = yes
  320. force user = robin
  321. [tv]
  322.  
  323. path = /home/robin/tv
  324. read only = no
  325. guest ok = yes
  326. force user = robin
  327.  
  328. [downloads]
  329.  
  330. path = /home/robin/downloads
  331. read only = no
  332. guest ok = yes
  333. force user = robin
Add Comment
Please, Sign In to add comment