From 15f0be0510d0483b17a6e6a2e1146e083b0f2977 Mon Sep 17 00:00:00 2001 From: Juri Jensen Date: Fri, 11 Jan 2002 11:15:32 +0000 Subject: cfengine: Moved some files due to the sitename change. Modified the shares definition file for xenuxlocal to reflect the new standard. --- samba/smb-shares-raatstof.conf | 145 --------------------------- samba/smb-shares-radio-raatstof.conf | 145 +++++++++++++++++++++++++++ samba/smb-shares-xenuxlocal.conf | 185 +++++++++++++++++++++++++++++++---- 3 files changed, 312 insertions(+), 163 deletions(-) delete mode 100644 samba/smb-shares-raatstof.conf create mode 100644 samba/smb-shares-radio-raatstof.conf (limited to 'samba') diff --git a/samba/smb-shares-raatstof.conf b/samba/smb-shares-raatstof.conf deleted file mode 100644 index 20bacdb..0000000 --- a/samba/smb-shares-raatstof.conf +++ /dev/null @@ -1,145 +0,0 @@ -control: - AddInstallable = ( samba samba_reload netatalk netatalk_reload lprng lprng_reload cups cups_reload ) - - # - # Variables for shares - # You can change the paths here and it will be changed both in - # the conf file and in the filesystem - But once it is implemented, - # it is not wise to change it - the data in the shares doesn't get - # moved! - # You can change the rights on the shares in the "directories:" - # section. - # - netlogshare = ( /etc/samba/netlogon ) - commonsharedir = ( /home/fsadmin/COMMON ) - datashare = ( /home/fsadmin/COMMON/documents ) - softshare = ( /home/fsadmin/COMMON/software ) - profshare = ( /home/fsadmin/COMMON/samba/userprofiles ) -# printdir = ( /var/spool/lpd/sharedprinter ) - privpcshare = ( .pcshare ) - privmacshare = ( .macshare ) - privxchngshare = ( .xchangeshare ) - - # - # Administrative user and group - # - adminuser = ( fsadmin ) - admingrp = ( fsadmin ) - -editfiles: - samba:: - { /etc/samba/smb-shares-$(site).conf - # - # This file contains the shares common to a site. - # We check if the proper sections are there and add them if they - # isn't. We don't check the file line for line. - # - AutoCreate - # - # [netlogon] - # - BeginGroupIfNoLineMatching "^\[netlogon\]" - Append '[netlogon]' - Append ' comment = Network logon' - Append ' path = $(netlogshare)' - Append ' browsable = no' - Append ' writeable = no' - Append ' share modes = no' - EndGroup - # - # [userprofiles] - # - BeginGroupIfNoLineMatching "^\[userprofiles\]" - Append '[userprofiles]' - Append ' path = $(profshare)' - Append ' force user = %u' - Append ' writable = yes' - Append ' browsable = no' - Append ' root preexec = /bin/mkdir $(profshare)/%U \' - Append ' /bin/chown %U $(profshare)/%U \' - Append ' /bin/chmod 700 $(profshare)/%U' - EndGroup - # - # [homes] - # - BeginGroupIfNoLineMatching "^\[homes\]" - Append '[homes]' - Append ' path = /home/%u/$(privpcshare)' - Append ' browsable = no' - Append ' root preexec = /bin/mkdir /home/%u/$(privpcshare) \' - Append ' /bin/chown %U /home/%u/$(privpcshare) \' - Append ' /bin/chmod 644 /home/%u/$(privpcshare)' - EndGroup - # - # [programmer] - # - BeginGroupIfNoLineMatching "^\[software\]" - Append '[software]' - Append ' path = $(softshare)' - Append ' comment = Fælles software' - Append ' browsable = yes' - Append ' guest ok = no' - Append ' writeable = yes' - Append ' valid users = @$(admingrp)' - Append ' force group = +$(admingrp)' - EndGroup - # - # [dokumenter] - # - BeginGroupIfNoLineMatching "^\[dokumenter\]" - Append '[dokumenter]' - Append ' path = $(datashare)' - Append ' comment = Fælles dokumenter' - Append ' browsable = yes' - Append ' guest ok = no' - Append ' writeable = yes' - Append ' valid users = @$(admingrp)' - Append ' force group = +$(admingrp)' - EndGroup - DefineClasses "samba_reload" - } - - samba_reload:: - { /etc/samba/smb-shares-$(site).conf - LocateLineMatching "^; EDITED BY CFENGINE .*" - ReplaceAll '; EDITED BY CFENGINE .*$' With '; EDITED BY CFENGINE $(date)' - CatchAbort - BeginGroupIfNoMatch "^; EDITED BY CFENGINE .*" - Append '; EDITED BY CFENGINE $(date)' - EndGroup - } - -directories: - any:: - $(commonsharedir) - mode=755 - owner=$(adminuser) - group=$(admingrp) - $(softshare) - mode=775 - owner=$(adminuser) - group=$(admingrp) - $(datashare) - mode=775 - owner=$(adminuser) - group=$(admingrp) - samba:: - $(netlogshare) - mode=755 - owner=root - group=root - $(profshare) - mode=775 - owner=$(adminuser) - group=$(admingrp) - $(printdir) - mode=775 - owner=root - group=root - -processes: - "smbd" restart "/etc/init.d/samba restart" - -shellcommands: - samba_reload:: - "/etc/init.d/samba force-reload" diff --git a/samba/smb-shares-radio-raatstof.conf b/samba/smb-shares-radio-raatstof.conf new file mode 100644 index 0000000..be2b5f1 --- /dev/null +++ b/samba/smb-shares-radio-raatstof.conf @@ -0,0 +1,145 @@ +control: + AddInstallable = ( samba samba_reload netatalk netatalk_reload lprng lprng_reload cups cups_reload ) + + # + # Variables for shares + # You can change the paths here and it will be changed both in + # the conf file and in the filesystem - But once it is implemented, + # it is not wise to change it - the data in the shares doesn't get + # moved! + # You can change the rights on the shares in the "directories:" + # section. + # + netlogshare = ( /etc/samba/netlogon ) + commonsharedir = ( /home/fsadmin/COMMON ) + datashare = ( /home/fsadmin/COMMON/documents ) + softshare = ( /home/fsadmin/COMMON/software ) + profshare = ( /home/fsadmin/COMMON/samba/userprofiles ) + printdir = ( /var/spool/lpd/sharedprinter ) + privpcshare = ( .pcshare ) + privmacshare = ( .macshare ) + privxchngshare = ( .xchangeshare ) + + # + # Administrative user and group + # + adminuser = ( fsadmin ) + admingrp = ( fsadmin ) + +editfiles: + samba:: + { /etc/samba/smb-shares-$(site).conf + # + # This file contains the shares common to a site. + # We check if the proper sections are there and add them if they + # isn't. We don't check the file line for line. + # + AutoCreate + # + # [netlogon] + # + BeginGroupIfNoLineMatching "^\[netlogon\]" + Append '[netlogon]' + Append ' comment = Network logon' + Append ' path = $(netlogshare)' + Append ' browsable = no' + Append ' writeable = no' + Append ' share modes = no' + EndGroup + # + # [userprofiles] + # + BeginGroupIfNoLineMatching "^\[userprofiles\]" + Append '[userprofiles]' + Append ' path = $(profshare)' + Append ' force user = %u' + Append ' writable = yes' + Append ' browsable = no' + Append ' root preexec = /bin/mkdir $(profshare)/%U \' + Append ' /bin/chown %U $(profshare)/%U \' + Append ' /bin/chmod 700 $(profshare)/%U' + EndGroup + # + # [homes] + # + BeginGroupIfNoLineMatching "^\[homes\]" + Append '[homes]' + Append ' path = /home/%u/$(privpcshare)' + Append ' browsable = no' + Append ' root preexec = /bin/mkdir /home/%u/$(privpcshare) \' + Append ' /bin/chown %U /home/%u/$(privpcshare) \' + Append ' /bin/chmod 644 /home/%u/$(privpcshare)' + EndGroup + # + # [programmer] + # + BeginGroupIfNoLineMatching "^\[software\]" + Append '[software]' + Append ' path = $(softshare)' + Append ' comment = Fælles software' + Append ' browsable = yes' + Append ' guest ok = no' + Append ' writeable = yes' + Append ' valid users = @$(admingrp)' + Append ' force group = +$(admingrp)' + EndGroup + # + # [dokumenter] + # + BeginGroupIfNoLineMatching "^\[dokumenter\]" + Append '[dokumenter]' + Append ' path = $(datashare)' + Append ' comment = Fælles dokumenter' + Append ' browsable = yes' + Append ' guest ok = no' + Append ' writeable = yes' + Append ' valid users = @$(admingrp)' + Append ' force group = +$(admingrp)' + EndGroup + DefineClasses "samba_reload" + } + + samba_reload:: + { /etc/samba/smb-shares-$(site).conf + LocateLineMatching "^; EDITED BY CFENGINE .*" + ReplaceAll '; EDITED BY CFENGINE .*$' With '; EDITED BY CFENGINE $(date)' + CatchAbort + BeginGroupIfNoMatch "^; EDITED BY CFENGINE .*" + Append '; EDITED BY CFENGINE $(date)' + EndGroup + } + +directories: + any:: + $(commonsharedir) + mode=755 + owner=$(adminuser) + group=$(admingrp) + $(softshare) + mode=775 + owner=$(adminuser) + group=$(admingrp) + $(datashare) + mode=775 + owner=$(adminuser) + group=$(admingrp) + samba:: + $(netlogshare) + mode=755 + owner=root + group=root + $(profshare) + mode=775 + owner=$(adminuser) + group=$(admingrp) + $(printdir) + mode=775 + owmer=root + group=root + +processes: + "smbd" restart "/etc/init.d/samba restart" + +shellcommands: + samba_reload:: + "/etc/init.d/samba force-reload" diff --git a/samba/smb-shares-xenuxlocal.conf b/samba/smb-shares-xenuxlocal.conf index 0a1c043..64d4de3 100644 --- a/samba/smb-shares-xenuxlocal.conf +++ b/samba/smb-shares-xenuxlocal.conf @@ -1,20 +1,169 @@ -[mp3] - comment = Mp3 filer - path = /home/jrisch/mp3 - public = no - valid users = @jrisch - force group = +jrisch - writable = yes - create mask = 0660 - directory mask = 0770 +control: + AddInstallable = ( samba samba_reload netatalk netatalk_reload lprng lprng_reload cups cups_reload ) + + # + # Variables for shares + # You can change the paths here and it will be changed both in + # the conf file and in the filesystem - But once it is implemented, + # it is not wise to change it - the data in the shares doesn't get + # moved! + # You can change the rights on the shares in the "directories:" + # section. + # + netlogshare = ( /etc/samba/netlogon ) + commonsharedir = ( /home/fsadmin/COMMON ) + datashare = ( /home/fsadmin/COMMON/documents ) + softshare = ( /home/fsadmin/COMMON/software ) + profshare = ( /home/fsadmin/COMMON/samba/userprofiles ) + privpcshare = ( .pcshare ) + privmacshare = ( .macshare ) + privxchngshare = ( .xchangeshare ) + + # + # Administrative user and group + # + adminuser = ( fsadmin ) + admingrp = ( fsadmin ) + +editfiles: + samba:: + { /etc/samba/smb-shares-$(site).conf + # + # This file contains the shares common to a site. + # We check if the proper sections are there and add them if they + # isn't. We don't check the file line for line. + # + AutoCreate + # + # [netlogon] + # + BeginGroupIfNoLineMatching "^\[netlogon\]" + Append '[netlogon]' + Append ' comment = Network logon' + Append ' path = $(netlogshare)' + Append ' browsable = no' + Append ' writeable = no' + Append ' share modes = no' + EndGroup + # + # [userprofiles] + # + BeginGroupIfNoLineMatching "^\[userprofiles\]" + Append '[userprofiles]' + Append ' path = $(profshare)' + Append ' force user = %u' + Append ' writable = yes' + Append ' browsable = no' + Append ' root preexec = /bin/mkdir $(profshare)/%U \' + Append ' /bin/chown %U $(profshare)/%U \' + Append ' /bin/chmod 700 $(profshare)/%U' + EndGroup + # + # [homes] + # + BeginGroupIfNoLineMatching "^\[homes\]" + Append '[homes]' + Append ' path = /home/%u/$(privpcshare)' + Append ' browsable = no' + Append ' root preexec = /bin/mkdir /home/%u/$(privpcshare) \' + Append ' /bin/chown %U /home/%u/$(privpcshare) \' + Append ' /bin/chmod 644 /home/%u/$(privpcshare)' + EndGroup + # + # [programmer] + # + BeginGroupIfNoLineMatching "^\[software\]" + Append '[software]' + Append ' path = $(softshare)' + Append ' comment = Fælles software' + Append ' browsable = yes' + Append ' guest ok = no' + Append ' writeable = yes' + Append ' valid users = @$(admingrp)' + Append ' force group = +$(admingrp)' + EndGroup + # + # [dokumenter] + # + BeginGroupIfNoLineMatching "^\[dokumenter\]" + Append '[dokumenter]' + Append ' path = $(datashare)' + Append ' comment = Fælles dokumenter' + Append ' browsable = yes' + Append ' guest ok = no' + Append ' writeable = yes' + Append ' valid users = @$(admingrp)' + Append ' force group = +$(admingrp)' + EndGroup + # + # [mp3] + # + BeginGroupIfNoLineMatching "^\[mp3\]" + Append '[mp3]' + Append ' comment = Mp3 filer' + Append ' path = /home/jrisch/mp3' + Append ' public = no' + Append ' valid users = @jrisch' + Append ' force group = +jrisch' + Append ' writable = yes' + Append ' create mask = 0660' + Append ' directory mask = 0770' + EndGroup + # + # [media] + # + BeginGroupIfNoLineMatching "^\[media\]" + Append '[media]' + Append ' comment = Mp3 filer, film, spil etc.' + Append ' path = /home/jrisch/media' + Append ' public = no' + Append ' valid users = @jrisch' + Append ' force group = +jrisch' + Append ' writable = yes' + Append ' create mask = 0660' + Append ' directory mask = 0770' + EndGroup -[media] - comment = Mp3 filer, film, spil etc. - path = /home/jrisch/media - public = no - valid users = @jrisch - force group = +jrisch - writable = yes - create mask = 0660 - directory mask = 0770 + DefineClasses "samba_reload" + } + samba_reload:: + { /etc/samba/smb-shares-$(site).conf + LocateLineMatching "^; EDITED BY CFENGINE .*" + ReplaceAll '; EDITED BY CFENGINE .*$' With '; EDITED BY CFENGINE $(date)' + CatchAbort + BeginGroupIfNoMatch "^; EDITED BY CFENGINE .*" + Append '; EDITED BY CFENGINE $(date)' + EndGroup + } + +directories: + any:: + $(commonsharedir) + mode=755 + owner=$(adminuser) + group=$(admingrp) + $(softshare) + mode=775 + owner=$(adminuser) + group=$(admingrp) + $(datashare) + mode=775 + owner=$(adminuser) + group=$(admingrp) + samba:: + $(netlogshare) + mode=755 + owner=root + group=root + $(profshare) + mode=775 + owner=$(adminuser) + group=$(admingrp) + +processes: + "smbd" restart "/etc/init.d/samba restart" + +shellcommands: + samba_reload:: + "/etc/init.d/samba force-reload" -- cgit v1.2.3