log level = $ctx->{server_loglevel}
lanman auth = Yes
rndc command = true
- dns update command = $ENV{SRCDIR_ABS}/source4/scripting/bin/samba_dnsupdate --all-interfaces --use-file=$ctx->{dns_host_file}
- spn update command = $ENV{SRCDIR_ABS}/source4/scripting/bin/samba_spnupdate
- resolv:host file = $ctx->{dns_host_file}
+ dns update command = $ENV{SRCDIR_ABS}/source4/scripting/bin/samba_dnsupdate --all-interfaces --use-file=$ctx->{dns_host_file} -s $ctx->{smb_conf}
+ spn update command = $ENV{SRCDIR_ABS}/source4/scripting/bin/samba_spnupdate -s $ctx->{smb_conf}
+ resolv:host file = $ctx->{dns_host_file}
dreplsrv:periodic_startup_interval = 0
dsdb:schema update allowed = yes
- passdb backend = samba4
+ passdb backend = samba4
- # remove this again, when our smb2 client library
- # supports signin on compound related requests
- server signing = on
+ # remove this again, when our smb2 client library
+ # supports signin on compound related requests
+ server signing = on
";
if (defined($ctx->{sid_generator}) && $ctx->{sid_generator} ne "internal") {
SAMBA_TEST_FIFO => "$ctx->{prefix}/samba_test.fifo",
SAMBA_TEST_LOG => "$ctx->{prefix}/samba_test.log",
SAMBA_TEST_LOG_POS => 0,
- NSS_WRAPPER_WINBIND_SO_PATH => Samba::bindir_path($self, "default/nsswitch/libnss-winbind.so")
+ NSS_WRAPPER_WINBIND_SO_PATH => Samba::bindir_path($self, "default/nsswitch/libnss-winbind.so"),
+ LOCAL_PATH => $ctx->{share}
};
return $ret;
{
my ($self, $prefix, $server_role, $hostname,
$domain, $realm, $functional_level,
- $password, $kdc_ipv4, $extra_smbconf_options) = @_;
+ $password, $kdc_ipv4, $extra_smbconf_options, $extra_smbconf_shares) = @_;
my $ctx = $self->provision_raw_prepare($prefix, $server_role,
$hostname,
$domain, $realm, $functional_level,
$password, $kdc_ipv4);
- $ctx->{tmpdir} = "$ctx->{prefix_abs}/tmp";
- push(@{$ctx->{directories}}, "$ctx->{tmpdir}");
- push(@{$ctx->{directories}}, "$ctx->{tmpdir}/test1");
- push(@{$ctx->{directories}}, "$ctx->{tmpdir}/test2");
+ $ctx->{share} = "$ctx->{prefix_abs}/share";
+ push(@{$ctx->{directories}}, "$ctx->{share}");
+ push(@{$ctx->{directories}}, "$ctx->{share}/test1");
+ push(@{$ctx->{directories}}, "$ctx->{share}/test2");
my $msdfs = "no";
$msdfs = "yes" if ($server_role eq "domain controller");
$ctx->{smb_conf_extra_options} = "
$extra_smbconf_options
[tmp]
- path = $ctx->{tmpdir}
+ path = $ctx->{share}
read only = no
posix:sharedelay = 10000
posix:oplocktimeout = 3
- posix:writetimeupdatedelay = 500000
+ posix:writetimeupdatedelay = 50000
[xcopy_share]
- path = $ctx->{tmpdir}
+ path = $ctx->{share}
read only = no
posix:sharedelay = 10000
posix:oplocktimeout = 3
- posix:writetimeupdatedelay = 500000
+ posix:writetimeupdatedelay = 50000
create mask = 777
force create mode = 777
[test1]
- path = $ctx->{tmpdir}/test1
+ path = $ctx->{share}/test1
read only = no
posix:sharedelay = 10000
posix:oplocktimeout = 3
posix:writetimeupdatedelay = 50000
[test2]
- path = $ctx->{tmpdir}/test2
+ path = $ctx->{share}/test2
read only = no
posix:sharedelay = 10000
posix:oplocktimeout = 3
# Or the server tries s4u2self/s4u2proxy to impersonate the client
[simple]
- path = $ctx->{tmpdir}
+ path = $ctx->{share}
read only = no
ntvfs handler = simple
[cifsposix]
copy = simple
ntvfs handler = cifsposix
+
+$extra_smbconf_shares
";
if (defined($self->{ldap})) {
"2008",
"locMEMpass3",
$dcvars->{SERVER_IP},
- "");
+ "", "");
unless ($ret) {
return undef;
}
"2008",
"locRPCproxypass4",
$dcvars->{SERVER_IP},
- $extra_smbconf_options);
+ $extra_smbconf_options, "");
unless ($ret) {
return undef;
my ($self, $prefix) = @_;
print "PROVISIONING DC...";
+ my $extra_conf_options = "netbios aliases = localDC1-a
+allow dns updates = True";
my $ret = $self->provision($prefix,
"domain controller",
"localdc",
"samba.example.com",
"2008",
"locDCpass1",
- undef, "netbios aliases = localDC1-a");
+ undef, $extra_conf_options, "");
return undef unless(defined $ret);
unless($self->add_wins_config("$prefix/private")) {
"samba2003.example.com",
"2003",
"locDCpass6",
- undef, "");
+ undef, "", "");
unless($self->add_wins_config("$prefix/private")) {
warn("Unable to add wins configuration");
"samba2008R2.example.com",
"2008_R2",
"locDCpass7",
- undef, "");
+ undef, "", "");
unless ($self->add_wins_config("$prefix/private")) {
warn("Unable to add wins configuration");
return undef;
}
- $ctx->{tmpdir} = "$ctx->{prefix_abs}/tmp";
- push(@{$ctx->{directories}}, "$ctx->{tmpdir}");
+ $ctx->{share} = "$ctx->{prefix_abs}/share";
+ push(@{$ctx->{directories}}, "$ctx->{share}");
$ctx->{smb_conf_extra_options} = "
max xmit = 32K
read only = yes
[tmp]
- path = $ctx->{tmpdir}
+ path = $ctx->{share}
read only = no
posix:sharedelay = 10000
posix:oplocktimeout = 3
- posix:writetimeupdatedelay = 500000
+ posix:writetimeupdatedelay = 50000
";
{
my ($self, $prefix) = @_;
+ my $prefix_abs = abs_path($prefix);
+
+ my $bindir_abs = abs_path($self->{bindir});
+ my $lockdir="$prefix_abs/lockdir";
+
my $extra_smbconf_options = "
-server services = -smb +s3fs
-dcerpc endpoint servers = -unixinfo -spoolss -winreg -wkssvc -srvsvc
+ server services = -smb +s3fs
+ xattr_tdb:file = $prefix_abs/statedir/xattr.tdb
+
+ kernel oplocks = no
+ kernel change notify = no
+
+ syslog = no
+ printing = bsd
+ printcap name = /dev/null
+
+ max protocol = SMB2
+ read only = no
+ server signing = auto
+
+ smbd:sharedelay = 100000
+ smbd:writetimeupdatedelay = 500000
+ create mask = 755
+ dos filemode = yes
+
+ vfs objects = acl_xattr xattr_tdb streams_depot
+
+ dcerpc endpoint servers = -winreg -srvsvc
+
+ printcap name = /dev/null
+
+ printing = vlp
+ print command = $bindir_abs/vlp tdbfile=$lockdir/vlp.tdb print %p %s
+ lpq command = $bindir_abs/vlp tdbfile=$lockdir/vlp.tdb lpq %p
+ lp rm command = $bindir_abs/vlp tdbfile=$lockdir/vlp.tdb lprm %p %j
+ lp pause command = $bindir_abs/vlp tdbfile=$lockdir/vlp.tdb lppause %p %j
+ lp resume command = $bindir_abs/vlp tdbfile=$lockdir/vlp.tdb lpresume %p %j
+ queue pause command = $bindir_abs/vlp tdbfile=$lockdir/vlp.tdb queuepause %p
+ queue resume command = $bindir_abs/vlp tdbfile=$lockdir/vlp.tdb queueresume %p
+ lpq cache time = 0
+
+";
+
+ my $extra_smbconf_shares = "
+
+[tmpcase]
+ copy = tmp
+ case sensitive = yes
-[IPC\$]
- vfs objects = dfs_samba4
+[tmpguest]
+ copy = tmp
+ guest ok = yes
+[hideunread]
+ copy = tmp
+ hide unreadable = yes
";
print "PROVISIONING PLUGIN S4 DC...";
"plugin.samba.example.com",
"2008",
"locDCpass1",
- undef, $extra_smbconf_options);
+ undef, $extra_smbconf_options,
+ $extra_smbconf_shares);
return undef unless(defined $ret);
unless($self->add_wins_config("$prefix/private")) {