summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dhcpd.conf.divitech20
-rw-r--r--samba/netlogon/logon-divitech.bat6
-rw-r--r--samba/smb-shares-divitech.conf155
3 files changed, 181 insertions, 0 deletions
diff --git a/dhcpd.conf.divitech b/dhcpd.conf.divitech
new file mode 100644
index 0000000..acca1f4
--- /dev/null
+++ b/dhcpd.conf.divitech
@@ -0,0 +1,20 @@
+# dhcpd.conf
+#
+# DHCP configuration file for divitech.local
+#
+
+default-lease-time 1200;
+max-lease-time 7200;
+
+option subnet-mask 255.255.255.0;
+option routers 192.168.6.1;
+option domain-name-servers 192.168.6.1, 212.242.41.248, 212.242.41.249;
+option domain-name "divitech.local";
+option netbios-name-servers 192.168.6.1;
+
+# According to our policy, the dynamic address space starts
+# at .60 and ends at .229 giving 170 client addresses.
+# (See "System Description --> Network Model")
+subnet 192.168.6.0 netmask 255.255.255.0 {
+ range 192.168.6.60 192.168.6.229;
+}
diff --git a/samba/netlogon/logon-divitech.bat b/samba/netlogon/logon-divitech.bat
new file mode 100644
index 0000000..8eb6e45
--- /dev/null
+++ b/samba/netlogon/logon-divitech.bat
@@ -0,0 +1,6 @@
+rem [Global] commands
+NET TIME \\baal /SET /YES
+NET USE W: \\baal\dokumenter /YES
+NET USE X: \\baal\homes /YES
+NET USE Y: \\baal\software /YES
+ \ No newline at end of file
diff --git a/samba/smb-shares-divitech.conf b/samba/smb-shares-divitech.conf
new file mode 100644
index 0000000..bbf84a2
--- /dev/null
+++ b/samba/smb-shares-divitech.conf
@@ -0,0 +1,155 @@
+control:
+ AddInstallable = ( samba samba_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 )
+ adminshare = ( /home/fsadmin/COMMON/admin )
+ profshare = ( /home/fsadmin/COMMON/samba/userprofiles )
+ privpcshare = ( .pcshare )
+
+ #
+ # 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 ' browsable = yes'
+ Append ' writable = yes'
+ EndGroup
+ #
+ # [homes]
+ #
+ BeginGroupIfNoLineMatching "^\[homes\]"
+ Append '[homes]'
+ Append ' path = /home/%u/$(privpcshare)'
+ Append ' browsable = no'
+ Append ' writable = yes'
+ 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 ' create mask = 0660'
+ Append ' directory mask = 0770'
+ Append ' valid users = @$(admingrp)'
+ Append ' force group = +$(admingrp)'
+ EndGroup
+ #
+ # [dokumenter]
+ #
+ BeginGroupIfNoLineMatching "^\[dokumenter\]"
+ Append '[dokumenter]'
+ Append ' path = $(datashare)'
+ Append ' comment = Fælles drev for delte filer'
+ Append ' browsable = yes'
+ Append ' guest ok = no'
+ Append ' writeable = yes'
+ Append ' create mask = 0660'
+ Append ' directory mask = 0770'
+ Append ' valid users = @$(admingrp)'
+ Append ' force group = +$(admingrp)'
+ EndGroup
+ #
+ # [dokumenter]
+ #
+ BeginGroupIfNoLineMatching "^\[admin\]"
+ Append '[admin]'
+ Append ' path = $(adminshare)'
+ Append ' comment = Dokumentation og adminværktøjer'
+ Append ' browsable = yes'
+ Append ' guest ok = yes'
+ Append ' writeable = no'
+ 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)
+ $(adminshare)
+ mode=755
+ owner=$(adminuser)
+ group=$(admingrp)
+
+processes:
+ "smbd" restart "/etc/init.d/samba restart"
+
+shellcommands:
+ samba_reload::
+ "/etc/init.d/samba force-reload"