Guest User

Untitled

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