summaryrefslogtreecommitdiff
path: root/python/samba/provision
AgeCommit message (Collapse)AuthorFilesLines
2025-12-10s4/dlz: add support for bind 9.20Michael Tokarev1-1/+2
bind dlz interface does not change much, yet we build dlz_bind9_NN for every bind9 version NN we support - despite many of them differ only in soversion, with the code being identical. For bind9_20, use dlz_bind9_18.so which we already have. It'd be nice to extract actual bind9 version string in sambadns.py and use it in more direct way. Bug: https://bugzilla.samba.org/show_bug.cgi?id=15790 Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Samuel Cabrero <scabrero@samba.org> Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org> Autobuild-Date(master): Wed Dec 10 22:46:11 UTC 2025 on atb-devel-224
2025-08-27schema: Add Validated-Write-Computer Extended Right from Windows Server 2016Jennifer Sutton1-3/+8
Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2025-03-19python/provision: avoid SDDL conversion in set_dir_acl()Ralph Boehme1-1/+1
This is not needed and has the potential to loose information if the sddl code wouldn't have all features implemented. No intended change in behaviour. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14927 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Ralph Boehme <slow@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
2025-02-04provision: always use a large transaction index cacheDouglas Bagnall1-6/+3
A larger cache costs more per transaction, but makes a large number of operations within a transaction faster. We expect to be dealing with the latter case here, regardless of the batch_mode parameter and the database size. 200000 is chosen because it is also used in join and schemaupgrade, and should be sufficient in most cases. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15795 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org> Autobuild-Date(master): Tue Feb 4 22:47:35 UTC 2025 on atb-devel-224
2024-08-04python:provision: Do not suppress errors produced setting up BIND databaseJo Sutton1-6/+6
Signed-off-by: Jo Sutton <josutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2024-06-10provision: Match Windows 2022 and set ↵Andrew Bartlett1-1/+3
msDS-ExpirePasswordsOnSmartCardOnlyAccounts by default We do this by telling the Domain Functional Level upgrade code that this is a new install. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
2024-03-05dsdb: Remove calls to ldb.set_opaque_integer()Andrew Bartlett1-4/+4
This routine will shortly be removed, it is now replaced by an improved ldb.set_opaque() Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
2024-03-05python/samba/provision: Ensure KDS root key is usable as soon as provision ↵Andrew Bartlett1-1/+11
is complete We do this by setting the start time to being 10 hours 5min earlier than now. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
2024-03-01provision: add a default root keyDouglas Bagnall1-0/+4
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-15python: use python3 style super statementsRob van der Linde2-15/+15
Signed-off-by: Rob van der Linde <rob@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove references to removed parametersJoseph Sutton1-4/+0
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Dec 14 04:32:31 UTC 2023 on atb-devel-224
2023-12-14python: Remove unused parameter ‘backup’Joseph Sutton1-1/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove unused parameter ‘serverrole’Joseph Sutton1-2/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove unused parameter ‘am_rodc’Joseph Sutton1-2/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove unused parameter ‘am_rodc’Joseph Sutton1-2/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove unused parameters ‘backend_store’ and ↵Joseph Sutton1-5/+2
‘backend_store_size’ Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove unused parameters ‘backend_store’ and ↵Joseph Sutton1-6/+2
‘backend_store_size’ Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove unused parameter ‘fill’Joseph Sutton1-2/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove unused parameter ‘keytab_path’Joseph Sutton1-1/+0
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove unused parameter ‘erase’Joseph Sutton1-1/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove unused parameter ‘backend_store_size’Joseph Sutton1-3/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove unused parameter ‘root_gid’Joseph Sutton1-3/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove unused parameters ‘maxuid’ and ‘maxgid’Joseph Sutton1-1/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove unused parameters ‘maxuid’ and ‘maxgid’Joseph Sutton1-3/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove unused parameter ‘netlogon’Joseph Sutton1-3/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove unused parameter ‘targetdir’Joseph Sutton1-2/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove unused parameter ‘backend_store’Joseph Sutton2-3/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove unused parameter ‘lp’Joseph Sutton2-3/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove unused parameter ‘lp’Joseph Sutton1-3/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove unused parameter ‘targetdir’Joseph Sutton2-3/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove unused parameter ‘targetdir’Joseph Sutton1-3/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove unused parameter ‘backend_store’Joseph Sutton1-4/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove unused parameter ‘lp’Joseph Sutton2-2/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove unused parameter ‘logger’Joseph Sutton2-2/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Make use of ‘prefix’ parameterJoseph Sutton1-1/+1
This method is now consistent with the other ‘add_*_record()’ methods. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove unused parameter ‘lp’Joseph Sutton1-2/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Remove unused parameter ‘targetdir’Joseph Sutton1-2/+2
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-14python: Make use of ‘serverdn’ parameterJoseph Sutton1-2/+5
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-08python: Add missing word to commentJoseph Sutton1-1/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-12-08python: Fix code spellingJoseph Sutton1-1/+1
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-10-16CVE-2018-14628: python:provision: make DELETEDOBJECTS_DESCRIPTOR available ↵Stefan Metzmacher2-0/+9
in the ldif files BUG: https://bugzilla.samba.org/show_bug.cgi?id=13595 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-08-30python: Remove unused importsJoseph Sutton2-10/+0
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-07-19s4:provision: use better values for operatingSystem[Version]Stefan Metzmacher1-1/+10
Some clients (e.g. an exchange server) check operatingSystemVersion in order to check if a domain controller is new enough. So we better use a value matching the dc functional level. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-06-23python:samba:provision: Fix code spellingAndreas Schneider3-10/+10
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-05-16samba-tool domain provision: Use "ad dc functional level" to control max ↵Joseph Sutton1-3/+5
functional level This allows the DC to self-declare a higher level and so allow a 2016 domain to be created, for testing and controlled implementation purposes. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2023-04-28s3/utils: when encoding ace string use "FA", "FR", "FW", "FX" string rightsNoel Power1-2/+2
prior to this patch rights matching "FA", "FR", "FW", "FX" were outputted as the hex string representing the bit value. While outputting the hex string is perfectly fine, it makes it harder to compare icacls output (which always uses the special string values) Additionally adjust various tests to deal with use of shortcut access masks as sddl format now uses FA, FR, FW & FX strings (like icalcs does) instead of hex representation of the bit mask. adjust samba4.blackbox.samba-tool_ntacl samba3.blackbox.large_acl samba.tests.samba_tool.ntacl samba.tests.ntacls samba.tests.posixacl so various string comparisons of the sddl format now pass Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> [abartlet@samba.org Adapted to new stricter SDDL behaviour around leading zeros in hex numbers, eg 0x001]
2023-04-28py:provision: use canonical representation of ACE flagsDouglas Bagnall1-2/+2
This is because in ceetain places we compare strings rather than security descriptors. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-04-05python:join: fix reused variable name in provision funcJohn Mulligan1-4/+5
Recent updates to run adprep during the provision function re-used a variable name that was already in use as a string. This reassignment changed the type of the referenced object. This variable name is later used to setup the mit krb5 kdc conf and expects the var to contain a string. When executed with default cli options on a mit krb5 based build samba tool fails with a traceback: ``` INFO 2023-03-23 21:22:50,399 pid:6 /usr/lib64/python3.10/site-packages/samba/provision/__init__.py #2021: Fixing provision GUIDs ERROR(<class 'AttributeError'>): uncaught exception - 'DomainUpdate' object has no attribute 'upper' File "/usr/lib64/python3.10/site-packages/samba/netcmd/__init__.py", line 230, in _run return self.run(*args, **kwargs) File "/usr/lib64/python3.10/site-packages/samba/netcmd/domain.py", line 555, in run result = provision(self.logger, File "/usr/lib64/python3.10/site-packages/samba/provision/__init__.py", line 2408, in provision create_kdc_conf(paths.kdcconf, realm, domain, os.path.dirname(lp.get("log file"))) File "/usr/lib64/python3.10/site-packages/samba/provision/kerberos.py", line 43, in create_kdc_conf domain = domain.upper() ``` This change removes the re-use of the existing var name by chaining the calls. Fixes: 4bba26579d1 Signed-off-by: John Mulligan <jmulligan@redhat.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Apr 5 02:02:29 UTC 2023 on atb-devel-224
2023-03-22python:provision: run adprep as part of provisionStefan Metzmacher1-2/+69
With the default of base_schema=2019 we'll adprep to 2016. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-03-22samba-tool: let 'domain provision' to use the 2019 schema by defaultStefan Metzmacher1-1/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>