summaryrefslogtreecommitdiffstats
path: root/source4/scripting
Commit message (Collapse)AuthorAgeFilesLines
* s4-samdb: added a few function comments for pydocAndrew Tridgell2011-09-051-0/+3
| | | | Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s4-provision: these substitutuons are not used any moreAndrew Tridgell2011-09-051-4/+1
| | | | | | we now create partitions dynamically Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
* s4-s3-upgrade Fix error handling in add_users_to_groupAndrew Bartlett2011-09-051-2/+5
|
* s4-provision handle a number of invalid but real-world upgrade casesAndrew Bartlett2011-09-051-9/+36
| | | | | | | | | | Real world databass have the wrong account flags (U and W at the same time) and have the wrong group type in group mapping databases. Cope with these. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Mon Sep 5 04:58:09 CEST 2011 on sn-devel-104
* s4-provision Fix type error on existing idmap entries in s3 upgradeAndrew Bartlett2011-09-051-1/+1
| | | | | | This is already a DN object. Andrew Bartlett
* s4-provision Use ProvisioningError and the eadbAndrew Bartlett2011-09-051-5/+5
| | | | | | | | | | The eadb flag tells us to avoid using system extended attributes, typcially if we are not running as root (ie, in a test environment). The ProvisioningError class allows us to return failures to the upgrade_from_s3 script which can then be detected correctly by the selftest framework. Andrew Bartlett
* s4-provision Allow a missing idmap DB in upgrade.pyAndrew Bartlett2011-09-041-2/+9
| | | | | Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Sun Sep 4 06:34:16 CEST 2011 on sn-devel-104
* s4-provision cope with SID_NAME_WKN_GRP mappings in upgrade.pyAndrew Bartlett2011-09-041-1/+5
| | | | | | | | Some incorrect LDAP backends have entries with this group type, but due to the pdb_ldap code, we cannot read the group members, and we already skip them in add_group_from_mapping_entry(). Andrew Bartlett
* pyldb: added OID_COMPARATOR constantsAndrew Tridgell2011-09-011-1/+1
| | | | | | | This also changes the other constants to remove the LDB_ prefix, which is redundent Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s4-provision Use samba.dns_name_to_dnAndrew Bartlett2011-08-262-2/+6
|
* py-samba3-test: Copy sample database in tempdir before running testAmitay Isaacs2011-08-261-7/+11
| | | | | | | | | | | Samba3 python module using passdb api modifies the database files, to upgrade them to latest version. So copy the sample database before running tests on it. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Fri Aug 26 07:04:15 CEST 2011 on sn-devel-104
* samba3dump: Update the code using modified samba3 module with passdb apiAmitay Isaacs2011-08-261-40/+53
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s3_upgrade: Set lock directory to correct directoryAmitay Isaacs2011-08-261-0/+1
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* py-samba3-test: Set lock directory to the datadirAmitay Isaacs2011-08-261-0/+1
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s3_upgrade: Update commandline options and use updated samba3 python moduleAmitay Isaacs2011-08-261-144/+75
| | | | | | | | | | | | | | | | | | | | | | | upgrade_from_s3 script now requires samba3 configuration file and target directory for samba4 database. In addition, it either uses --libdir option or --testparm option to correctly guess the paths for samba3 databases (private dir and state directory). Usage: upgrade_from_s3 [options] <configuration_file> <targetdir> Input arguments are: <configuration_file> - path to existing smb.conf <targetdir> - directory in which samba4 database will be created In addition, specify either samba3 database directory (with --libdir) or samba3 testparm utility (with --testparm). Before using passdb interface, initialize s3 loadparm context using correct path settings for private dir and state directory. Export account policy from s3 to s4. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* py-samba3: Use passdb/param wrapper for samba3 moduleAmitay Isaacs2011-08-262-567/+117
| | | | | | | | | | | Instead of parsing samba3 database files (password, group mapping, account policy, secrets), use passdb python wrapper. Similarly for parsing configuration, use samba3 param python wrapper. Other databases (idmap, registry, wins) are still parsed in python. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s3_upgrade: Let python generate backtrace for unknown exceptionsAmitay Isaacs2011-08-261-15/+4
| | | | | | Catch known exceptions only. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s3_upgrade: Add document strings for python methodsAmitay Isaacs2011-08-261-9/+23
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s4-dns: cope with duplicate entries in dns_update_listAndrew Tridgell2011-08-251-1/+5
| | | | | | this is needed for when DNSFOREST and DNSDOMAIN are the same Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
* s4-join: fixed DNS hostnameAndrew Tridgell2011-08-251-1/+1
| | | | we need the local hostname, not the remote name
* s4-join: setup DNS forest name on join contextAndrew Tridgell2011-08-251-4/+4
|
* s4-dns/spn: fixed DNS and SPN scripts to setup forest DNS nameAndrew Tridgell2011-08-252-5/+6
|
* s4-samdb: added host_dns_name(), domain_dns_name() and forest_dns_name()Andrew Tridgell2011-08-251-0/+15
| | | | | these will make it easier to get python code right for multi-domain support
* s4-provision: pass the rootDN into guess_names()Andrew Tridgell2011-08-251-2/+2
| | | | | | this gets the correct forest DN during provision Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* samba-tool: fixed use of base DNs in ldapcmpAndrew Tridgell2011-08-251-17/+13
| | | | Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s4-spnupdate: fixed searches on domain NCAndrew Tridgell2011-08-251-2/+2
| | | | Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s4-dns: fixed base search on domain NCAndrew Tridgell2011-08-251-1/+1
| | | | Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s3_upgrade: Set the administrator password on upgradeAmitay Isaacs2011-08-191-2/+22
| | | | | | | | In the upgrade process, set the administrator password from the existing root or administrator account. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s3_upgrade: Do not add administrator and root accounts from s3 to s4Amitay Isaacs2011-08-191-0/+2
| | | | | | | Need to copy the password from s3 for administrator/root to s4. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* python-samba3: Secrets file loaded from private dir, not lib dirAmitay Isaacs2011-08-192-2/+8
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s3upgrade: Add idmap migration, users/groups importAmitay Isaacs2011-08-191-40/+193
| | | | | | | | Added users/groups import from s3 using python wrapper for passdb. Fix idmap entries for users/groups when migrating from s3 idmap. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* provision: Add idmap database handle to the result of provisionAmitay Isaacs2011-08-191-0/+2
| | | | | | | It is required in s3_upgrade script to migrate idmap database from s3 to s4. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* samba3-python: Add methods to get any entry (user/group) and its sid from idmapAmitay Isaacs2011-08-191-0/+14
| | | | | | | This is required in upgrade_s3 script to migrate idmap database from s3 to s4 Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* samba-tool: changed samba-tool user delete to use samdb instead of Net()Andrew Tridgell2011-08-181-9/+17
| | | | | this makes it possible to use with -H, so you can delete users on remote DCs or against local databases
* s4-samdb: added deleteuser() to samdbAndrew Tridgell2011-08-181-0/+23
| | | | This is similar to deletegroup()
* s4-provision Add support for fixing the DC rid to a particular valueAndrew Bartlett2011-08-132-16/+29
| | | | | | | | This will allow an upgraded DC to keep its SID, while being upgraded to AD. We also watch for the highest RID in the existing DB to set next_rid for other additional users. Andrew Bartlett
* upgrade: Add missing bits for the s3 to s4 upgrade scriptAmitay Isaacs2011-08-131-32/+73
| | | | | | | | | Use passdb backend to import/export users Remove unused options for upgrade_from_s3 command (--blank) and credentials options Config file is specified with -s/--configfile option and no need to specify as an argument. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* py-samba3: Create samba3 python package to hold other modulesAmitay Isaacs2011-08-131-18/+18
| | | | This will include passdb and param.
* s4-scripting Rename passdb upgrade routine to avoid conflict with ↵Andrew Bartlett2011-08-131-2/+2
| | | | upgradeprovision
* samba-tool: Remove gpo setacl commandAmitay Isaacs2011-08-131-5/+0
|
* s3:samba-tool: add --domain-critical-only to "samba-tool domain join"Stefan Metzmacher2011-08-121-3/+9
| | | | | | metze Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s4:py/samba/join: add domain_critical_only=False to join_DC/join_RODCStefan Metzmacher2011-08-121-3/+10
| | | | | | metze Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s4:py/samba/drs_utils: pass down req/req_level to self.net.replicate_chunk()Stefan Metzmacher2011-08-121-1/+2
| | | | | | metze Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s4-dbcheck: offer to fix dsServiceName to be in GUID formAndrew Tridgell2011-08-121-0/+43
| | | | | | this fixes the dsServiceName so it can handle server renames Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s4-join: make dsServiceName a GUID in @ROOTDSE on joinAndrew Tridgell2011-08-121-3/+5
| | | | | | | when joining another domain as a DC we should setup our dsServiceName in @ROOTDSE to be a GUID so we can cope with later server renames Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s4-provision: create dsServiceName in @ROOTDSE in GUID formAndrew Tridgell2011-08-121-1/+2
| | | | | | this allows for handling of server renames as the GUID doesn't change Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s4: create a small script to test drsuapi/cracknameMatthieu Patou2011-08-101-0/+75
|
* s4-pysamba: fixed double conversion of int32Andrew Tridgell2011-08-091-1/+1
| | | | if the number is already negative, we shouldn't convert it
* s4-samdb: support relative paths in SamDB() connectAndrew Tridgell2011-08-091-1/+2
| | | | | don't add the private path unless the database doesn't exist with the supplied path
* pysamdb: move normalise_int32() to common moduleAndrew Tridgell2011-08-092-7/+7
| | | | this will be needed in quite a few places