summaryrefslogtreecommitdiff
path: root/samba/smb-shares-xenuxlocal.conf
blob: 7c4351ddc9bacbb26add3783e039259f5bec3840 (plain)
  1. control:
  2.     AddInstallable = ( samba samba_reload netatalk netatalk_reload lprng lprng_reload cups cups_reload )
  3. #
  4. # Variables for shares
  5. # You can change the paths here and it will be changed both in
  6. # the conf file and in the filesystem - But once it is implemented,
  7. # it is not wise to change it - the data in the shares doesn't get
  8. # moved!
  9. # You can change the rights on the shares in the "directories:"
  10. # section.
  11. #
  12. netlogshare = ( /etc/samba/netlogon )
  13. commonsharedir = ( /home/fsadmin/COMMON )
  14. datashare = ( /home/fsadmin/COMMON/documents )
  15. softshare = ( /home/fsadmin/COMMON/software )
  16. profshare = ( /home/fsadmin/COMMON/samba/userprofiles )
  17. privpcshare = ( .pcshare )
  18. privmacshare = ( .macshare )
  19. privxchngshare = ( .xchangeshare )
  20. #
  21. # Administrative user and group
  22. #
  23. adminuser = ( fsadmin )
  24. admingrp = ( fsadmin )
  25. editfiles:
  26. samba::
  27. { /etc/samba/smb-shares-$(site).conf
  28. #
  29. # This file contains the shares common to a site.
  30. # We check if the proper sections are there and add them if they
  31. # isn't. We don't check the file line for line.
  32. #
  33. AutoCreate
  34. #
  35. # [netlogon]
  36. #
  37. BeginGroupIfNoLineMatching "^\[netlogon\]"
  38. Append '[netlogon]'
  39. Append ' comment = Network logon'
  40. Append ' path = $(netlogshare)'
  41. Append ' browsable = no'
  42. Append ' writeable = no'
  43. Append ' share modes = no'
  44. EndGroup
  45. #
  46. # [userprofiles]
  47. #
  48. BeginGroupIfNoLineMatching "^\[userprofiles\]"
  49. Append '[userprofiles]'
  50. Append ' path = $(profshare)'
  51. Append ' force user = %u'
  52. Append ' writable = yes'
  53. Append ' browsable = no'
  54. Append ' root preexec = /bin/mkdir $(profshare)/%U \'
  55. Append ' /bin/chown %U $(profshare)/%U \'
  56. Append ' /bin/chmod 700 $(profshare)/%U'
  57. EndGroup
  58. #
  59. # [homes]
  60. #
  61. BeginGroupIfNoLineMatching "^\[homes\]"
  62. Append '[homes]'
  63. Append ' path = %H/$(privpcshare)'
  64. Append ' browsable = no'
  65. Append ' writeable = yes'
  66. Append ' root preexec = /bin/mkdir %H/$(privpcshare) \'
  67. Append ' /bin/chown %S %H/$(privpcshare) \'
  68. Append ' /bin/chmod 700 %H/$(privpcshare)'
  69. EndGroup
  70. #
  71. # [programmer]
  72. #
  73. BeginGroupIfNoLineMatching "^\[software\]"
  74. Append '[software]'
  75. Append ' path = $(softshare)'
  76. Append ' comment = Fælles software'
  77. Append ' browsable = yes'
  78. Append ' guest ok = no'
  79. Append ' writeable = yes'
  80. Append ' create mask = 0660'
  81. Append ' directory mask = 0770'
  82. Append ' valid users = @$(admingrp)'
  83. Append ' force group = +$(admingrp)'
  84. Append ' delete veto files = Yes'
  85. Append ' veto files = /.AppleDouble/.AppleDesktop/Network Trash Folder/DesktopFolderDB/resource.frk/Icon^M/TheVolumeSettingsFolder/'
  86. EndGroup
  87. #
  88. # [dokumenter]
  89. #
  90. BeginGroupIfNoLineMatching "^\[dokumenter\]"
  91. Append '[dokumenter]'
  92. Append ' path = $(datashare)'
  93. Append ' comment = Fælles dokumenter'
  94. Append ' browsable = yes'
  95. Append ' guest ok = no'
  96. Append ' writeable = yes'
  97. Append ' create mask = 0660'
  98. Append ' directory mask = 0770'
  99. Append ' valid users = @$(admingrp)'
  100. Append ' force group = +$(admingrp)'
  101. Append ' delete veto files = Yes'
  102. Append ' veto files = /.AppleDouble/.AppleDesktop/Network Trash Folder/DesktopFolderDB/resource.frk/Icon^M/TheVolumeSettingsFolder/'
  103. EndGroup
  104. #
  105. # [mp3]
  106. #
  107. BeginGroupIfNoLineMatching "^\[mp3\]"
  108. Append '[mp3]'
  109. Append ' comment = Mp3 filer'
  110. Append ' path = /home/jrisch/mp3'
  111. Append ' public = no'
  112. Append ' valid users = @jrisch'
  113. Append ' force group = +jrisch'
  114. Append ' writable = yes'
  115. Append ' create mask = 0660'
  116. Append ' directory mask = 0770'
  117. EndGroup
  118. #
  119. # [media]
  120. #
  121. BeginGroupIfNoLineMatching "^\[media\]"
  122. Append '[media]'
  123. Append ' comment = Mp3 filer, film, spil etc.'
  124. Append ' path = /home/jrisch/media'
  125. Append ' public = no'
  126. Append ' valid users = @jrisch'
  127. Append ' force group = +jrisch'
  128. Append ' writable = yes'
  129. Append ' create mask = 0660'
  130. Append ' directory mask = 0770'
  131. EndGroup
  132. DefineClasses "samba_reload"
  133. }
  134. samba_reload::
  135. { /etc/samba/smb-shares-$(site).conf
  136. LocateLineMatching "^; EDITED BY CFENGINE .*"
  137. ReplaceAll '; EDITED BY CFENGINE .*$' With '; EDITED BY CFENGINE $(date)'
  138. CatchAbort
  139. BeginGroupIfNoMatch "^; EDITED BY CFENGINE .*"
  140. Append '; EDITED BY CFENGINE $(date)'
  141. EndGroup
  142. }
  143. directories:
  144. any::
  145. $(commonsharedir)
  146. mode=755
  147. owner=$(adminuser)
  148. group=$(admingrp)
  149. $(softshare)
  150. mode=775
  151. owner=$(adminuser)
  152. group=$(admingrp)
  153. $(datashare)
  154. mode=775
  155. owner=$(adminuser)
  156. group=$(admingrp)
  157. samba::
  158. $(netlogshare)
  159. mode=755
  160. owner=root
  161. group=root
  162. $(profshare)
  163. mode=777
  164. owner=$(adminuser)
  165. group=$(admingrp)
  166. processes:
  167. "smbd" restart "/etc/init.d/samba restart"
  168. shellcommands:
  169. samba_reload::
  170. "/etc/init.d/samba force-reload"