summaryrefslogtreecommitdiff
path: root/samba/smb-shares-radio-raatstof.conf
blob: 9237a9220c65458562ae8950c558199ea23e9bd3 (plain)
  1. control:
  2.     AddInstallable = ( samba samba_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. adminshare = ( /home/fsadmin/COMMON/admin )
  17. profshare = ( /home/fsadmin/COMMON/samba/userprofiles )
  18. privpcshare = ( .pcshare )
  19. privmacshare = ( .macshare )
  20. privxchngshare = ( .xchangeshare )
  21. #
  22. # Administrative user and group
  23. #
  24. adminuser = ( fsadmin )
  25. admingrp = ( fsadmin )
  26. editfiles:
  27. samba::
  28. { /etc/samba/smb-shares-$(site).conf
  29. #
  30. # This file contains the shares common to a site.
  31. # We check if the proper sections are there and add them if they
  32. # isn't. We don't check the file line for line.
  33. #
  34. AutoCreate
  35. #
  36. # [netlogon]
  37. #
  38. BeginGroupIfNoLineMatching "^\[netlogon\]"
  39. Append '[netlogon]'
  40. Append ' comment = Network logon'
  41. Append ' path = $(netlogshare)'
  42. Append ' browsable = no'
  43. Append ' writeable = no'
  44. Append ' share modes = no'
  45. EndGroup
  46. #
  47. # [userprofiles]
  48. #
  49. BeginGroupIfNoLineMatching "^\[userprofiles\]"
  50. Append '[userprofiles]'
  51. Append ' path = $(profshare)'
  52. Append ' force user = %u'
  53. Append ' browsable = yes'
  54. Append ' writable = yes'
  55. Append ' root preexec = '/bin/mkdir $(profshare)/%U \'
  56. Append ' /bin/chown %U $(profshare)/%U \'
  57. Append ' /bin/chmod 700 $(profshare)/%U''
  58. EndGroup
  59. #
  60. # [homes]
  61. #
  62. BeginGroupIfNoLineMatching "^\[homes\]"
  63. Append '[homes]'
  64. Append ' path = /home/%u/$(privpcshare)'
  65. Append ' browsable = no'
  66. Append ' writable = yes'
  67. Append ' root preexec = '/bin/mkdir /home/%u/$(privpcshare) \'
  68. Append ' /bin/chown %U /home/%u/$(privpcshare) \'
  69. Append ' /bin/chmod 644 /home/%u/$(privpcshare)''
  70. EndGroup
  71. #
  72. # [programmer]
  73. #
  74. BeginGroupIfNoLineMatching "^\[software\]"
  75. Append '[software]'
  76. Append ' path = $(softshare)'
  77. Append ' comment = Fælles software'
  78. Append ' browsable = yes'
  79. Append ' guest ok = no'
  80. Append ' writeable = yes'
  81. Append ' create mask = 0660'
  82. Append ' directory mask = 0770'
  83. Append ' valid users = @$(admingrp)'
  84. Append ' force group = +$(admingrp)'
  85. Append ' delete veto files = Yes'
  86. Append ' veto files = /.AppleDouble/.AppleDesktop/Network Trash Folder/DesktopFolderDB/resource.frk/Icon^M/TheVolumeSettingsFolder/'
  87. EndGroup
  88. #
  89. # [faellesdrev]
  90. #
  91. BeginGroupIfNoLineMatching "^\[faellesdrev\]"
  92. Append '[faellesdrev]'
  93. Append ' path = $(datashare)'
  94. Append ' comment = Fælles drev for delte filer'
  95. Append ' browsable = yes'
  96. Append ' guest ok = no'
  97. Append ' writeable = yes'
  98. Append ' create mask = 0660'
  99. Append ' directory mask = 0770'
  100. Append ' valid users = @$(admingrp)'
  101. Append ' force group = +$(admingrp)'
  102. Append ' delete veto files = Yes'
  103. Append ' veto files = /.AppleDouble/.AppleDesktop/Network Trash Folder/DesktopFolderDB/resource.frk/Icon^M/TheVolumeSettingsFolder/'
  104. EndGroup
  105. #
  106. # [dokumenter]
  107. #
  108. BeginGroupIfNoLineMatching "^\[admin\]"
  109. Append '[admin]'
  110. Append ' path = $(adminshare)'
  111. Append ' comment = Dokumentation og adminværktøjer'
  112. Append ' browsable = yes'
  113. Append ' guest ok = yes'
  114. Append ' writeable = no'
  115. Append ' valid users = @$(admingrp)'
  116. Append ' force group = +$(admingrp)'
  117. EndGroup
  118. DefineClasses "samba_reload"
  119. }
  120. samba_reload::
  121. { /etc/samba/smb-shares-$(site).conf
  122. LocateLineMatching "^; EDITED BY CFENGINE .*"
  123. ReplaceAll '; EDITED BY CFENGINE .*$' With '; EDITED BY CFENGINE $(date)'
  124. CatchAbort
  125. BeginGroupIfNoMatch "^; EDITED BY CFENGINE .*"
  126. Append '; EDITED BY CFENGINE $(date)'
  127. EndGroup
  128. }
  129. directories:
  130. any::
  131. $(commonsharedir)
  132. mode=755
  133. owner=$(adminuser)
  134. group=$(admingrp)
  135. $(softshare)
  136. mode=775
  137. owner=$(adminuser)
  138. group=$(admingrp)
  139. $(datashare)
  140. mode=775
  141. owner=$(adminuser)
  142. group=$(admingrp)
  143. samba::
  144. $(netlogshare)
  145. mode=755
  146. owner=root
  147. group=root
  148. $(profshare)
  149. mode=775
  150. owner=$(adminuser)
  151. group=$(admingrp)
  152. $(adminshare)
  153. mode=755
  154. owner=$(adminuser)
  155. group=$(admingrp)
  156. processes:
  157. "smbd" restart "/etc/init.d/samba restart"
  158. shellcommands:
  159. samba_reload::
  160. "/etc/init.d/samba force-reload"