Advertisement
Guest User

Untitled

a guest
May 5th, 2017
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.08 KB | None | 0 0
  1. # Defining domain name, hostname
  2. ####################################################
  3. [global]
  4. dns proxy = no
  5. netbios name = pdc
  6. wins support = Yes
  7. workgroup = SEMARKIT
  8. include = /etc/samba/dhcp.conf
  9. server string = Debian Lenny (5.0.3) PDC
  10. name resolve order = host lmhosts wins bcast
  11.  
  12. # Netwok-settings
  13. ####################################################
  14. hosts deny = ALL
  15. hosts allow = 192.168.1.0/24 127.
  16.  
  17. # Specifying passwd backend database
  18. ####################################################
  19. # username map = /etc/samba/smbusers
  20. # smb passwd file = /etc/samba/smbpasswd
  21. # passdb backend = tdbsam:/etc/samba/userdatabase.tdb
  22. passdb backend = ldapsam:ldap://127.0.0.1:389
  23.  
  24. # LDAPSMB-CONFIG - SMBLDAP-TOOLS
  25. ####################################################
  26. # LDAPSMB-CONFIG
  27. # add user script = /usr/sbin/ldapsmb -a -u "%u"
  28. # add machine script = /usr/sbin/ldapsmb -a -w "%u"
  29. # add group script = /usr/sbin/ldapsmb -a -g "%g"
  30. # add user to group script = /usr/sbin/ldapsmb -j -u "%u" -g "%g"
  31. # delete user script = /usr/sbin/ldapsmb -d -u "%u"
  32. # delete group script = /usr/sbin/ldapsmb -d -g "%g"
  33. # delete user from group script = /usr/sbin/ldapsmb -r -u "%u" -g "%g"
  34. # set primary group script = /usr/sbin/ldapsmb -m -u "%u" -g "%g"
  35.  
  36. # SMBLDAP-TOOLS
  37. add user script = /usr/sbin/smbldap-useradd -a -m "%u"
  38. add machine script = /usr/sbin/smbldap-useradd -w "%u"
  39. add group script = /usr/sbin/smbldap-groupadd -p "%g"
  40. add user to group script = /usr/sbin/smbldap-groupmod -m "%u" "%g"
  41. delete user script = /usr/sbin/smbldap-userdel "%u"
  42. delete group script = /usr/sbin/smbldap-groupdel "%g"
  43. delete user from group script = /usr/sbin/smbldap-groupmod -x "%u" "%g"
  44. set primary group script = /usr/sbin/smbldap-usermod -g "%g" "%u"
  45.  
  46. # TDBSAM
  47. # add user script = /usr/sbin/useradd -m %u
  48. # delete user script = /usr/sbin/userdel -r %u
  49. # add group script = /usr/sbin/groupadd %g
  50. # delete group script = /usr/sbin/groupdel %g
  51. # add user to group script = /usr/sbin/usermod -G %g %u
  52. # add machine script = /usr/sbin/useradd -s /bin/false -d /dev/null -g machines %u
  53.  
  54.  
  55. # Various other directives ( man smb.conf )
  56. ###################################################
  57. logon drive = H:
  58. logon home = \\%L\%U
  59. # logon path = \\%L\profile\%U
  60. logon script = scripts/logon.bat
  61. os level = 65
  62. time server = Yes
  63. domain master = Yes
  64. domain logons = Yes
  65. preferred master = Yes
  66. enable privileges = yes
  67. show add printer wizard = yes
  68. dont descend = /proc,/dev,/etc,/lib,/lost+found,/initrd
  69.  
  70. # Windbind
  71. ##################################################
  72. winbind separator = %
  73. winbind cache time = 10
  74. winbind enum users = Yes
  75. winbind uid = 1000-21000
  76. winbind gid = 1000-21000
  77. winbind enum groups = Yes
  78. template shell = /bin/bash
  79. template homedir = /home/%U
  80. winbind use default domain = Yes
  81.  
  82. # OpenLDAP stuff is defined here
  83. ###################################################
  84. ldap ssl = no
  85. ldap delete dn = Yes
  86. ldap passwd sync = Yes
  87. ldap user suffix = ou=Users
  88. ldap idmap suffix = ou=Users
  89. ldap group suffix = ou=Groups
  90. ldap machine suffix = ou=Computers
  91. ldap suffix = dc=semarkit,dc=dk
  92. ldap admin dn = cn=admin,dc=semarkit,dc=dk
  93. idmap uid = 1000-21000
  94. idmap gid = 1000-21000
  95.  
  96. # Defining logging facility
  97. ####################################################
  98. syslog = 10
  99. log level = 256
  100. log file = /var/log/samba/%m.log
  101. panic action = /usr/share/samba/panic-action %d
  102.  
  103. # Authentication
  104. ####################################################
  105. local master = yes
  106. nt acl support = yes
  107.  
  108. security = user
  109. encrypt passwords = true
  110. unix password sync = yes
  111. pam password change = yes
  112. obey pam restrictions = no
  113.  
  114. # Removed for windows clients roaming pofile
  115. # invalid users = root
  116.  
  117. # For unix passwd change - dosen't matter if running LDAP for UNIX auth
  118. # passwd program = /usr/bin/passwd %u
  119. # passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
  120. passwd program = /usr/sbin/smbldap-passwd %u
  121. passwd chat = *Nyt kodeord* \n *Det nye kodeord skal v�re minimum 6 karaktere lange, og kan indeholde [0-9], [a-z] og [A-Z]* \n *Ny kode* %n\n *Gentag koden* %n\n *Koden skiftet korrekt*
  122.  
  123. # Specifying printing subsystem
  124. ####################################################
  125. printing = cups
  126. load printers = Yes
  127. printcap name = cups
  128.  
  129. # Virus Scanning Definitions
  130. ####################################################
  131. # vfs object = vscan-clamav
  132. # vscan-clamav: config-file = /etc/samba/vscan-clamav.conf
  133.  
  134. # Misc
  135. ###################################################
  136. socket options = TCP_NODELAY
  137.  
  138. # SHARE
  139. ##################################################
  140. [homes]
  141. comment = Home Directories
  142. read only = No
  143. browseable = Yes
  144. valid users = %U
  145. create mode = 0750
  146. create mask = 0750
  147.  
  148. [html]
  149. comment = www
  150. path = /home/%U/public
  151. valid users = %U
  152. writeable = Yes
  153. browseable = Yes
  154. guest ok = No
  155.  
  156. # Defining printers
  157. ####################################################
  158. [printers]
  159. comment = All Printers
  160. path = /var/spool/samba
  161. printer admin = @"Print Operators"
  162. public = Yes
  163. guest ok = Yes
  164. read only = Yes
  165. printable = Yes
  166. browseable = No
  167.  
  168. [print$]
  169. comment = Printer Drivers
  170. path = /etc/samba/drivers
  171. guest ok = No
  172. read only = Yes
  173. browseable = Yes
  174. create mask = 0664
  175. directory mask = 0775
  176. write list = @"Print Operators"
  177. # valid users = @"Print Operators"
  178.  
  179.  
  180. # Defining network logon service
  181. ####################################################
  182. [netlogon]
  183. comment = Network Logon Service
  184. path = /var/lib/samba/netlogon
  185. guest ok = Yes
  186. browseable = No
  187. write list = "@admins"
  188.  
  189. # Defining profile share ( for roaming profiles )
  190. ####################################################
  191. [profiles]
  192. comment = Roaming Profiles
  193. path = /var/lib/samba/profiles
  194. create mask = 0664
  195. directory mask = 0755
  196. browseable = No
  197. guest ok = Yes
  198. force user = %U
  199. valid users = %U "Domain Admins"
  200. read only = No
  201. profile acls = Yes
  202. writeable = Yes
  203.  
  204. # Defining arbitary shared resource
  205. ####################################################
  206. [share]
  207. comment = data share
  208. path = /opt/stuff
  209. valid users = %U
  210.  
  211. # Mnt
  212. ####################################################
  213. #[mnt]
  214. # path = /mnt
  215. # guest ok = No
  216. # read only = No
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement