initial commit of file from CVS for e-smith-samba on Sat Mar 23 16:28:38 AEDT 2024
parent
83e7d8b945
commit
d602d07ac3
@ -0,0 +1,4 @@
|
||||
*.rpm
|
||||
*.log
|
||||
*spec-20*
|
||||
*.tar.xz
|
@ -0,0 +1,21 @@
|
||||
# Makefile for source rpm: e-smith-samba
|
||||
# $Id: Makefile,v 1.1 2016/02/05 17:16:29 stephdl Exp $
|
||||
NAME := e-smith-samba
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attept a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
@ -1,3 +1,15 @@
|
||||
# e-smith-samba
|
||||
# <img src="https://www.koozali.org/images/koozali/Logo/Png/Koozali_logo_2016.png" width="25%" vertical="auto" style="vertical-align:bottom"> e-smith-samba
|
||||
|
||||
SMEServer Koozali developed git repo for e-smith-samba smeserver
|
||||
SMEServer Koozali developed git repo for e-smith-samba smeserver
|
||||
|
||||
## Wiki
|
||||
<br />https://wiki.koozali.org/
|
||||
|
||||
## Bugzilla
|
||||
Show list of outstanding bugs: [here](https://bugs.koozali.org/buglist.cgi?component=e-smith-samba&product=SME%20Server%2010.X&query_format=advanced&limit=0&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=CONFIRMED)
|
||||
|
||||
## Description
|
||||
|
||||
<br />*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.*
|
||||
*Once it has been checked, then this comment will be deleted*
|
||||
<br />
|
||||
|
@ -0,0 +1 @@
|
||||
sme10
|
@ -0,0 +1,123 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
use esmith::Build::CreateLinks qw(:all);
|
||||
|
||||
my $panel = "manager";
|
||||
panel_link("workgroup", $panel);
|
||||
|
||||
foreach (qw(samba/smb.conf samba/smbusers))
|
||||
{
|
||||
templates2events("/etc/$_", qw(
|
||||
console-save
|
||||
bootstrap-console-save
|
||||
ibay-create
|
||||
ibay-delete
|
||||
ibay-modify
|
||||
ibay-modify-servers
|
||||
network-delete
|
||||
network-create
|
||||
post-install
|
||||
post-upgrade
|
||||
workgroup-update
|
||||
e-smith-samba-update
|
||||
));
|
||||
}
|
||||
|
||||
foreach my $file (qw(
|
||||
/etc/pam.d/samba
|
||||
/etc/krb5.conf
|
||||
))
|
||||
{
|
||||
templates2events($file, qw(console-save bootstrap-console-save e-smith-samba-update));
|
||||
}
|
||||
|
||||
foreach (qw(console-save bootstrap-console-save bootstrap-ldap-save
|
||||
post-install post-upgrade workgroup-update e-smith-samba-update))
|
||||
{
|
||||
event_link('store-ldap-smbpasswd', $_, "06");
|
||||
}
|
||||
|
||||
my $event = "console-save";
|
||||
|
||||
$event = "bootstrap-ldap-save";
|
||||
templates2events("/etc/samba/smb.conf", $event);
|
||||
event_link("update-domain-group-maps", $event, "56");
|
||||
|
||||
$event = "group-create";
|
||||
event_link("update-domain-group-maps", $event, "56");
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "group-delete";
|
||||
event_link("update-domain-group-maps", $event, "14");
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "group-modify";
|
||||
event_link("update-domain-group-maps", $event, "56");
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "ibay-create";
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "ibay-delete";
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "ibay-modify";
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "ibay-modify-servers";
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "network-create";
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "network-delete";
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "post-install";
|
||||
|
||||
$event = "post-upgrade";
|
||||
event_link("user-create-profiledir", $event, "20");
|
||||
|
||||
$event = "user-create";
|
||||
event_link("user-create-profiledir", $event, "20");
|
||||
event_link("update-domain-group-maps", $event, "56");
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "user-delete";
|
||||
event_link("update-domain-group-maps", $event, "14");
|
||||
event_link("user-delete-profiledir", $event, "20");
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "user-modify";
|
||||
event_link("update-domain-group-maps", $event, "56");
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "workgroup-update";
|
||||
event_link("update-domain-group-maps", $event, "56");
|
||||
event_link("cleanup-domains", $event, "65");
|
||||
safe_symlink("sigterm", "root/etc/e-smith/events/$event/services2adjust/dhcpd");
|
||||
safe_symlink("sigterm", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
safe_symlink("sigterm", "root/etc/e-smith/events/$event/services2adjust/nmbd");
|
||||
|
||||
$event = "printer-create";
|
||||
safe_symlink("sigterm", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "printer-delete";
|
||||
event_link("delete_printer_tdb", $event, 15);
|
||||
safe_symlink("sigterm", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "machine-account-create";
|
||||
event_link("create-machine-account", $event, "10");
|
||||
|
||||
$event = "pre-restore";
|
||||
event_link("delete-smbpasswd", $event, "90");
|
||||
|
||||
$event = "e-smith-samba-update";
|
||||
event_link("user-create-profiledir", $event, "20");
|
||||
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/nmbd");
|
||||
# systemd-specific action mandatory for this package-update event
|
||||
event_link("systemd-reload", $event, "89");
|
||||
event_link("systemd-default", $event, "88");
|
||||
templates2events("/etc/rsyslog.conf",$event);
|
||||
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/rsyslog");
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1 @@
|
||||
placeholder for netlogon share
|
@ -0,0 +1 @@
|
||||
netlogon
|
@ -0,0 +1 @@
|
||||
true
|
@ -0,0 +1 @@
|
||||
false
|
@ -0,0 +1 @@
|
||||
configuration
|
@ -0,0 +1 @@
|
||||
137,138
|
@ -0,0 +1 @@
|
||||
private
|
@ -0,0 +1 @@
|
||||
enabled
|
@ -0,0 +1 @@
|
||||
service
|
@ -0,0 +1 @@
|
||||
10080
|
@ -0,0 +1 @@
|
||||
disabled
|
@ -0,0 +1 @@
|
||||
enabled
|
@ -0,0 +1 @@
|
||||
35
|
@ -0,0 +1 @@
|
||||
disabled
|
@ -0,0 +1 @@
|
||||
no
|
@ -0,0 +1 @@
|
||||
WS
|
@ -0,0 +1 @@
|
||||
10
|
@ -0,0 +1 @@
|
||||
/home/e-smith/files/.shadow
|
@ -0,0 +1 @@
|
||||
UTF8
|
@ -0,0 +1 @@
|
||||
yes
|
@ -0,0 +1 @@
|
||||
sme-server
|
@ -0,0 +1 @@
|
||||
enabled
|
@ -0,0 +1 @@
|
||||
service
|
@ -0,0 +1 @@
|
||||
139,445
|
@ -0,0 +1 @@
|
||||
private
|
@ -0,0 +1 @@
|
||||
enabled
|
@ -0,0 +1 @@
|
||||
service
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
# Set ServerName to SystemName after inital configuration.
|
||||
my $smb = $DB->get('smb') || return;
|
||||
my $srvName = $smb->prop('ServerName') || 'sme-server';
|
||||
my $sysName = $DB->get('SystemName') || return;
|
||||
|
||||
return unless $srvName =~ m#sme-server#;
|
||||
$smb->set_prop('ServerName', $sysName->value);
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
# Display Charset has been dropped in Samba 4
|
||||
my $a = $DB->get("smb") or return;
|
||||
return unless (exists $smb{'DisplayCharSet'});
|
||||
$DB->get_prop_and_delete('smb', 'DisplayCharSet');
|
||||
}
|
||||
|
@ -0,0 +1,56 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
package esmith;
|
||||
|
||||
use strict;
|
||||
use Errno;
|
||||
use esmith::ConfigDB;
|
||||
use esmith::util;
|
||||
use Net::LDAP;
|
||||
|
||||
my $c = esmith::ConfigDB->open_ro;
|
||||
|
||||
# Don't attempt to update ldap unles master
|
||||
exit(0) unless ($c->get('ldap')->prop('Authentication') || 'disabled') eq 'enabled';
|
||||
|
||||
my $l = $c->get('ldap');
|
||||
my $status = $l->prop('status') || "disabled";
|
||||
unless ($status eq "enabled" )
|
||||
{
|
||||
warn "Not running action script $0, LDAP service not enabled!\n";
|
||||
exit(0);
|
||||
}
|
||||
|
||||
my $domain = $c->get('DomainName')
|
||||
|| die("Couldn't determine domain name");
|
||||
$domain = $domain->value;
|
||||
|
||||
my $base = esmith::util::ldapBase ($domain);
|
||||
my $pw = esmith::util::LdapPassword();
|
||||
|
||||
my $ldap = Net::LDAP->new('localhost')
|
||||
or die "$@";
|
||||
|
||||
$ldap->bind(
|
||||
dn => "cn=root,$base",
|
||||
password => $pw
|
||||
);
|
||||
|
||||
my $smb = $c->get('smb');
|
||||
my $domName = $smb->prop('Workgroup') || 'sme-server';
|
||||
if ( ($smb->prop('ServerRole') || 'WS') eq 'WS' )
|
||||
{
|
||||
$domName = $smb->prop('ServerName') || 'sme-server';
|
||||
}
|
||||
|
||||
my $result = $ldap->search( base => $base,
|
||||
filter => "(&(objectClass=sambaDomain)(!(sambaDomainName=$domName)))",
|
||||
scope => 'one'
|
||||
);
|
||||
die "failed looking up sambaDomainName entry: ", $result->error if $result->code;
|
||||
|
||||
foreach ($result->entries)
|
||||
{
|
||||
$_->delete;
|
||||
$_->update($ldap);
|
||||
}
|
@ -0,0 +1,140 @@
|
||||
#!/usr/bin/perl -w
|
||||
#----------------------------------------------------------------------
|
||||
# copyright (C) 2001 Mitel Networks Corporation
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# Technical support for this program is available from Mitel Networks
|
||||
# Please visit our web site www.e-smith.com for details.
|
||||
#----------------------------------------------------------------------
|
||||
package esmith;
|
||||
|
||||
use strict;
|
||||
use Errno;
|
||||
use esmith::ConfigDB;
|
||||
use esmith::AccountsDB;
|
||||
use esmith::util;
|
||||
|
||||
my $a = esmith::AccountsDB->open || die "Couldn't open accounts db\n";
|
||||
my $c = esmith::ConfigDB->open_ro || die "Could not open Config DB";
|
||||
|
||||
my $ldapauth = $c->get('ldap')->prop('Authentication') || 'disabled';
|
||||
my $x = 0; # exit value
|
||||
|
||||
my $domain = $c->get('DomainName')->value();
|
||||
my $base = esmith::util::ldapBase ($domain);
|
||||
|
||||
my $event = $ARGV [0];
|
||||
my $machineName = $ARGV [1];
|
||||
|
||||
die "machine name $machineName is not a valid machine account name"
|
||||
unless ( $machineName =~ /\$$/ );
|
||||
|
||||
my $m = $a->get($machineName);
|
||||
if ($m)
|
||||
{
|
||||
my $type = $m->prop('type');
|
||||
die "$machineName is not a machine account"
|
||||
unless ($type eq "machine");
|
||||
}
|
||||
else
|
||||
{
|
||||
# Auto-create the accounts database entry. This is bad form, but
|
||||
# the Samba "add user script" is called as the user "admin", who
|
||||
# does not currently have permissions to write to the config database
|
||||
$m = $a->new_record($machineName, {type => "machine"});
|
||||
}
|
||||
|
||||
my $lock = undef;
|
||||
my $uid;
|
||||
unless ($uid = $m->prop('Uid'))
|
||||
{
|
||||
use esmith::lockfile;
|
||||
|
||||
$lock = esmith::lockfile::LockFileOrWait("/home/e-smith/db/accounts");
|
||||
$uid = $a->get_next_uid;
|
||||
$m->set_prop('Uid', $uid);
|
||||
}
|
||||
my $gid = $m->prop('Gid') || $uid;
|
||||
|
||||
# We really, really need to be root to run "passwd -l"
|
||||
esmith::util::setRealToEffective();
|
||||
|
||||
warn "create-machine-account $machineName: Creating Unix user and group\n";
|
||||
|
||||
if ($ldapauth ne 'enabled')
|
||||
{
|
||||
# Create the machine's unique group first
|
||||
system(
|
||||
"/usr/sbin/groupadd",
|
||||
"-g",
|
||||
$gid,
|
||||
$machineName
|
||||
) == 0 or ( $x = 255, warn "Failed to create (unix) group $machineName.\n" );
|
||||
|
||||
# Now create the machine account
|
||||
system(
|
||||
"/usr/sbin/useradd",
|
||||
"-u", $uid,
|
||||
"-g", $gid,
|
||||
"-c", "Hostname account for $machineName",
|
||||
"-M",
|
||||
"-d", "/noexistingpath",
|
||||
"-s", "/bin/false",
|
||||
"$machineName"
|
||||
) == 0 or ( $x = 255, warn "Failed to create (unix) account $machineName.\n" );
|
||||
|
||||
system("/usr/bin/passwd", "-l", "$machineName") == 0
|
||||
or ( $x = 255, warn "Failed locking (unix) password for $machineName\n" );
|
||||
}
|
||||
|
||||
# Create the machine's unique group first (in ldap)
|
||||
system(
|
||||
"/usr/sbin/cpu", "-C/etc/cpu-system.conf", "groupadd",
|
||||
"-g", $gid,
|
||||
"-o",
|
||||
"$machineName"
|
||||
) == 0 or ( $x = $ldapauth ne 'enabled' ? $x : 255, warn "Failed to create (ldap) group $machineName.\n" );
|
||||
|
||||
# Now create the machine account (in ldap)
|
||||
system(
|
||||
"/usr/sbin/cpu", "-C/etc/cpu-system.conf", "useradd",
|
||||
"-u", $uid,
|
||||
"-g", $gid,
|
||||
"--userbase=ou=Computers,$base",
|
||||
"-c", "Hostname account for $machineName",
|
||||
"-o",
|
||||
"-d", "/noexistingpath",
|
||||
"-s", "/bin/false",
|
||||
"$machineName"
|
||||
) == 0 or ( $x = $ldapauth ne 'enabled' ? $x : 255, warn "Failed to create (ldap) account $machineName.\n" );
|
||||
|
||||
warn "create-machine-account $machineName: Locking account\n";
|
||||
|
||||
system("/usr/sbin/cpu", "-C/etc/cpu-system.conf", "usermod",
|
||||
"--userbase=ou=Computers,$base",
|
||||
"-o",
|
||||
"-L",
|
||||
"$machineName"
|
||||
) == 0 or ( $x = $ldapauth ne 'enabled' ? $x : 255, warn "Failed locking (ldap) password for $machineName\n" );
|
||||
|
||||
if ($ldapauth ne 'enabled')
|
||||
{
|
||||
warn "create-machine-account $machineName: Creating smbpasswd account\n";
|
||||
|
||||
system("/usr/bin/smbpasswd", "-a", "-m", "$machineName") == 0
|
||||
or warn "Could not create smb password entry for $machineName\n";
|
||||
}
|
||||
exit ($x);
|
@ -0,0 +1,2 @@
|
||||
#! /bin/sh
|
||||
exec rm -f /etc/samba/smbpasswd
|
@ -0,0 +1,6 @@
|
||||
#! /bin/sh
|
||||
|
||||
ACTION=$1
|
||||
PRINTER=$2
|
||||
|
||||
exec rm -f /var/cache/samba/printing/$PRINTER.tdb
|
@ -0,0 +1,130 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use POSIX qw(strftime);
|
||||
use File::Path;
|
||||
use File::Basename;
|
||||
use esmith::ConfigDB;
|
||||
use esmith::AccountsDB;
|
||||
|
||||
# Routines taken from powershift of rlbackup
|
||||
sub stagger;
|
||||
sub powershift;
|
||||
sub shadowdir;
|
||||
sub rmshadow;
|
||||
|
||||
my $cdb = esmith::ConfigDB->open_ro;
|
||||
my $adb = esmith::AccountsDB->open_ro();
|
||||
|
||||
my $smb = $cdb->get('smb') or die "No smb db entry found\n";
|
||||
my $shadowdir = $smb->prop('ShadowDir') || '/home/e-smith/files/.shadow';
|
||||
my $shadowcopy = $smb->prop('ShadowCopy') || 'disabled';
|
||||
my $offset = ($smb->prop('ShadowCount') || 2) - 2;
|
||||
$offset = 0 if $offset < 0;
|
||||
|
||||
exit unless -d $shadowdir;
|
||||
exit if $shadowcopy eq 'disabled';
|
||||
|
||||
my $filesdir = '/home/e-smith/files';
|
||||
my $snapfmt = '@GMT-%Y.%m.%d-%H.%M.%S';
|
||||
|
||||
# Switch old shadow directories to new format
|
||||
opendir(SHADOW, $shadowdir);
|
||||
foreach my $s ( grep { /^\d/ && ! -l "$shadowdir/$_" && -d "$shadowdir/$_" } readdir SHADOW ) {
|
||||
my @stat = stat("$shadowdir/$s");
|
||||
rename "$shadowdir/$s", "$shadowdir/".strftime($snapfmt, gmtime($stat[9]));
|
||||
symlink strftime($snapfmt, gmtime($stat[9])), "$shadowdir/$s";
|
||||
}
|
||||
closedir(SHADOW);
|
||||
|
||||
# remove old symlinks in ibays
|
||||
foreach my $ibay ($adb->ibays()) {
|
||||
my $ibaydir = 'ibays/' . $ibay->key . ( $ibay->prop('PublicAccess') eq 'none' ? '/files' : '' );
|
||||
|
||||
opendir(IBAY, "$filesdir/$ibaydir") || next;
|
||||
unlink "$filesdir/$ibaydir/$_" foreach (grep /^\@GMT-/, readdir(IBAY));
|
||||
closedir(IBAY);
|
||||
}
|
||||
|
||||
# remove old symlinks in ibays
|
||||
foreach my $user ($adb->users()) {
|
||||
my $userdir = 'users/' . $user->key . '/home';
|
||||
|
||||
opendir(USER, "$filesdir/$userdir") || next;
|
||||
unlink "$filesdir/$userdir/$_" foreach (grep /^\@GMT-/, readdir(USER));
|
||||
closedir(USER);
|
||||
}
|
||||
|
||||
# Create sync point if it doesn't already exist
|
||||
my $snapdir = strftime($snapfmt, gmtime(time));
|
||||
if ( -d "$shadowdir/0" ) {
|
||||
rename "$shadowdir/".readlink("$shadowdir/0"), "$shadowdir/$snapdir";
|
||||
unlink "$shadowdir/0";
|
||||
} else {
|
||||
mkdir "$shadowdir/$snapdir";
|
||||
}
|
||||
symlink "$snapdir", "$shadowdir/0";
|
||||
|
||||
# Create list of ibays and users to shadow
|
||||
my ($ibays, $users, $link) = ('','','');
|
||||
my @ibays = grep { ($_->prop('ShadowCopy') || 'enabled') ne 'disabled' } $adb->ibays();
|
||||
$ibays = "$filesdir/./ibays/{" . join(',', map { $_->key } @ibays) . "}/" if scalar @ibays > 1;
|
||||
$ibays = "$filesdir/./ibays/" . $ibays[0]->key . "/" if scalar @ibays == 1;
|
||||
my @users = grep { ($_->prop('ShadowCopy') || 'enabled') ne 'disabled' } $adb->users();
|
||||
$users = "$filesdir/./users/{" . join(',', map { $_->key } @users) . "}/home/" if scalar @users > 1;
|
||||
$users = "$filesdir/./users/" . $users[0]->key . "/home/" if scalar @users == 1;
|
||||
$link = "--link-dest ../1" if -d "$shadowdir/1";
|
||||
|
||||
# Sync directories to shadow directory
|
||||
if ( $ibays || $users) {
|
||||
system("rsync -aHmR --partial --delete --delete-excluded --exclude 'aquota.*' $link $ibays $users $shadowdir/0/") == 0
|
||||
or die "Couldn't sync directories";
|
||||
}
|
||||
|
||||
# Shift directories using geometric roll-off (only if different)
|
||||
if ( -d "$shadowdir/1" ) {
|
||||
if (system("diff -qr $shadowdir/0 $shadowdir/1 &> /dev/null") == 0) {
|
||||
rmshadow("$shadowdir/0");
|
||||
} else {
|
||||
powershift(2) if -d shadowdir(-$offset);
|
||||
for (my $i=2; $i >= -$offset; $i--) {
|
||||
rename shadowdir($i), shadowdir($i+1)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
rename "$shadowdir/0", "$shadowdir/1";
|
||||
}
|
||||
|
||||
sub rmshadow {
|
||||
my $d = shift;
|
||||
if ( -l "$d" ) {
|
||||
rmtree dirname($d)."/".readlink($d);
|
||||
unlink "$d";
|
||||
} elsif ( -d "$d" ) {
|
||||
rmtree "$d"
|
||||
}
|
||||
}
|
||||
|
||||
sub shadowdir {
|
||||
my $i = shift;
|
||||
return "$shadowdir/".($i+$offset);
|
||||
}
|
||||
|
||||
sub stagger {
|
||||
my $i = shift;
|
||||
return $i + ($i >> 1);
|
||||
}
|
||||
|
||||
sub powershift {
|
||||
my $i = shift;
|
||||
if ( -d shadowdir(stagger($i)) ) {
|
||||
my $n = powershift($i << 1);
|
||||
$i = $n >> 1;
|
||||
rename shadowdir(stagger($i)), shadowdir($n) if -d shadowdir(stagger($i));
|
||||
rmshadow(shadowdir($i));
|
||||
} else {
|
||||
rename shadowdir($i), shadowdir(stagger($i)) if -d shadowdir($i);
|
||||
}
|
||||
return $i;
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# copyright (C) 2010 Firewall Services
|
||||
# daniel@firewall-services.com
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
use esmith::ConfigDB;
|
||||
use esmith::util;
|
||||
|
||||
my $c = esmith::ConfigDB->open_ro;
|
||||
my $l = $c->get('ldap') || die "ldap service not found\n";
|
||||
my $s = $l->prop('status') || 'disabled';
|
||||
unless ( $s eq 'enabled' ){
|
||||
warn "Not running action script $0, LDAP service not enabled!\n";
|
||||
exit(0);
|
||||
}
|
||||
exit(0) unless ($l->prop('Authentication') || 'disabled') eq 'enabled';
|
||||
|
||||
my $domain = $c->get("DomainName")
|
||||
|| die("Could not determine domain name");
|
||||
my $base = esmith::util::ldapBase ($domain->value);
|
||||
my $pw = esmith::util::LdapPassword();
|
||||
|
||||
die "Error storing LDAP password in secret.tdb\n" unless
|
||||
system('/usr/bin/smbpasswd', '-w', "$pw") == 0;
|
@ -0,0 +1,106 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
package esmith;
|
||||
|
||||
use strict;
|
||||
use Errno;
|
||||
use esmith::AccountsDB;
|
||||
use esmith::ConfigDB;
|
||||
use esmith::util;
|
||||
|
||||
# events: console-save, bootstrap-console-save, group-modify-samba, group-create
|
||||
# post-install, post-upgrade, workgroup-update
|
||||
my $debug = "--debuglevel=1";
|
||||
|
||||
my $a = esmith::AccountsDB->open_ro or die "Couldn't open accounts db\n";
|
||||
my $c = esmith::ConfigDB->open_ro or die "Could not open Config DB";
|
||||
|
||||
my $ldapauth = $c->get('ldap')->prop('Authentication') || 'disabled';
|
||||
my $pw = esmith::util::LdapPassword();
|
||||
|
||||
my $g = `/usr/bin/net getlocalsid`;
|
||||
unless ($g =~ /SID.*is: (.+)/) {
|
||||
warn "Unable to determine SID. Clearning cache to see if it helps.";
|
||||
rename '/etc/samba/secrets.tdb','/etc/samba/secrets.'.time;
|
||||
rename '/var/cache/samba/gencache.tdb','/var/cache/samba/gencache.'.time;
|
||||
rename '/var/cache/samba/wins.dat','/var/cache/samba/wins.'.time;
|
||||
$g = `/usr/bin/net getlocalsid`;
|
||||
$g =~ /SID.*is: (.+)/ or die "Could not get current sid\n";
|
||||
if ($ldapauth eq 'enabled')
|
||||
{
|
||||
# Add the LDAP admin password in secret.tdb
|
||||
warn "Couldn't add LDAP password in secret.tdb\n" unless
|
||||
system("/usr/bin/smbpasswd", "-w", "$pw") == 0;
|
||||
}
|
||||
}
|
||||
my $local_sid = $1;
|
||||
|
||||
my %mappings = (
|
||||
'Domain Admins' => 'admin',
|
||||
'Domain Users' => 'shared',
|
||||
'Domain Guests' => 'nobody',
|
||||
(map { $_->prop('FirstName')." ".$_->prop('LastName'), $_->key } $a->users()),
|
||||
(map { $_->prop('Description'), $_->key } $a->groups()));
|
||||
|
||||
$mappings{$a->get_prop('admin','FirstName')." ".$a->get_prop('admin','LastName')} = 'admin' unless $mappings{'Domain Admins'} eq 'admin';
|
||||
|
||||
my %ridmap = (
|
||||
'Domain Admins' => '512',
|
||||
'Domain Users' => '513',
|
||||
'Domain Guests' => '514');
|
||||
|
||||
my %sidmap = ();
|
||||
foreach (`/usr/bin/net groupmap list`)
|
||||
{
|
||||
chomp;
|
||||
if (/^(.*?) \((S-.*-(\d+))\) -> (.*)$/)
|
||||
{
|
||||
my ($nt, $sid, $rid, $group) = ($1, $2, $3, $4);
|
||||
|
||||
# Skip local groups
|
||||
next if ($sid =~ /^S-1-5-32-\d+$/);
|
||||
|
||||
if (exists $mappings{$nt})
|
||||
{
|
||||
if ($ridmap{$nt} && $ridmap{$nt} ne $rid)
|
||||
{
|
||||
# Wrong (old?) sid
|
||||
system('/usr/bin/net','groupmap','delete',"sid=$sid");
|
||||
}
|
||||
elsif ($sid =~ /^$local_sid-/)
|
||||
{
|
||||
my $ug = $mappings{$nt};
|
||||
if ($group eq $ug)
|
||||
{
|
||||
$sidmap{$nt} = 'done';
|
||||
}
|
||||
else
|
||||
{
|
||||
system('/usr/bin/net','groupmap','delete',"sid=$sid");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
# Wrong (old?) sid
|
||||
system('/usr/bin/net','groupmap','delete',"sid=$sid");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
# Non existant group
|
||||
system('/usr/bin/net','groupmap','delete',"sid=$sid");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (keys %mappings)
|
||||
{
|
||||
next if $sidmap{$_} && $sidmap{$_} eq 'done';
|
||||
system('/usr/bin/net',$debug,
|
||||
'groupmap','add',
|
||||
"ntgroup=$_",
|
||||
"unixgroup=" . $mappings{$_},
|
||||
$ridmap{$_} ? "rid=$ridmap{$_}" : (),
|
||||
$sidmap{$_} && ! $ridmap{$_} ? "sid=$sidmap{$_}" : (),
|
||||
'type=d');
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
#!/usr/bin/perl -w
|
||||
#----------------------------------------------------------------------
|
||||
# copyright (C) 2001-2005 Mitel Networks Corporation
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
#----------------------------------------------------------------------
|
||||
package esmith;
|
||||
|
||||
use strict;
|
||||
use Errno;
|
||||
use esmith::util;
|
||||
|
||||
use esmith::AccountsDB;
|
||||
my $adb = esmith::AccountsDB->open_ro();
|
||||
|
||||
my $event = $ARGV [0];
|
||||
|
||||
my @users = ('admin', map { $_->key } $adb->users);
|
||||
|
||||
my @newusers = ( not defined $ARGV[1] ) ? @users : $ARGV[1] ;
|
||||
|
||||
foreach my $user ( @newusers )
|
||||
{
|
||||
die "$user is not a user account\n"
|
||||
unless ( grep /^$user$/, @users );
|
||||
|
||||
my @dirs = ("/home/e-smith/files/samba/profiles/$user","/home/e-smith/files/samba/profiles/${user}.V2",
|
||||
"/home/e-smith/files/samba/profiles/${user}.V3","/home/e-smith/files/samba/profiles/${user}.V4",
|
||||
"/home/e-smith/files/samba/profiles/${user}.V5","/home/e-smith/files/samba/profiles/${user}.V6");
|
||||
|
||||
foreach my $dir (@dirs)
|
||||
{
|
||||
my $pre_existing = ( -d $dir );
|
||||
|
||||
$pre_existing || mkdir $dir, 700 || die "Couldn't create directory $dir\n";
|
||||
|
||||
chmod 0700, $dir; # Remove setgid bit
|
||||
|
||||
next if $pre_existing;
|
||||
|
||||
esmith::util::chownFile($user, $user, $dir) ||
|
||||
die "Couldn't change ownership of $dir\n";
|
||||
}
|
||||
}
|
||||
|
||||
exit (0);
|
@ -0,0 +1,50 @@
|
||||
#!/usr/bin/perl -w
|
||||
#----------------------------------------------------------------------
|
||||
# copyright (C) 1999-2005 Mitel Networks Corporation
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
#----------------------------------------------------------------------
|
||||
package esmith;
|
||||
|
||||
use strict;
|
||||
use Errno;
|
||||
use File::Path;
|
||||
|
||||
use esmith::AccountsDB;
|
||||
my $adb = esmith::AccountsDB->open_ro();
|
||||
|
||||
my $event = $ARGV [0];
|
||||
my $account = $ARGV [1];
|
||||
|
||||
$a = $adb->get($account) || undef;
|
||||
unless ( defined $a && $a->prop('type') eq "user-deleted" )
|
||||
{
|
||||
warn "$account is not a user account\n";
|
||||
exit (0);
|
||||
}
|
||||
|
||||
my @dirs = ("/home/e-smith/files/samba/profiles/$account","/home/e-smith/files/samba/profiles/$account.V2",
|
||||
"/home/e-smith/files/samba/profiles/$account.V3","/home/e-smith/files/samba/profiles/$account.V4",
|
||||
"/home/e-smith/files/samba/profiles/$account.V5","/home/e-smith/files/samba/profiles/$account.V6");
|
||||
|
||||
foreach (@dirs) {
|
||||
|
||||
next unless -d $_;
|
||||
rmtree( $_ ) || die "Couldn't remove tree $_\n";
|
||||
|
||||
}
|
||||
|
||||
exit (0);
|
@ -0,0 +1,85 @@
|
||||
<!-- vim: ft=xml:
|
||||
-->
|
||||
<lexicon lang="en-us">
|
||||
<entry>
|
||||
<base>FORM_TITLE</base>
|
||||
<trans>Change workgroup settings</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>DESC_WORKGROUP</base>
|
||||
<trans>
|
||||
<![CDATA[
|
||||
Enter the name of the Windows workgroup that this server should appear in.
|
||||
]]>
|
||||
</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>LABEL_WORKGROUP</base>
|
||||
<trans>Windows workgroup</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>DESC_SERVERNAME</base>
|
||||
<trans>Enter the name that this server should use for
|
||||
Windows and Macintosh file sharing.</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>LABEL_SERVERNAME</base>
|
||||
<trans>Server Name</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>DESC_PDC</base>
|
||||
<trans><![CDATA[Should this server act as the workgroup
|
||||
and domain controller on your Windows network? You should leave
|
||||
this set to <b>No</b> if another server is already performing this
|
||||
role on your network.]]>
|
||||
</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>LABEL_PDC</base>
|
||||
<trans>Workgroup and Domain Controller</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>DESC_ROAM</base>
|
||||
<trans><![CDATA[
|
||||
Should this server support roaming profiles?
|
||||
You should leave this set to the default of <b>No</b> unless you have
|
||||
experience administering server-based Windows roaming profiles and
|
||||
know that this feature is required.
|
||||
]]>
|
||||
</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>LABEL_ROAM</base>
|
||||
<trans>Roaming profiles</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>SUCCESS</base>
|
||||
<trans>
|
||||
The new workgroup settings have been saved
|
||||
</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>INVALID_WORKGROUP</base>
|
||||
<trans>The workgroup name must begin with a letter (upper or lower
|
||||
case), followed by any combination of letters, numbers,
|
||||
underscores, periods and hyphens.
|
||||
</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>INVALID_SERVERNAME</base>
|
||||
<trans>The server name must begin with a letter (upper or lower case),
|
||||
followed by any combination of letters, numbers, underscores and
|
||||
hyphens.
|
||||
</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>INVALID_WORKGROUP_MATCHES_SERVERNAME</base>
|
||||
<trans>The server and workgroup names match, when compared in lower case.
|
||||
These values must be different in order for filesharing to be turned on.
|
||||
</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>Workgroup</base>
|
||||
<trans>Workgroup</trans>
|
||||
</entry>
|
||||
</lexicon>
|
@ -0,0 +1,2 @@
|
||||
TEMPLATE_PATH="/etc/smb.conf"
|
||||
OUTPUT_FILENAME="/etc/samba/smb.conf"
|
@ -0,0 +1,2 @@
|
||||
TEMPLATE_PATH="/etc/smb.conf"
|
||||
OUTPUT_FILENAME="/etc/samba/smb.conf"
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
use esmith::db;
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
# Configuration snippets may be placed in this directory as well
|
||||
# See https://bugs.contribs.org/show_bug.cgi?id=11093
|
||||
#includedir /etc/krb5.conf.d/
|
@ -0,0 +1,4 @@
|
||||
[logging]
|
||||
default = FILE:/var/log/krb5libs.log
|
||||
kdc = FILE:/var/log/krb5kdc.log
|
||||
admin_server = FILE:/var/log/kadmind.log
|
@ -0,0 +1 @@
|
||||
[libdefaults]
|
@ -0,0 +1,6 @@
|
||||
ticket_lifetime = 24h
|
||||
renew_lifetime = 7d
|
||||
forwardable = true
|
||||
rdns = false
|
||||
default_ccache_name = KEYRING:persistent:%{uid}
|
||||
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
my $workgroup = $smb{Workgroup} || 'sme-server';
|
||||
my $realm = $smb{realm} || $workgroup . "." . $DomainName;
|
||||
|
||||
my $default_realm = $smb{realm} || $workgroup . "." .$DomainName;
|
||||
|
||||
"default_realm = $default_realm";
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
my $dns_lookup_realm = $krb5{DNSLookupRealm} || 'false';
|
||||
|
||||
"dns_lookup_realm = $dns_lookup_realm";
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
my $dns_lookup_kdc = $krb5{DNSLookupKDC} || 'true';
|
||||
|
||||
"dns_lookup_kdc = $dns_lookup_kdc";
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
[realms]
|
||||
# EXAMPLE.COM = {
|
||||
# kdc = kerberos.example.com
|
||||
# admin_server = kerberos.example.com
|
||||
# }
|
@ -0,0 +1,3 @@
|
||||
[domain_realm]
|
||||
# .example.com = EXAMPLE.COM
|
||||
# example.com = EXAMPLE.COM
|
@ -0,0 +1 @@
|
||||
include /etc/openldap/schema/samba.schema
|
@ -0,0 +1,4 @@
|
||||
index sambaSID eq,pres
|
||||
index sambaPrimaryGroupSID eq,pres
|
||||
index sambaDomainName eq,pres
|
||||
|
@ -0,0 +1,13 @@
|
||||
access to attrs=sambaNTPassword
|
||||
by self peername.ip="127.0.0.1" read
|
||||
by self ssf=128 read
|
||||
by anonymous peername.ip="127.0.0.1" auth
|
||||
by anonymous ssf=128 auth
|
||||
by * none
|
||||
access to attrs=sambaLMPassword
|
||||
by self peername.ip="127.0.0.1" read
|
||||
by self ssf=128 read
|
||||
by anonymous peername.ip="127.0.0.1" auth
|
||||
by anonymous ssf=128 auth
|
||||
by * none
|
||||
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
|
||||
# Sensible attributes related to sambaSamAccount
|
||||
push @users, qw/sambaAcctFlags sambaBadPasswordCount sambaBadPasswordTime sambaKickoffTime sambaLogoffTime sambaLogonHours sambaPasswordHistory sambaSID sambaPrimaryGroupSID sambaPwdCanChange sambaPwdLastSet sambaPwdMustChange sambaUserWorkstations sambaSIDList sambaGroupType/;
|
||||
|
||||
$OUT .= '';
|
||||
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
auth required pam_nologin.so
|
||||
auth { -f "/lib/security/pam_pwdb.so" ||
|
||||
-f "/lib64/security/pam_pwdb.so" ? "required pam_stack.so service=system-auth" :
|
||||
"include system-auth" }
|
@ -0,0 +1,3 @@
|
||||
account { -f "/lib/security/pam_pwdb.so" ||
|
||||
-f "/lib64/security/pam_pwdb.so" ? "required pam_stack.so service=system-auth" :
|
||||
"include system-auth" }
|
@ -0,0 +1,3 @@
|
||||
password { -f "/lib/security/pam_pwdb.so" ||
|
||||
-f "/lib64/security/pam_pwdb.so" ? "required pam_stack.so service=system-auth" :
|
||||
"include system-auth" }
|
@ -0,0 +1,3 @@
|
||||
session { -f "/lib/security/pam_pwdb.so" ||
|
||||
-f "/lib64/security/pam_pwdb.so" ? "required pam_stack.so service=system-auth" :
|
||||
"include system-auth" }
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
$OUT = <<HERE;
|
||||
#%PAM-1.0
|
||||
HERE
|
||||
|
||||
$OUT .=
|
||||
Text::Template::_load_text("/etc/e-smith/templates-default/template-begin");
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
|
||||
#smbd
|
||||
:programname, isequal, "smbd" /var/log/smbd/smbd.log
|
||||
& stop
|
||||
|
||||
#nmbd
|
||||
:programname, isequal, "nmbd" /var/log/nmbd/nmbd.log
|
||||
& stop
|
||||
|
@ -0,0 +1,2 @@
|
||||
local5.notice /var/log/samba/samba_audit
|
||||
local5.notice stop
|
@ -0,0 +1 @@
|
||||
# This file is currently unused
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
use esmith::db;
|
||||
|
||||
$vfs = ();
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
sub _yesno
|
||||
{
|
||||
my $arg = shift;
|
||||
|
||||
return (defined $arg) ? "yes" : "no";
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
$SMB_WINSServer = $DB->wins_server;
|
||||
|
||||
"";
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
# This is the main Samba configuration file. You should read the
|
||||
# smb.conf(5) manual page in order to understand the options listed
|
||||
# here. Samba has a huge number of configurable options (perhaps too
|
||||
# many!) most of which are not shown in this example
|
||||
#
|
||||
# Any line which starts with a ; (semi-colon) or a # (hash)
|
||||
# is a comment and is ignored. In this example we will use a #
|
||||
# for commentry and a ; for parts of the config file that you
|
||||
# may wish to enable
|
||||
#
|
||||
# NOTE: Whenever you modify this file you should run the command "testparm"
|
||||
# to check that you have not many any basic syntactic errors.
|
||||
#
|
||||
#======================= Global Settings =====================================
|
||||
}
|
||||
[global]
|
@ -0,0 +1,11 @@
|
||||
{
|
||||
$OUT = "";
|
||||
return unless (($smb{'RecycleBin'} || 'disabled') eq 'enabled');
|
||||
|
||||
$vfs->{recycle}->{versions} = ($smb{'KeepVersions'} || 'disabled') eq 'enabled' ? "True" : "False";
|
||||
$vfs->{recycle}->{repository} = "Recycle Bin";
|
||||
$vfs->{recycle}->{keeptree} = "True";
|
||||
$vfs->{recycle}->{touch} = "True";
|
||||
$vfs->{recycle}->{exclude} = "*.tmp,*.temp,*.o,*.obj,~\$*";
|
||||
$vfs->{recycle}->{exclude_dir} = "tmp,temp,cache";
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
$OUT = "";
|
||||
return unless (($smb{'ShadowCopy'} || 'disabled') eq 'enabled');
|
||||
|
||||
$vfs->{shadow_copy2}->{snapdir} = $smb{ShadowDir} || '/home/e-smith/files/.shadow';
|
||||
$vfs->{shadow_copy2}->{basedir} = "/home/e-smith/files";
|
||||
$vfs->{shadow_copy2}->{fixinodes} = 'yes';
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
# Script to setup machine accounts
|
||||
}
|
||||
add machine script = /sbin/e-smith/signal-event machine-account-create '%u'
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
# This global parameter allows the Samba admin to limit what
|
||||
# interfaces on a machine will serve smb requests.
|
||||
}
|
||||
bind interfaces only = yes
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
# Be very careful with case sensitivity - it can break things!
|
||||
}
|
||||
case sensitive = no
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
$OUT = "";
|
||||
if ($smb{DeadTime})
|
||||
{
|
||||
$OUT .= "deadtime = $smb{DeadTime}";
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue