summaryrefslogtreecommitdiff
path: root/samba
diff options
context:
space:
mode:
authorJuri Jensen <juri@xenux.dk>2002-01-09 22:44:59 +0000
committerJuri Jensen <juri@xenux.dk>2002-01-09 22:44:59 +0000
commita3c5f92e0a396c96cc2d5ffbebbb06b9fb63fe69 (patch)
treed3fd9f0fbca9a60e3bb38c6d7296a1f0e540c318 /samba
parentd2035a2e64eba9e38e53f9b2930fc8e7150c102e (diff)
samba: Added a generic printerconf - should be safe to include in all
installations. Added a shares-definition for the new RÃ¥tstof site - this is actually a cfengine file that gets included at the RÃ¥tstof site.
Diffstat (limited to 'samba')
-rw-r--r--samba/netlogon/common.bat9
-rw-r--r--samba/smb-printers.conf7
-rw-r--r--samba/smb-shares-raatstof.conf145
3 files changed, 156 insertions, 5 deletions
diff --git a/samba/netlogon/common.bat b/samba/netlogon/common.bat
index 7e0ab04..b6aec69 100644
--- a/samba/netlogon/common.bat
+++ b/samba/netlogon/common.bat
@@ -1,7 +1,6 @@
rem [Global] commands
-@ECHO "Welcome to Xenux' network!!!"
-NET TIME \\gandalf /SET /YES
-NET USE F: \\gandalf\dokumenter /YES
-NET USE U: \\gandalf\homes /YES
-NET USE P: \\gandalf\programmer /YES
+NET TIME \\server /SET /YES
+NET USE F: \\server\dokumenter /YES
+NET USE U: \\server\homes /YES
+NET USE P: \\server\programmer /YES
\ No newline at end of file
diff --git a/samba/smb-printers.conf b/samba/smb-printers.conf
new file mode 100644
index 0000000..ffbf935
--- /dev/null
+++ b/samba/smb-printers.conf
@@ -0,0 +1,7 @@
+[printers]
+ comment = %S printer
+ path = /tmp
+ print command = /usr/bin/lpr -h %s
+ lprm command = /usr/bin/lprm -P%S %j
+ public = yes
+ printable = yes
diff --git a/samba/smb-shares-raatstof.conf b/samba/smb-shares-raatstof.conf
new file mode 100644
index 0000000..20bacdb
--- /dev/null
+++ b/samba/smb-shares-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
+ owner=root
+ group=root
+
+processes:
+ "smbd" restart "/etc/init.d/samba restart"
+
+shellcommands:
+ samba_reload::
+ "/etc/init.d/samba force-reload"