summaryrefslogtreecommitdiff
path: root/samba/smb-shares-xenuxlocal.conf
blob: 64d4de3e326c8ddd68d6d42f042736e893b88da2 (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 = /home/%u/$(privpcshare)'
  64. Append ' browsable = no'
  65. Append ' root preexec = /bin/mkdir /home/%u/$(privpcshare) \'
  66. Append ' /bin/chown %U /home/%u/$(privpcshare) \'
  67. Append ' /bin/chmod 644 /home/%u/$(privpcshare)'
  68. EndGroup
  69. #
  70. # [programmer]
  71. #
  72. BeginGroupIfNoLineMatching "^\[software\]"
  73. Append '[software]'
  74. Append ' path = $(softshare)'
  75. Append ' comment = Fælles software'
  76. Append ' browsable = yes'
  77. Append ' guest ok = no'
  78. Append ' writeable = yes'
  79. Append ' valid users = @$(admingrp)'
  80. Append ' force group = +$(admingrp)'
  81. EndGroup
  82. #
  83. # [dokumenter]
  84. #
  85. BeginGroupIfNoLineMatching "^\[dokumenter\]"
  86. Append '[dokumenter]'
  87. Append ' path = $(datashare)'
  88. Append ' comment = Fælles dokumenter'
  89. Append ' browsable = yes'
  90. Append ' guest ok = no'
  91. Append ' writeable = yes'
  92. Append ' valid users = @$(admingrp)'
  93. Append ' force group = +$(admingrp)'
  94. EndGroup
  95. #
  96. # [mp3]
  97. #
  98. BeginGroupIfNoLineMatching "^\[mp3\]"
  99. Append '[mp3]'
  100. Append ' comment = Mp3 filer'
  101. Append ' path = /home/jrisch/mp3'
  102. Append ' public = no'
  103. Append ' valid users = @jrisch'
  104. Append ' force group = +jrisch'
  105. Append ' writable = yes'
  106. Append ' create mask = 0660'
  107. Append ' directory mask = 0770'
  108. EndGroup
  109. #
  110. # [media]
  111. #
  112. BeginGroupIfNoLineMatching "^\[media\]"
  113. Append '[media]'
  114. Append ' comment = Mp3 filer, film, spil etc.'
  115. Append ' path = /home/jrisch/media'
  116. Append ' public = no'
  117. Append ' valid users = @jrisch'
  118. Append ' force group = +jrisch'
  119. Append ' writable = yes'
  120. Append ' create mask = 0660'
  121. Append ' directory mask = 0770'
  122. EndGroup
  123. DefineClasses "samba_reload"
  124. }
  125. samba_reload::
  126. { /etc/samba/smb-shares-$(site).conf
  127. LocateLineMatching "^; EDITED BY CFENGINE .*"
  128. ReplaceAll '; EDITED BY CFENGINE .*$' With '; EDITED BY CFENGINE $(date)'
  129. CatchAbort
  130. BeginGroupIfNoMatch "^; EDITED BY CFENGINE .*"
  131. Append '; EDITED BY CFENGINE $(date)'
  132. EndGroup
  133. }
  134. directories:
  135. any::
  136. $(commonsharedir)
  137. mode=755
  138. owner=$(adminuser)
  139. group=$(admingrp)
  140. $(softshare)
  141. mode=775
  142. owner=$(adminuser)
  143. group=$(admingrp)
  144. $(datashare)
  145. mode=775
  146. owner=$(adminuser)
  147. group=$(admingrp)
  148. samba::
  149. $(netlogshare)
  150. mode=755
  151. owner=root
  152. group=root
  153. $(profshare)
  154. mode=775
  155. owner=$(adminuser)
  156. group=$(admingrp)
  157. processes:
  158. "smbd" restart "/etc/init.d/samba restart"
  159. shellcommands:
  160. samba_reload::
  161. "/etc/init.d/samba force-reload"