1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-21 18:04:06 +03:00

samba-tool: let 'domain provision' to use the 2019 schema by default

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Stefan Metzmacher 2023-02-23 15:05:01 +01:00 committed by Andrew Bartlett
parent 90faa58e7f
commit f6d9f3760f
3 changed files with 29 additions and 9 deletions

View File

@ -317,9 +317,9 @@ class cmd_domain_provision(Command):
help="The domain and forest function level (2000 | 2003 | 2008 | 2008_R2 - always native). Default is (Windows) 2008_R2 Native.",
default="2008_R2"),
Option("--base-schema", type="choice", metavar="BASE-SCHEMA",
choices=["2008_R2", "2008_R2_old", "2012", "2012_R2"],
help="The base schema files to use. Default is (Windows) 2012_R2.",
default="2012_R2"),
choices=["2008_R2", "2008_R2_old", "2012", "2012_R2", "2016", "2019"],
help="The base schema files to use. Default is (Windows) 2019.",
default="2019"),
Option("--next-rid", type="int", metavar="NEXTRID", default=1000,
help="The initial nextRid value (only needed for upgrades). Default is 1000."),
Option("--partitions-only",

View File

@ -2146,7 +2146,7 @@ def provision(logger, session_info, smbconf=None,
sitename=None, serverrole=None, dom_for_fun_level=None,
useeadb=False, am_rodc=False, lp=None, use_ntvfs=False,
use_rfc2307=False, maxuid=None, maxgid=None, skip_sysvolacl=True,
base_schema="2012_R2",
base_schema="2019",
plaintext_secrets=False, backend_store=None,
backend_store_size=None, batch_mode=False):
"""Provision samba4

View File

@ -28,6 +28,14 @@ rm -rf $PREFIX/simple-dc
testit "simple-dc-guids" $PYTHON $BINDIR/samba-tool domain provision --server-role="dc" --domain=FOO --realm=foo.example.com --domain-sid=S-1-5-21-4177067393-1453636373-93818738 --domain-guid=6054d36d-2bfd-44f1-a9cd-32cfbb06480b --ntds-guid=b838f255-c8aa-4fe8-9402-b7d61ca3bd1b --invocationid=6d4cff9a-2bbf-4b4c-98a2-36242ddb0bd6 --targetdir=$PREFIX/simple-dc --use-ntvfs
rm -rf $PREFIX/simple-dc-2008r2-schema
testit "simple-dc-2008r2-schema" $PYTHON $BINDIR/samba-tool domain provision --server-role="dc" --domain=FOO --realm=foo.example.com --targetdir=$PREFIX/simple-dc-2008r2-schema --use-ntvfs --base-schema=2008_R2
rm -rf $PREFIX/simple-dc-2012-schema
testit "simple-dc-2012-schema" $PYTHON $BINDIR/samba-tool domain provision --server-role="dc" --domain=FOO --realm=foo.example.com --targetdir=$PREFIX/simple-dc-2012-schema --use-ntvfs --base-schema=2012
rm -rf $PREFIX/simple-dc-2012r2-schema
testit "simple-dc-2012r2-schema" $PYTHON $BINDIR/samba-tool domain provision --server-role="dc" --domain=FOO --realm=foo.example.com --targetdir=$PREFIX/simple-dc-2012r2-schema --use-ntvfs --base-schema=2012_R2
rm -rf $PREFIX/simple-dc-2016-schema
testit "simple-dc-2016-schema" $PYTHON $BINDIR/samba-tool domain provision --server-role="dc" --domain=FOO --realm=foo.example.com --targetdir=$PREFIX/simple-dc-2016-schema --use-ntvfs --base-schema=2016
rm -rf $PREFIX/simple-dc-2019-schema
testit "simple-dc-2019-schema" $PYTHON $BINDIR/samba-tool domain provision --server-role="dc" --domain=FOO --realm=foo.example.com --targetdir=$PREFIX/simple-dc-2019-schema --use-ntvfs --base-schema=2019
rm -rf $PREFIX/simple-member
testit "simple-member" $PYTHON $BINDIR/samba-tool domain provision --server-role="member" --domain=FOO --realm=foo.example.com --targetdir=$PREFIX/simple-member --use-ntvfs
rm -rf $PREFIX/simple-standalone
@ -42,8 +50,11 @@ reprovision()
testit "reprovision" reprovision
V_2012_R2=69
V_2008_R2=47
V_2012=56
V_2012_R2=69
V_2016=87
V_2019=88
check_baseschema()
{
@ -72,11 +83,15 @@ check_baseschema()
}
tname="schema version"
testit "$tname simple-default" check_baseschema simple-default $V_2012_R2
testit "$tname simple-dc" check_baseschema simple-dc $V_2012_R2
testit "$tname simple-member" check_baseschema simple-member $V_2012_R2
testit "$tname simple-standalone" check_baseschema simple-standalone $V_2012_R2
testit "$tname simple-default" check_baseschema simple-default $V_2019
testit "$tname simple-dc" check_baseschema simple-dc $V_2019
testit "$tname simple-member" check_baseschema simple-member $V_2019
testit "$tname simple-standalone" check_baseschema simple-standalone $V_2019
testit "$tname simple-dc-2008r2-schema" check_baseschema simple-dc-2008r2-schema $V_2008_R2
testit "$tname simple-dc-2012-schema" check_baseschema simple-dc-2012-schema $V_2012
testit "$tname simple-dc-2012r2-schema" check_baseschema simple-dc-2012r2-schema $V_2012_R2
testit "$tname simple-dc-2016-schema" check_baseschema simple-dc-2016-schema $V_2016
testit "$tname simple-dc-2019-schema" check_baseschema simple-dc-2019-schema $V_2019
rm -rf $PREFIX/simple-default
rm -rf $PREFIX/simple-dc
@ -84,5 +99,10 @@ rm -rf $PREFIX/blank-dc
rm -rf $PREFIX/simple-member
rm -rf $PREFIX/simple-standalone
rm -rf $PREFIX/partitions-only-dc
rm -rf $PREFIX/simple-dc-2008r2-schema
rm -rf $PREFIX/simple-dc-2012-schema
rm -rf $PREFIX/simple-dc-2012r2-schema
rm -rf $PREFIX/simple-dc-2016-schema
rm -rf $PREFIX/simple-dc-2019-schema
exit $failed