Advertisement
Guest User

Untitled

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