summaryrefslogtreecommitdiffstats
path: root/source4/scripting/python/samba/samdb.py
Commit message (Collapse)AuthorAgeFilesLines
* Move python modules from source4/scripting/python/ to python/.Jelmer Vernooij2013-03-021-886/+0
| | | | | | | 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
* s4:scripting/python: add support for utf-8 passwords from the command lineStefan Metzmacher2013-02-041-1/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* Set RFC2307 attributes in samba-tool createAlexander Wuerstlein2012-10-181-1/+25
| | | | | | | | | | Optionally set RFC2307 (NIS Schema) attributes in samba-tool create. Mainly needed for UID mapping to be usable. Not all attributes are set-able, only harmless and non-overlapping ones (uid, uidNumber, gidNumber, loginShell, gecos). Description and homeDirectory should already be set, userPassword seems problematic. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s4-python: Formatting fixes, break lines.Jelmer Vernooij2012-09-161-1/+0
| | | | | Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org> Autobuild-Date(master): Sun Sep 16 15:58:04 CEST 2012 on sn-devel-104
* s4-dsdb: Explain better what records are written during schema setAndrew Bartlett2012-08-101-4/+4
| | | | | | This is controlled by setting write_indices_and_attributes. Andrew Bartlett
* s4-pydsdb: Provide control of if we should write index attributes when ↵Andrew Bartlett2012-08-091-4/+4
| | | | | | | | reloading a schema This allows us to carefully control the loading of the schema. Andrew Bartlett
* pydsdb: Add bindings for dsdb_wellknown_dn()Andrew Bartlett2012-07-061-0/+3
|
* s4-pydsdb: Add bindings for dsdb_find_nc_root()Andrew Bartlett2012-07-061-0/+3
|
* samba-tool: Fix indentationAmitay Isaacs2012-07-031-2/+2
| | | | Thanks to Denis Bonnenfant <denis.bonnenfant@diderot.org> for patch.
* samdb: Accept a list of member variables rather than a comma-separated string.Jelmer Vernooij2012-06-211-4/+3
|
* LDB/s4 - do not use the "(dn=...)" syntax on filters anymoreMatthias Dieter Wallnöfer2012-03-261-3/+3
| | | | | | | Make it AD-compatible using "(distinguishedName=...)". Reviewed-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s4-python: Remove env from non-executable samba scripts.Andreas Schneider2012-03-131-2/+0
|
* samba.samdb: Fix formatting of arguments in docstring.Jelmer Vernooij2012-03-101-4/+4
|
* Partially revert 1f0298dd1b1a939cb215e7b474178b217f8347f4Jelmer Vernooij2012-02-251-7/+7
| | | | | | | It's fine to catch keyboard interrupts and other kinds of errors when it's done just for resource management, where the error is reraised later. Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Feb 25 17:29:34 CET 2012 on sn-devel-104
* pydsdb: provide a am_pdc hook like am_rodc to python scriptsAndrew Bartlett2011-12-071-0/+4
|
* s4-python: factorize the definition of get_dsServiceNameMatthieu Patou2011-12-051-0/+10
|
* s4-samdb: seqence_number() operation must be in a transactionAmitay Isaacs2011-11-291-0/+14
|
* samba-tool: Don't set UF_PASSWD_NOTREQD flag on "user disable"Giampaolo Lauria2011-11-151-1/+1
| | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User: Amitay Isaacs <amitay@samba.org> Autobuild-Date: Tue Nov 15 02:51:16 CET 2011 on sn-devel-104
* samba-tool: Added new "user disable" commandGiampaolo Lauria2011-11-101-0/+10
|
* samba-tool: Improve "delegation" command error handlingGiampaolo Lauria2011-11-031-4/+6
| | | | | | | | Change samdb toggle_userAccountFlags fcn to display more meaningful error messages Add flags string param to toggle_userAccountFlags Change call to toggle_userAccountFlags in delegation command to pass the flag name to be displayed in case of errors
* s4-samdb: added a few function comments for pydocAndrew Tridgell2011-09-051-0/+3
| | | | Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* 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-samdb: added deleteuser() to samdbAndrew Tridgell2011-08-181-0/+23
| | | | This is similar to deletegroup()
* 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-091-7/+2
| | | | this will be needed in quite a few places
* 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: use ldb.binary_encode() on search expression elementsAndrew Tridgell2011-07-291-4/+6
| | | | | | | | 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>
* pydsdb: added get_backlink_from_lDAPDisplayName()Andrew Tridgell2011-07-131-0/+5
| | | | | Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
* dsdb: added get_lDAPDisplayName_by_attidAndrew Tridgell2011-07-111-0/+4
| | | | | | | this allows conversion from a DRS attribute ID to a LDAP display name Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com> Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s4-python: Add functions to get linkid and systemflags of an attributeMatthieu Patou2011-07-111-0/+8
| | | | Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s4:python/samba/samdb: add toggle_userAccountFlags() helper functionStefan Metzmacher2011-06-241-10/+35
| | | | | | | | And let enable_account() use it. Pair-Programmed-With: Björn Baumbach <bb@sernet.de> metze
* pydsdb: added get_syntax_oid_from_lDAPDisplayName()Andrew Tridgell2011-06-221-0/+5
| | | | | | this gives you access to the syntax oid of an attribute Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s4-pysamdb: fixed the normalisation of grouptype in group addAndrew Tridgell2011-06-171-1/+7
| | | | | | | ldap integers are signed Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Fri Jun 17 05:43:18 CEST 2011 on sn-devel-104
* s4-pydsdb: added dsdb_normalise_attributes() callAndrew Tridgell2011-06-171-0/+5
| | | | | | this call converts a set of attributes to DRSUAPI format and back to ldb format. This has the effect of normalising the attributes using the schema syntax rules
* s4-param Remove 'sam database' parameterAndrew Bartlett2011-06-061-1/+1
| | | | | | This now just relies on the private dir parameter, which remains. Andrew Bartlett
* samba-tool: improved error handling in user setexpiryAndrew Tridgell2011-06-011-0/+4
|
* samba-tool: improved user enable error handlingAndrew Tridgell2011-06-011-0/+2
|
* s4:password_hash LDB module - allow empty ("") passwordsMatthias Dieter Wallnöfer2010-12-021-0/+30
| | | | | | | | This seems to have been broken some time ago - till someone on the mailing list noticed it. I've also added a testsuite (and some additional SamDB python helpers) which should prove this.
* s4-samdb: give a better exception if multiple users match in password changeAndrew Tridgell2010-11-291-1/+2
|
* s4-samba-tool: fixed exception handling in subcommandsAndrew Tridgell2010-11-291-5/+5
| | | | | | | this switches to the new pattern of: except Exception, e: raise CommandError("some error message", e)
* s4-python: Some reformatting for the purpose of pydoctor.Jelmer Vernooij2010-11-281-13/+18
|
* s4-python: Fix formatting of docstrings for the purpose of pydoctor.Jelmer Vernooij2010-11-281-52/+57
|
* s4-tests: Modified create_ou to only accept security.descriptor type for sd ↵Nadezhda Ivanova2010-11-251-9/+3
| | | | | | | | | to avoid confusion It used to work with sddl as well, but this is confusing and could lead to errors. It also caused a message about tallocing a security descriptor to appear. Autobuild-User: Nadezhda Ivanova <nivanova@samba.org> Autobuild-Date: Thu Nov 25 19:46:42 CET 2010 on sn-devel-104
* s4-dsdb: Switched to using a dictionary in create_ou for consistency.Nadezhda Ivanova2010-11-251-4/+2
| | | | | Autobuild-User: Nadezhda Ivanova <nivanova@samba.org> Autobuild-Date: Thu Nov 25 14:12:52 CET 2010 on sn-devel-104
* s4-dsdb: Fixed wrong assignment of name attribute to description atribute in ↵Nadezhda Ivanova2010-11-251-1/+1
| | | | create_ou.
* s4-dsdb: Extended samdb.newgroup to set the group's security descriptor.Nadezhda Ivanova2010-11-241-1/+5
|
* s4-dsdb: Changed filter to find the account of a user by samAccountNameNadezhda Ivanova2010-11-231-2/+1
| | | | | | In newuser, a filter by dn was given to setpassword to find the account whose password is to be reset. It appears however that if given filter of type (dn=CN=smth) Windows fails to return the entry, and the tests that use newuser fail against it. Changed to use samAccountName instead.
* s4-dsdb: Extended samdb.newuser to accept security descriptor for the object ↵Nadezhda Ivanova2010-11-231-3/+9
| | | | | | | | | | and optionally skip password reset Sometimes for testing purposes we create users without any permissions on their objects and password reset cannot be performed at that point, and is not necessary. For this purpose we can now optionally skip this step. The default is still to reset the user password. Also, a security.descriptor object can be specified during the user creation to override using the default one. defaultSecurityDescriptor is still used by default.
* s4-dsdb: Added a python method to SamDB for creating organizationalUnitsNadezhda Ivanova2010-11-231-1/+29
|
* s4-dsdb: Added python helpers for getting and seting dSHeuristics to SamDBNadezhda Ivanova2010-11-231-0/+24
|