summaryrefslogtreecommitdiffstats
path: root/source4/scripting/bin
Commit message (Collapse)AuthorAgeFilesLines
...
* scripting: Make tdb_copy a common util function in samba.tdb_utilAndrew Bartlett2013-02-191-0/+1
| | | | | | | | This will allow samba_upgradeprovision to also call it. Andrew Bartlett Reviewed-by: Matthieu Patou <mat@samba.org>
* samba_upgradeprovision: Remove options to fix FS ACLsAndrew Bartlett2013-02-191-223/+204
| | | | | | | | | | | | samba-tool ntacl sysvolreset handles this better, and makes this tool much less confusing internally. Andrew Bartlett Reviewed-by: Matthieu Patou <mat@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Feb 19 06:06:41 CET 2013 on sn-devel-104
* samba_upgradeprovision: detect dns_backend for the reference provisionStefan Metzmacher2013-01-271-8/+10
| | | | | | | | | | | | | If we have a DomainDnsZone partition, we use BIND9_DLZ as backend and fix errors in the ForestDnsZone and DomainDnsZone partitions. Note: this should work fine also for SAMBA_INTERNAL. If the current setup doesn't use dns specific partitions (e.g. alpha13 setups) we pass dns_backend=BIND9_FLATFILE. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* samba_upgradeprovision: fix the nTSecurityDescriptor on more containers (bug ↵Stefan Metzmacher2013-01-271-36/+92
| | | | | | | #9481) Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* samba_upgradeprovision: fix resetting of 'nTSecurityDescriptor' on schema ↵Stefan Metzmacher2013-01-271-1/+1
| | | | | | | | | | objects Without this schema_data_modify() will reject updates to schema objects by default. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* samba_upgradeprovision: don't reset 'whenCreated' when resetting ↵Stefan Metzmacher2013-01-271-2/+0
| | | | | | | 'nTSecurityDescriptor' Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* scripting/samba_upgradedns: Only look for IPv4/IPv6 addresses if we actually ↵Andrew Bartlett2013-01-101-21/+22
| | | | | | | | | | | | | | them This allows the script to be used to create/remove the samba-specific dns-SERVER account when we do not need to create the in-directory partition. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Jan 10 20:56:50 CET 2013 on sn-devel-104
* samba_dnsupdate: set KRB5_CONFIG for nsupdate commandBjörn Baumbach2013-01-091-4/+5
| | | | | | | | | Let nslookup use krb5.conf, which is set in our KRB5_CONFIG. Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:samba_upgradeprovision: use the sd_flags:1:15 control with an empty sdStefan Metzmacher2012-11-301-7/+14
| | | | | | | | The sd_flags:1:15 control together with an empty security_descriptor has the same effect as the recalculate_sd:0 control (which is samba only). Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* provision: No longer use the wheel group in new AD DomainsAndrew Bartlett2012-10-181-1/+1
| | | | | | | | | | | The issue here is that if we set S-1-5-32-544 (administrators) to a GID only, then users cannot force a mandetory profile to be owned by administrators (which is a requirement). There is no particularly useful reason for us to enforce this matching a system group. Andrew Bartlett
* s4: samba_backup: Fix typos.Björn Baumbach2012-10-031-2/+2
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s4-python: Various formatting fixes.Jelmer Vernooij2012-09-273-72/+76
| | | | | | * Trailing whitespace * use of "==" where "is" should be used * double spaces
* samba_dnsupdate: Safely update/create names for Samba3 targets as wellAndrew Bartlett2012-09-261-4/+14
| | | | | | | | | | This avoids unlocked writes to the dns_hosts_file, and may fix some of our issues on the build farm where large numbers of tests fail due to failed name resolution. Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Sep 26 05:48:25 CEST 2012 on sn-devel-104
* samba_dnsupdate: Move to using tmpfile/rename to keep the dns_hosts_file ↵Andrew Bartlett2012-09-261-3/+10
| | | | | | | | consistent This may be the cause of some of the large failure modes on the build farm. Andrew Bartlett
* s4-python: Override SIGINT handler in scripts only.Jelmer Vernooij2012-09-254-1/+26
| | | | | | | | | | | | Override the SIGINT handler in a few select cases only, rather than doing so in one of the samba Python modules. I've done this where it matters most; we can add this code to other scripts too if necessary. This means that importing the 'samba' module from a third party application does not have side-effects on the state of the signal handlers. Bug: https://bugzilla.samba.org/show_bug.cgi?id=9068
* s4:samba_upgradedns: delete dns-HOSTNAME account if using the internal dns ↵Stefan Metzmacher2012-09-121-0/+28
| | | | | | server metze
* s4 dns: use the internal DNS server per defaultKai Blin2012-09-121-3/+3
|
* s4:scripting: rename upgradeprovision -> samba_upgradeprovisionStefan Metzmacher2012-09-122-1/+1
| | | | metze
* s4:samba-tool: allow sys.exit(ret) to control the exit codeStefan Metzmacher2012-09-111-1/+1
| | | | | | | Some subcommands may use sys.exit(0), which shouldn't be reported as an error to the caller. metze
* s4: samba_spnupdate: fix "if we are DNS server" checkBjörn Baumbach2012-08-031-5/+6
| | | | | | | | | We need to check if we have hasMasterNCs. If we are RODC we have hasFullReplicaNCs instead of hasMasterNCs. TODO: maybe check for hasFullReplicaNCs, too? Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s4-samba_upgradedns: Do not set DNS account for internal serverAndrew Bartlett2012-06-251-32/+32
| | | | | | | The internal DNS server does not need the samba-only NAME-dns account. Andrew Bartlett
* s4/scripting: in MIT build do not install samba-tool, it is not usable yetAlexander Bokovoy2012-05-241-3/+1
|
* Introduce system MIT krb5 build with --with-system-mitkrb5 option.Alexander Bokovoy2012-05-231-5/+4
| | | | | | | | | | | | | | | | | System MIT krb5 build also enabled by specifying --without-ad-dc When --with-system-mitkrb5 (or --withou-ad-dc) option is passed to top level configure in WAF build we are trying to detect and use system-wide MIT krb5 libraries. As result, Samba 4 DC functionality will be disabled due to the fact that it is currently impossible to implement embedded KDC server with MIT krb5. Thus, --with-system-mitkrb5/--without-ad-dc build will only produce * Samba 4 client libraries and their Python bindings * Samba 3 server (smbd, nmbd, winbindd from source3/) * Samba 3 client libraries In addition, Samba 4 DC server-specific tests will not be compiled into smbtorture. This in particular affects spoolss_win, spoolss_notify, and remote_pac rpc tests.
* samba-upgradedns: Use the correct magic incantation of sys.path.insert()Amitay Isaacs2012-05-151-1/+1
| | | | | | | | This replaces "bin/python" with the correct path for python libraries. The pattern requires double quotes (") instead of single quotes ('). Autobuild-User: Amitay Isaacs <amitay@samba.org> Autobuild-Date: Tue May 15 05:19:46 CEST 2012 on sn-devel-104
* s4-upgradedns: Update serverdn with only the attributes that have changedAmitay Isaacs2012-05-011-11/+21
| | | | | | | | This fixes the issue of ldb 'Operations Error' when trying to modify hasPartialReplicaNCs attribute. Autobuild-User: Amitay Isaacs <amitay@samba.org> Autobuild-Date: Tue May 1 05:28:04 CEST 2012 on sn-devel-104
* samba_spnupdate: don't try to register DNS related SPN if we are not ↵Matthieu Patou2012-04-191-1/+24
| | | | | | | | mastering the NC For RW DC the impact is pretty small but for RODC the whole SPN set is rejected by the target DC as RODC hasn't the right to register DNS SPN if it is not mastering this NC.
* s4-upgradedns: Fix the fqdn for forest dns zoneAmitay Isaacs2012-04-021-1/+1
| | | | | Autobuild-User: Amitay Isaacs <amitay@samba.org> Autobuild-Date: Mon Apr 2 10:56:10 CEST 2012 on sn-devel-104
* s4-upgradedns: Make sure the attribute exists before accessing itAmitay Isaacs2012-03-281-4/+8
| | | | | Autobuild-User: Amitay Isaacs <amitay@samba.org> Autobuild-Date: Wed Mar 28 10:27:40 CEST 2012 on sn-devel-104
* LDB/s4 - do not use the "(dn=...)" syntax on filters anymoreMatthias Dieter Wallnöfer2012-03-263-13/+14
| | | | | | | Make it AD-compatible using "(distinguishedName=...)". Reviewed-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s4-upgradedns: Add DNS partitions in msDS-hasMasterNCs in NTDS settingsAmitay Isaacs2012-03-211-0/+40
| | | | | Autobuild-User: Amitay Isaacs <amitay@samba.org> Autobuild-Date: Wed Mar 21 03:16:22 CET 2012 on sn-devel-104
* s4-upgradedns: Allow fixing of dns provision after domain joinAmitay Isaacs2012-03-211-39/+56
| | | | | | | This change allows samba_upgradedns script to be run even on existing dns provision (DLZ_BIND9 or SAMBA_INTERNAL) without any side effects. This allows to "fix" dns provision after samba-tool domain join for running BIND with DLZ plugin.
* upgrade provision didn't run findprovisionrange anymoreMatthieu Patou2012-03-171-8/+13
| | | | | Autobuild-User: Matthieu Patou <mat@samba.org> Autobuild-Date: Sat Mar 17 09:51:46 CET 2012 on sn-devel-104
* Rewrite findprovisionrange to use factorized functionsMatthieu Patou2012-03-171-98/+4
|
* samba_dnsupdate: Mention contents of invalid line when encountering parsing ↵Jelmer Vernooij2012-03-131-2/+5
| | | | | | error. Bug: https://bugzilla.samba.org/show_bug.cgi?id=8809
* samba_dnsupdate: Raise proper exception when getting unexpected DNS reply.Jelmer Vernooij2012-03-131-2/+1
|
* samba_dnsupdate: Use docstrings, which show up nicely in API docs.Jelmer Vernooij2012-03-131-21/+17
|
* upgradedns: Remove unused import.Jelmer Vernooij2012-03-111-1/+0
|
* s4:upgradeprovision - fix some output messagesMatthias Dieter Wallnöfer2012-03-111-3/+3
| | | | | Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Sun Mar 11 21:54:54 CET 2012 on sn-devel-104
* s4-upgradeprovision: Add options to do a DB backup only and not to fix acls ↵Matthieu Patou2012-03-071-17/+26
| | | | in sysvol
* kcc: Improve formatting of Python code to be more consistent with our other ↵Jelmer Vernooij2012-03-041-193/+157
| | | | code.
* upgradedns: Fix import of TXT DNS recordsAmitay Isaacs2012-03-021-1/+3
|
* upgradedns: Missing rename from upgradedns to samba_upgradednsAmitay Isaacs2012-02-281-1/+1
| | | | | Autobuild-User: Amitay Isaacs <amitay@samba.org> Autobuild-Date: Tue Feb 28 10:06:03 CET 2012 on sn-devel-104
* samba.xattr: Massively simplify copytree_with_xattrs.Jelmer Vernooij2012-02-271-1/+1
|
* upgradeprovision: Only backup sysvol directory if it exists.Jelmer Vernooij2012-02-271-1/+2
| | | | | | | This is not the case for standalone installations. Bug: https://bugs.launchpad.net/samba/+bug/930370 Bug: https://bugzilla.samba.org/show_bug.cgi?id=8781
* samba.xattr: Split copying of tree with extended attributes out into ↵Jelmer Vernooij2012-02-271-66/+3
| | | | separate module.
* provision: Leave result reporting up to caller.Jelmer Vernooij2012-02-261-1/+2
|
* upgradedns: Rename to less generic name samba_upgradedns.Jelmer Vernooij2012-02-242-1/+1
| | | | | Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Fri Feb 24 15:07:27 CET 2012 on sn-devel-104
* upgradedns: Upgrade DNS provision from BIND9_FLATFILE to AD based DNSAmitay Isaacs2012-02-212-0/+405
| | | | | | | | | This script can be used to convert provision from BIND9_FLATFILE to BIND9_DLZ or SAMBA_INTERNAL dns backends. In addition, the script migrates the DNS data in zone file (if available). Autobuild-User: Amitay Isaacs <amitay@samba.org> Autobuild-Date: Tue Feb 21 14:50:10 CET 2012 on sn-devel-104
* python: Change except: statement to except Exception:Amitay Isaacs2012-01-241-4/+4
| | | | | | | | This way we only catch true exceptions and keyboard interrupts are not caught here. Autobuild-User: Amitay Isaacs <amitay@samba.org> Autobuild-Date: Tue Jan 24 03:32:40 CET 2012 on sn-devel-104
* KCC importldif/exportldif and intersite topologyDave Craft2012-01-141-172/+1457
| | | | | | | | | | | | Add options for extracting an LDIF file from a database and reimporting the LDIF into a schema-less database for subsequent topology test/debug. Add intersite topology generation with computation of ISTG and bridgehead servers Signed-off-by: Andrew Tridgell <tridge@samba.org> Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Sat Jan 14 07:45:11 CET 2012 on sn-devel-104