summaryrefslogtreecommitdiffstats
path: root/python/samba/join.py
Commit message (Collapse)AuthorAgeFilesLines
* join.py: Set NT ACL on crossRef object for new partitionAndrew Bartlett2014-09-021-3/+7
| | | | | | | | | | Change-Id: Icb1b00697cc5641481370ded26f2f0551a5b2a97 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Sep 2 14:15:54 CEST 2014 on sn-devel-104
* join.py: Ensure to fill in samAccountName so we get the domain$ accountAndrew Bartlett2014-09-011-1/+2
| | | | | | | | | | Otherwise, we get a random samAccountName Andrew Bartlett Change-Id: I87ea532fe22c1b2d2effd52859da3b357f692b5a Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* join.py: Ensure we set the SID of the parent domain on the trust recordAndrew Bartlett2014-09-011-1/+2
| | | | | | | Change-Id: Ifaf3f2d1240d983a48ee1874fdc9c266354f6754 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
* python: Use the security.dom_sid type for ctx.domsid in join.py and provisionAndrew Bartlett2014-09-011-5/+5
| | | | | | | Change-Id: I1266f77184d68aae6a39a73bac8a432fdd707b2e Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
* provision: Use names.domainsid and names.domainguidAndrew Bartlett2014-09-011-5/+9
| | | | | | | | | | | | | This is better than passing around parameters to functions all over the provision stack and makes it easier to pass in a seperate forest SID when we start to support subdomains. Change-Id: I3787f4f3433ca04628f888135c7c0c8195379542 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
* join.py: Reinstate full_nc_list and make creation of NTDS-DSA object commonAndrew Bartlett2014-09-011-32/+34
| | | | | | | | | | | | The new function join_ntdsdsa_obj() returns the object, to be added over LDAP or DsAddEntry(). Andrew Bartlett Change-Id: I41ac256fb3d4edffc617af4ae580acd941b4de83 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
* python/join: use lowercase for the dnshostname.Stefan Metzmacher2014-08-261-2/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4-dns: dlz_bind9: Create dns-HOSTNAME account disabledSamuel Cabrero2013-10-251-4/+7
| | | | | | | Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Oct 25 00:39:21 CEST 2013 on sn-devel-104
* samba-tool domain join subdomain: Rework sambadns.py to allow setup of ↵Andrew Bartlett2013-10-111-0/+2
| | | | | | | | | | | | | | DomainDNSZone only This skips handling the ForestDNSZone when we are setting up a subdomain. 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): Fri Oct 11 10:27:49 CEST 2013 on sn-devel-104
* join.py: Reconnect to the DC based on the DC name in dnsHostName to allow ↵Andrew Bartlett2013-10-111-0/+4
| | | | | | | | | | | connection to IPC$ The treeConnect&X of the GUID name fails against Windows 2003. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* join.py: Remove special full_ncs handling, we only need to updateRefs on an ↵Andrew Bartlett2013-10-111-7/+2
| | | | | | | NC we replicate Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* join.py: Use ctx.forestdns_zone variableAndrew Bartlett2013-10-111-2/+2
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* join.py: Correct ctx.forestdns_zone and so remove the need for duplicate ↵Andrew Bartlett2013-10-111-5/+1
| | | | | | | repl.replicate() call Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* provision: Remove --username and --password options from samba-tool domain ↵Andrew Bartlett2013-10-111-1/+1
| | | | | | | | | | | | | | | provision This avoids confusion, because the LDAP backend does not use these, and they do not set the password for the administrator account either! This may break support for the 'existing' backend LDAP backend, but that is nothing more than a stub for future development anyway, and new work in this area should use EXTERNAL in any case. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* python/drs: Ensure to pass in the local invocationID during the domain joinAndrew Bartlett2013-09-191-1/+1
| | | | | | | | | | 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>
* 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 domain join: Add --quite and --verboseAndrew Bartlett2013-09-161-35/+28
| | | | | | | | | | 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-161-2/+8
| | | | | | | | | | 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-041-4/+69
| | | | | | | | | | 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>
* Move python modules from source4/scripting/python/ to python/.Jelmer Vernooij2013-03-021-0/+1149
Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Mar 2 03:57:34 CET 2013 on sn-devel-104