diff options
-rw-r--r-- | samba/smb-shares-cafe3.conf | 143 |
1 files changed, 108 insertions, 35 deletions
diff --git a/samba/smb-shares-cafe3.conf b/samba/smb-shares-cafe3.conf index f69d829..0a29d30 100644 --- a/samba/smb-shares-cafe3.conf +++ b/samba/smb-shares-cafe3.conf @@ -10,21 +10,49 @@ control: # You can change the rights on the shares in the "directories:" # section. # - netlogshare = ( /etc/samba/netlogon ) + pcprvdir = ( "/home/%u" ) commonsharedir = ( /home/fsadmin ) - datashare = ( /home/fsadmin/pc_doc ) - softshare = ( /home/fsadmin/pc_software ) - adminshare = ( /home/fsadmin/pc_admin ) - profshare = ( /home/fsadmin/pc_userprofiles ) + profilshare = ( /home/fsadmin/pc_userprofiles ) + xchngshare = ( /home/fsadmin/pc_xchange ) + netlog = ( "netlogon" ) + netlogtxt = ( "Network logon" ) + netlogshare = ( /etc/samba/netlogon ) + privpctxt = ( "Pers. PC Documents" ) privpcshare = ( pc ) + privmac = ( "pers_mac" ) + privmactxt = ( "Pers. Mac Documents" ) privmacshare = ( mac ) + privwww = ( "pers_www" ) + privwwwtxt = ( "Pers. Web Documents" ) + privwwwshare = ( public_html ) + privxchng = ( "pers_shared" ) + privxchngtxt = ( "Pers. Shared Documents" ) privxchngshare = ( xchange ) - + data = ( "docs" ) + datatxt = ( "Shared Documents" ) + datashare = ( /home/fsadmin/pc_doc ) + soft = ( "software" ) + softtxt = ( "Shared Software" ) + softshare = ( /home/fsadmin/pc_software ) + admin = ( "admin" ) + admintxt = ( "Documentation and Admin Tools" ) + adminshare = ( /home/fsadmin/pc_admin ) + + # + # Shared group + # + sharedgrp = ( users ) + # # Administrative user and group # adminuser = ( fsadmin ) admingrp = ( fsadmin ) + + # + # Misc common strings + # + pcvetofiles = ( "/.AppleDouble/.AppleDesktop/Network Trash Folder/DesktopFolderDB/resource.frk/Icon^M/TheVolumeSettingsFolder/" ) editfiles: samba:: @@ -36,11 +64,11 @@ editfiles: # AutoCreate # - # [netlogon] + # [$(netlog)] # - BeginGroupIfNoLineMatching "^\[netlogon\]" - Append '[netlogon]' - Append ' comment = Network logon' + BeginGroupIfNoLineMatching "^\[$(netlog)\]" + Append '[$(netlog)]' + Append ' comment = $(netlogtxt)' Append ' path = $(netlogshare)' Append ' browsable = no' Append ' writeable = no' @@ -51,33 +79,74 @@ editfiles: # BeginGroupIfNoLineMatching "^\[userprofiles\]" Append '[userprofiles]' - Append ' path = $(profshare)' + Append ' path = $(profilshare)' Append ' force user = %u' Append ' browsable = yes' Append ' writable = yes' - Append ' root preexec = /bin/mkdir $(profshare)/%U \' - Append ' /bin/chown %U $(profshare)/%U \' - Append ' /bin/chmod 700 $(profshare)/%U' + Append ' root preexec = /bin/mkdir $(profilshare)/%U \' + Append ' /bin/chown %U: $(profilshare)/%U \' + Append ' /bin/chmod 700 $(profilshare)/%U' EndGroup # # [homes] # BeginGroupIfNoLineMatching "^\[homes\]" Append '[homes]' - Append ' path = /home/%u/$(privpcshare)' + Append ' comment = $(privpctxt)' + Append ' path = $(pcprvdir)/$(privpcshare)' Append ' browsable = no' Append ' writable = yes' - Append ' root preexec = /bin/mkdir /home/%u/$(privpcshare) \' - Append ' /bin/chown %U /home/%u/$(privpcshare) \' - Append ' /bin/chmod 644 /home/%u/$(privpcshare)' + Append ' root preexec = /bin/mkdir $(pcprvdir)/$(privpcshare) \' + Append ' /bin/chown %U: $(pcprvdir)/$(privpcshare) \' + Append ' /bin/chmod 640 $(pcprvdir)/$(privpcshare)' EndGroup # - # [programmer] + # [$(privmac)] # - BeginGroupIfNoLineMatching "^\[software\]" - Append '[software]' - Append ' path = $(softshare)' - Append ' comment = Fælles software' + BeginGroupIfNoLineMatching "^\[$(privmac)\]" + Append '[$(privmac)]' + Append ' comment = $(privmactxt)' + Append ' path = $(pcprvdir)/$(privmacshare)' + Append ' browsable = no' + Append ' writable = no' + EndGroup + # + # [$(privweb)] + # + BeginGroupIfNoLineMatching "^\[$(privwww)\]" + Append '[$(privwww)]' + Append ' comment = $(privwwwtxt)' + Append ' path = $(pcprvdir)/$(privwwwshare)' + Append ' browsable = no' + Append ' writable = yes' + Append ' root preexec = /bin/mkdir $(pcprvdir)/$(privwwwshare) \' + Append ' /bin/chown %U: $(pcprvdir)/$(privwwwshare) \' + Append ' /bin/chmod 644 $(pcprvdir)/$(privwwwshare)' + EndGroup + # + # [$(privxchng)] + # + BeginGroupIfNoLineMatching "^\[$(privxchng)\]" + Append '[$(privxchng)]' + Append ' comment = $(privxchngtxt)' + Append ' path = $(pcprvdir)/$(privxchngshare)' + Append ' browsable = no' + Append ' writable = yes' + Append ' valid users = @$(sharedgrp)' + Append ' force group = +$(sharedgrp)' + Append ' root preexec = /bin/mkdir $(pcprvdir)/$(privpcshare) \' + Append ' /bin/chown %U:$(sharedgrp) $(pcprvdir)/$(privpcshare) \' + Append ' /bin/chmod 644 $(pcprvdir)/$(privpcshare) \' + Append ' /bin/rm -f $(xchngshare) \' + Append ' /bin/ln -dfs $(pcprvdir)/$(privxchngshare) $(xchngshare)' + EndGroup + # + # [$(data)] + # + BeginGroupIfNoLineMatching "^\[$(data)\]" + Append '[$(data)]' + Append ' comment = $(datatxt)' + Append ' path = $(datashare)' Append ' browsable = yes' Append ' guest ok = no' Append ' writeable = yes' @@ -86,15 +155,15 @@ editfiles: Append ' valid users = @$(admingrp)' Append ' force group = +$(admingrp)' Append ' delete veto files = Yes' - Append ' veto files = /.AppleDouble/.AppleDesktop/Network Trash Folder/DesktopFolderDB/resource.frk/Icon^M/TheVolumeSettingsFolder/' + Append ' veto files = $(pcvetofiles)' EndGroup # - # [faellesdrev] + # [$(soft)] # - BeginGroupIfNoLineMatching "^\[faellesdrev\]" - Append '[faellesdrev]' - Append ' path = $(datashare)' - Append ' comment = Fælles drev for delte filer' + BeginGroupIfNoLineMatching "^\[$(soft)\]" + Append '[$(soft)]' + Append ' comment = $(softtxt)' + Append ' path = $(softshare)' Append ' browsable = yes' Append ' guest ok = no' Append ' writeable = yes' @@ -103,15 +172,15 @@ editfiles: Append ' valid users = @$(admingrp)' Append ' force group = +$(admingrp)' Append ' delete veto files = Yes' - Append ' veto files = /.AppleDouble/.AppleDesktop/Network Trash Folder/DesktopFolderDB/resource.frk/Icon^M/TheVolumeSettingsFolder/' + Append ' veto files = $(pcvetofiles)' EndGroup # - # [dokumenter] + # [$(admin)] # - BeginGroupIfNoLineMatching "^\[admin\]" - Append '[admin]' + BeginGroupIfNoLineMatching "^\[$(admin)\]" + Append '[$(admin)]' + Append ' comment = $(admintxt)' Append ' path = $(adminshare)' - Append ' comment = Dokumentation og adminværktøjer' Append ' browsable = yes' Append ' guest ok = yes' Append ' writeable = no' @@ -150,7 +219,11 @@ directories: mode=755 owner=root group=root - $(profshare) + $(xchngshare) + mode=755 + owner=root + group=root + $(profilshare) mode=775 owner=$(adminuser) group=$(admingrp) |