summaryrefslogtreecommitdiffstats
path: root/source4/scripting/python
Commit message (Collapse)AuthorAgeFilesLines
* 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-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
* s4:pyglue: PyArg_ParseTuple("I") requires an 'unsigned int' argumentStefan Metzmacher2011-08-081-1/+5
| | | | | | | | | If we pass variable references we don't get implicit casting! metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Mon Aug 8 18:01:19 CEST 2011 on sn-devel-104
* sd_utils: Fix some formatting, add module docstring.Jelmer Vernooij2011-08-071-3/+5
| | | | | Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sun Aug 7 21:07:04 CEST 2011 on sn-devel-104
* s4:netcmd/gpo.py: we don't need to set autogenerated attributesStefan Metzmacher2011-08-061-21/+11
| | | | metze
* s4-samdb: save the url in the samdb classAndrew Tridgell2011-08-041-0/+3
| | | | | | | this is useful for debugging, so we know which database we are dealing with Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
* samba-tool: Rename samba-tool command gpo2 --> gpoAmitay Isaacs2011-08-031-1/+1
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* samba-tool: Add implementation of gpo create commandAmitay Isaacs2011-08-031-1/+176
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* samba-tool: Add functions to create directories and copy files over SMB shareAmitay Isaacs2011-08-031-0/+32
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* samba-tool: Rename copy_directory_recurse to copy_directory_remote_to_localAmitay Isaacs2011-08-031-11/+19
| | | | | | | | gpo fetch is remote->local and gpo create is local->remote local is local filesystem and remote is smb share. Need two functions to copy local->remote and remote->local. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* samba-tool: Addd functions to print GPO flags and GPlink optionsAmitay Isaacs2011-08-031-28/+22
| | | | | | | Use methods from python wrapper to convert gpo flags and gplink options to string. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* dbcheck: Cancel transaction if operation fails.Jelmer Vernooij2011-08-021-10/+15
| | | | | Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Tue Aug 2 01:41:07 CEST 2011 on sn-devel-104
* acl: Improve error message when setting acls fails.Jelmer Vernooij2011-08-011-4/+12
| | | | | Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Mon Aug 1 18:59:12 CEST 2011 on sn-devel-104
* samba-tool: use ldb.binary_encode() on search expression elementsAndrew Tridgell2011-07-299-24/+27
| | | | | | | | this allows us to deal with search elements containing characters that must be escaped in LDAP Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
* samba-tool: fixed binary encoding of usernames in setpasswordAndrew Tridgell2011-07-291-2/+2
| | | | | Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com> Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* samba-tool: ensure prompting of passwords is in the right orderAndrew Tridgell2011-07-281-1/+3
| | | | | | | | | | | | ask the creds object for the password before prompting for the new password in the user password change code, to ensure the user is asked for the old password first Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com> Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Thu Jul 28 08:35:45 CEST 2011 on sn-devel-104
* samba-tool: Added gpo fetch command implementation using python smb module.Amitay Isaacs2011-07-281-0/+94
| | | | | | | To copy the GPO files, use libcli python interface list() to get directory listing and loadfile() to read the contents of the file. Signed-off-by: Andrew Tridgell <tridge@samba.org>
* samba-tool: Change samba-tool gpo semantics (use gpo name instead of dn)Amitay Isaacs2011-07-281-78/+124
| | | | | | | | | | | Instead of using gpo dn as the key to refer to a gpo, use the gpo name as the key. If no URL is specified (-H option), find a writable DC and use that. Extract a commonly used method as get_gpo_info() to find details of a GPO. Signed-off-by: Andrew Tridgell <tridge@samba.org>
* samba-tool: Add user password command to change user's own passwordAmitay Isaacs2011-07-281-0/+33
| | | | | | | This command is a user-level command and differs from setpassword command which is administrator command. Signed-off-by: Andrew Tridgell <tridge@samba.org>
* samba-tool: Python routine to find writable/ldap-capable DCAmitay Isaacs2011-07-281-0/+13
| | | | Signed-off-by: Andrew Tridgell <tridge@samba.org>
* samba-tool: Raise exception on errors and report using base classAmitay Isaacs2011-07-281-10/+3
| | | | | | | Exceptions are captured at top-level samba-tool and reported using the base class (Command) method show_command_error(). Signed-off-by: Andrew Tridgell <tridge@samba.org>
* samba-tool: Display Usage line and list commands alphabeticallyAmitay Isaacs2011-07-281-3/+6
| | | | Signed-off-by: Andrew Tridgell <tridge@samba.org>
* samba-tool: Replace C version of samba-tool with python versionAmitay Isaacs2011-07-281-70/+0
| | | | | | | C version of samba-tool is now called samba-tool-c, which will be removed as soon as all the samba-tool commands are ported to python. Signed-off-by: Andrew Tridgell <tridge@samba.org>
* samba-tool: Added python version of samba-toolAmitay Isaacs2011-07-281-0/+70
| | | | Signed-off-by: Andrew Tridgell <tridge@samba.org>
* samba-tool: Reimplement GPO functions in pythonAmitay Isaacs2011-07-281-11/+412
| | | | | | | Implementation of subcommands - show, getlink, setlink, dellink, getinheritance, setinheritance Signed-off-by: Andrew Tridgell <tridge@samba.org>
* samba-tool: Removed newuserGiampaolo Lauria2011-07-282-94/+0
| | | | | | Removed newuser as its functionality has been moved to "user add" Signed-off-by: Andrew Tridgell <tridge@samba.org>
* samba-tool: Changed "user add" implementationGiampaolo Lauria2011-07-281-13/+60
| | | | | | | Changed "user add" to use SamDB instead of Net Also, added the set of Options available in newuser Signed-off-by: Andrew Tridgell <tridge@samba.org>
* samba-tool: add -H or --URL where necessaryGiampaolo Lauria2011-07-287-19/+32
| | | | | | | To improve consistency, I've made sure all the commands take either a -H or --URL when specifying a URL Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s4:samba-tool: ldapcmp needs CredentialsOptionsDoubleStefan Metzmacher2011-07-261-0/+6
| | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue Jul 26 17:09:32 CEST 2011 on sn-devel-104
* s4-param: use "state directory" and "cache directory" optionsBjörn Baumbach2011-07-211-5/+5
| | | | | | | instead of "state dir" and "cache dir" in order be compatible with the source3 code. Signed-off-by: Stefan Metzmacher <metze@samba.org>