Advertisement
Guest User

Untitled

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