summaryrefslogtreecommitdiffstats
path: root/python
Commit message (Collapse)AuthorAgeFilesLines
...
* dbcheck: Add back the elements that were wrongly removed from CN=Deleted ObjectsAndrew Bartlett2013-09-241-0/+66
| | | | | | | | | | | | | | This is the final part of the fix for the issue in Samba 4.1 pre-release tree where we would wrongly delete the Deleted Objects container during a join. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Tue Sep 24 09:31:37 CEST 2013 on sn-devel-104
* dbcheck: Ensure to always increase the error_countAndrew Bartlett2013-09-241-0/+1
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s4-openldap: Added an -H option to delegation scriptNadezhda Ivanova2013-09-231-11/+63
| | | | | | | | Also calling delegation locally without credentials, as this is not really necessary and causes selftest errors against the openldap backend. Signed-off-by: Nadezhda Ivanova <nivanova@symas.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* python-samba-tool fsmo: Do not give an error on a successful role transferAndrew Bartlett2013-09-231-7/+7
| | | | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=9461 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Mon Sep 23 12:00:24 CEST 2013 on sn-devel-104
* dbcheck: Look for and fix the all-zero invocationID in replPropertyMetaDataAndrew Bartlett2013-09-221-0/+68
| | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* python/drs: Ensure to pass in the local invocationID during the domain joinAndrew Bartlett2013-09-193-4/+10
| | | | | | | | | | This ensures (and asserts) that we never write an all-zero GUID as an invocationID to the database in replPropertyMetaData. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* OpenLDAP provisioning tweaksHoward Chu2013-09-181-33/+25
| | | | | | | | | | | | | Remove BerkeleyDB-specific setup. Streamline cn=samba partition initialization - allow any backend type for it. Use back-mdb instead of back-ldif for cn=samba partition Signed-off-by: Howard Chu <hyc@symas.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@symas.com> Autobuild-User(master): Nadezhda Ivanova <nivanova@samba.org> Autobuild-Date(master): Wed Sep 18 21:39:51 CEST 2013 on sn-devel-104
* Use SASL/EXTERNAL over ldapi://Howard Chu2013-09-181-3/+4
| | | | | | | | | The provision script will map the uid of the user running the script to the samba-admin LDAP DN. Signed-off-by: Howard Chu <hyc@symas.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
* Give slapd a second to startupHoward Chu2013-09-181-1/+1
| | | | | | | | | | | | Moving the sleep to the beginning of the loop avoids most occurrences of the "connection failed" message Signed-off-by: Howard Chu <hyc@symas.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@symas.com> Autobuild-User(master): Nadezhda Ivanova <nivanova@samba.org> Autobuild-Date(master): Wed Sep 18 07:43:09 CEST 2013 on sn-devel-104
* Fix OpenLDAP partition configsHoward Chu2013-09-171-0/+22
| | | | | | | | Update to use LMDB backend, BDB is deprecated Update to support DomainDNSZones and ForestDNSZones partitions. Signed-off-by: Howard Chu <hyc@symas.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* dsdb: Use credentials.get_forced_sasl_mech()Andrew Bartlett2013-09-171-0/+2
| | | | | | | | | | | | | | This will allow us to force the use of only DIGEST-MD5, for example, which is useful to avoid hitting GSSAPI, SPNEGO or NTLM when talking to OpenLDAP and Cyrus-SASL. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@symas.com> Autobuild-User(master): Nadezhda Ivanova <nivanova@samba.org> Autobuild-Date(master): Tue Sep 17 01:41:41 CEST 2013 on sn-devel-104
* samba-tool domain provision: Make ldap_backend_startup.sh +x and take ↵Andrew Bartlett2013-09-161-2/+5
| | | | | | | optional arguments Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
* samba-tool domain join: Set server role correctly to "active directory ↵Andrew Bartlett2013-09-161-2/+2
| | | | | | | | | | | | | | domain controller" We changed the magic string when we reworked the list of server roles. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Mon Sep 16 23:33:41 CEST 2013 on sn-devel-104
* samba-tool domian join: Only print adminpass warning on subdomain creationAndrew Bartlett2013-09-161-0/+3
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* samba-tool domain join: Add --quite and --verboseAndrew Bartlett2013-09-162-45/+63
| | | | | | | | | | This means we now use logger consistently between doimin join, domain dcpromo and domain provision. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* join.py: Restore support for joining as a subdomainAndrew Bartlett2013-09-162-7/+16
| | | | | | | | | | This set of patches fixes up the errors that were introduced into the partial support during the past couple of years. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* join.py: Handle more error cases with useful exceptionsAndrew Bartlett2013-09-161-1/+9
| | | | | | | | | This will help track down strange failures in the future. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* samba-tool domain join subdomain: Set "reveal_internals:0" control so we can ↵Andrew Bartlett2013-09-161-1/+1
| | | | | | | | | | | | | | | | | see the ncName The issue here is that we create the ncName remotely with DsAddEntry, and then replicate it back. However, at this point the naming context pointed at by the ncName does not exist! The issue is that the extended_dn_out module then hides the link, because it points to a missing object. The reveal_internals control forces this link to be returned, and so we can then find the GUID, to create the domain with the right GUID. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* join.py: Show which database we failed to find the DN on (clarify local v ↵Andrew Bartlett2013-09-161-1/+1
| | | | | | | remote) Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* join.py: Handle exceptions when looking for GUID in a DNAndrew Bartlett2013-09-161-1/+5
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* scripting/join.py: Handle creating the dns-NAME account during a DC joinAndrew Bartlett2013-09-042-7/+77
| | | | | | | | | | This will ensure that the DLZ plugin works out of the box when joining a second Samba DC to the domain. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* python/provision: remove unused linklocal=False argument from interface_ips_v6()Stefan Metzmacher2013-08-301-3/+3
| | | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Bjoern Jacke <bj@sernet.de> Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Fri Aug 30 17:33:58 CEST 2013 on sn-devel-104
* python/pyglue: filter out loopback and linklocal addresses unless ↵Stefan Metzmacher2013-08-301-2/+43
| | | | | | | | | all_interfaces is given Bug: https://bugzilla.samba.org/show_bug.cgi?id=10030 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Bjoern Jacke <bj@sernet.de>
* samba-tool dbcheck: Correctly remove deleted DNs in dbcheckAndrew Bartlett2013-07-301-1/+1
| | | | | | | | | | | | The previous pattern never matched, as it was a typo. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Jul 30 12:55:00 CEST 2013 on sn-devel-104
* python samba-tool drs: Correctly print KCC references to deleted serversAndrew Bartlett2013-06-121-3/+12
| | | | | | | | Tested against Windows 2008R2, presumably before the KCC ran. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Remove remaining references to "password level" in the treeAndrew Bartlett2013-06-111-1/+0
| | | | | | | Reviewed-by: Simo Sorce <idra@samba.org> Autobuild-User(master): Simo Sorce <idra@samba.org> Autobuild-Date(master): Tue Jun 11 16:25:54 CEST 2013 on sn-devel-104
* dns: Delete dnsNode objects when they are emptyKai Blin2013-06-011-0/+117
| | | | | | | | | | | | If an update leaves the dnsNode without any entries, the dnsNode object should be deleted. Thanks to Günter Kukkukk for his excellent debugging work on this one. This should fix bug #9559 Signed-off-by: Kai Blin <kai@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* samba-tool/dns: Set secure zone update flag after creating new zoneAmitay Isaacs2013-05-301-3/+9
| | | | | | | Windows DC ignores the secure update flag while creating new zone. Windows performs another operation to set the secure update flag. Signed-off-by: Amitay Isaacs <amitay@gmail.com>
* samba-tool/dns: Pass on additional flags when creating zonesAmitay Isaacs2013-05-301-0/+6
| | | | | | | | Windows DCs require additional flags to be set when creating zones. This fixes bug #9599. Signed-off-by: Amitay Isaacs <amitay@gmail.com>
* s4-dns: Support update of SOA recordsAmitay Isaacs2013-05-301-2/+3
| | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com>
* s4-dns: Print/Set minimumTTL value in SOA recordAmitay Isaacs2013-05-281-1/+3
| | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue May 28 08:47:56 CEST 2013 on sn-devel-104
* python-samba-tool domain classicupgrade: Use transactions when adding ↵Andrew Bartlett2013-05-161-31/+69
| | | | | | | | | | | users/groups/members This should make things a bit faster when importing very large numbers of users as we will not constantly rewrite the indicies on disk. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
* samba-tool dbcheck: Use dsdb.DS_GUID_DELETED_OBJECTS_CONTAINER rather than ↵Andrew Bartlett2013-05-161-1/+1
| | | | | | | | | | the literal value This is better practice. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
* python-samba-tool domain classicupgrade: Correct message about re-promoting BDCsAndrew Bartlett2013-05-161-1/+1
| | | | Reviewed-by: Stefan Metzmacher <metze@samba.org>
* python-samba-tool domain classicupgrade: Actually Skip domain trust accountsAndrew Bartlett2013-05-161-0/+1
| | | | Reviewed-by: Stefan Metzmacher <metze@samba.org>
* python-samba-tool domain classicupgrade: Skip machine accounts that do not ↵Andrew Bartlett2013-05-161-4/+11
| | | | | | | | | | end in $ These accounts will not work anyway, as all the domain member lookup code in netlogon expects the $. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
* dns: Fix allocation of txt_record in txt record testsKai Blin2013-05-161-8/+12
| | | | | | | | Signed-off-by: Kai Blin <kai@samba.org> Reviewed-By: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Thu May 16 15:39:15 CEST 2013 on sn-devel-104
* dns: more debug debug options in the testsKai Blin2013-05-161-4/+26
| | | | | Signed-off-by: Kai Blin <kai@samba.org> Reviewed-By: Amitay Isaacs <amitay@gmail.com>
* dns: Add support for MX queriesKai Blin2013-05-161-0/+43
| | | | | | | | | | Due to an oversight, the internal DNS server supports MX record updates, but not MX record queries. Add support for MX queries and tests. This should fix bug #9485 Signed-off-by: Kai Blin <kai@samba.org> Reviewed-By: Amitay Isaacs <amitay@gmail.com>
* samba_tool/base.py: Fix typo.Karolin Seeger2013-05-151-1/+1
| | | | | Signed-off-by: Karolin Seeger <kseeger@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* netcmd/group.py: Fix typo.Karolin Seeger2013-05-151-2/+2
| | | | | Signed-off-by: Karolin Seeger <kseeger@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* samba-tool/tests: Force the gecos of the user to a fixed value.Matthieu Patou2013-05-151-1/+10
| | | | | | | | | | | | | | When --gecos is not specified samba-tool user add will try to read the gecos field from a getpw call. And if user's GECOS is empty (like the build user on sn-devel-104) then the test will fail because we can't add an empty gecos. Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed May 15 16:19:23 CEST 2013 on sn-devel-104
* selftest: Output error when samba_tool user command failsMatthieu Patou2013-05-061-2/+4
| | | | | | | | It should help to debug why is it failing on some hosts in the build farm (ie. sn-devel) Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* samba-tool/dns: Fix a typo in ttl variable nameAmitay Isaacs2013-04-191-1/+1
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Jeremy Allison <jra@samba.org>
* netcmd/dns: fix typoDavid Disseldorp2013-04-181-2/+2
| | | | | | | | | Fix provided by Tobias Florek. Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Apr 18 12:40:33 CEST 2013 on sn-devel-104
* source4/scripting/python/samba/samba3: handle ntdb files.Rusty Russell2013-04-122-49/+53
| | | | | | | | | | | | | | Upgrading old Samba 3 instances seems like a place where we don't have to read ntdb files, but Andrew Bartlett points out that you can run a Samba 4.0 and even a 4.1 'classic' domain and desire to migrate that to the AD DC. So make this upgrade code generic: if it finds an ntdb file, read that, otherwise read the tdb file. Cc: Jelmer Vernooij <jelmer@samba.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Jeremy Allison <jra@samba.org>
* scripting-provision: Do not enforce domain != realm if we are joining an ↵Andrew Bartlett2013-04-111-4/+5
| | | | | | | | | | | | | | existing domain This will allow us users to join existing oddly named domains without objection from provision. Andrew Bartlett Reviewed-by: Matthieu Patou <mat@matws.net> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Apr 11 10:41:02 CEST 2013 on sn-devel-104
* python-samba-tool domain classicupgrade: Make failure to connect directly to ↵Andrew Bartlett2013-04-101-1/+1
| | | | | | | | | | | the LDAP backend fatal This is better than failing just a little further down the stack with a useless error about use-before-set. Andrew Bartlett Reviewed-by: Michael Adam <obnox@samba.org>
* scripting: Fill the ProvisionNames hash with strings, not ldb.MessageElement ↵Andrew Bartlett2013-03-251-8/+7
| | | | | | | | | | | | | or Dn This avoids the need to fix it up again in samba_upgradedns. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Mon Mar 25 13:25:30 CET 2013 on sn-devel-104
* samba-tool ldapcmp: Remove the GUID -> name mappingsAndrew Bartlett2013-03-251-43/+4
| | | | | | | | | | | | | | | These mappings are very convenient, however because they are not one-to-one, they lead to differences being reported when none exist, dependent only on the order the schema searches return results in. Sadly the time saved by the names is offset by the time wasted chasing the 'differences' that don't exist. This in turn fixes some tests that were previously knownfail Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>