summaryrefslogtreecommitdiff
path: root/source4/scripting/python/samba/samdb.py
AgeCommit message (Collapse)AuthorFilesLines
2013-03-02Move python modules from source4/scripting/python/ to python/.Jelmer Vernooij1-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
2013-02-04s4:scripting/python: add support for utf-8 passwords from the command lineStefan Metzmacher1-1/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2012-10-18Set RFC2307 attributes in samba-tool createAlexander Wuerstlein1-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>
2012-09-16s4-python: Formatting fixes, break lines.Jelmer Vernooij1-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
2012-08-10s4-dsdb: Explain better what records are written during schema setAndrew Bartlett1-4/+4
This is controlled by setting write_indices_and_attributes. Andrew Bartlett
2012-08-09s4-pydsdb: Provide control of if we should write index attributes when ↵Andrew Bartlett1-4/+4
reloading a schema This allows us to carefully control the loading of the schema. Andrew Bartlett
2012-07-06pydsdb: Add bindings for dsdb_wellknown_dn()Andrew Bartlett1-0/+3
2012-07-06s4-pydsdb: Add bindings for dsdb_find_nc_root()Andrew Bartlett1-0/+3
2012-07-03samba-tool: Fix indentationAmitay Isaacs1-2/+2
Thanks to Denis Bonnenfant <denis.bonnenfant@diderot.org> for patch.
2012-06-21samdb: Accept a list of member variables rather than a comma-separated string.Jelmer Vernooij1-4/+3
2012-03-26LDB/s4 - do not use the "(dn=...)" syntax on filters anymoreMatthias Dieter Wallnöfer1-3/+3
Make it AD-compatible using "(distinguishedName=...)". Reviewed-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-03-13s4-python: Remove env from non-executable samba scripts.Andreas Schneider1-2/+0
2012-03-10samba.samdb: Fix formatting of arguments in docstring.Jelmer Vernooij1-4/+4
2012-02-25Partially revert 1f0298dd1b1a939cb215e7b474178b217f8347f4Jelmer Vernooij1-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
2011-12-07pydsdb: provide a am_pdc hook like am_rodc to python scriptsAndrew Bartlett1-0/+4
2011-12-05s4-python: factorize the definition of get_dsServiceNameMatthieu Patou1-0/+10
2011-11-29s4-samdb: seqence_number() operation must be in a transactionAmitay Isaacs1-0/+14
2011-11-15samba-tool: Don't set UF_PASSWD_NOTREQD flag on "user disable"Giampaolo Lauria1-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
2011-11-10samba-tool: Added new "user disable" commandGiampaolo Lauria1-0/+10
2011-11-03samba-tool: Improve "delegation" command error handlingGiampaolo Lauria1-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
2011-09-05s4-samdb: added a few function comments for pydocAndrew Tridgell1-0/+3
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-25s4-samdb: added host_dns_name(), domain_dns_name() and forest_dns_name()Andrew Tridgell1-0/+15
these will make it easier to get python code right for multi-domain support
2011-08-18s4-samdb: added deleteuser() to samdbAndrew Tridgell1-0/+23
This is similar to deletegroup()
2011-08-09s4-samdb: support relative paths in SamDB() connectAndrew Tridgell1-1/+2
don't add the private path unless the database doesn't exist with the supplied path
2011-08-09pysamdb: move normalise_int32() to common moduleAndrew Tridgell1-7/+2
this will be needed in quite a few places
2011-08-04s4-samdb: save the url in the samdb classAndrew Tridgell1-0/+3
this is useful for debugging, so we know which database we are dealing with Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-29samba-tool: use ldb.binary_encode() on search expression elementsAndrew Tridgell1-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>
2011-07-13pydsdb: added get_backlink_from_lDAPDisplayName()Andrew Tridgell1-0/+5
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-11dsdb: added get_lDAPDisplayName_by_attidAndrew Tridgell1-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>
2011-07-11s4-python: Add functions to get linkid and systemflags of an attributeMatthieu Patou1-0/+8
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-06-24s4:python/samba/samdb: add toggle_userAccountFlags() helper functionStefan Metzmacher1-10/+35
And let enable_account() use it. Pair-Programmed-With: Björn Baumbach <bb@sernet.de> metze
2011-06-22pydsdb: added get_syntax_oid_from_lDAPDisplayName()Andrew Tridgell1-0/+5
this gives you access to the syntax oid of an attribute Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-06-17s4-pysamdb: fixed the normalisation of grouptype in group addAndrew Tridgell1-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
2011-06-17s4-pydsdb: added dsdb_normalise_attributes() callAndrew Tridgell1-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
2011-06-06s4-param Remove 'sam database' parameterAndrew Bartlett1-1/+1
This now just relies on the private dir parameter, which remains. Andrew Bartlett
2011-06-01samba-tool: improved error handling in user setexpiryAndrew Tridgell1-0/+4
2011-06-01samba-tool: improved user enable error handlingAndrew Tridgell1-0/+2
2010-12-02s4:password_hash LDB module - allow empty ("") passwordsMatthias Dieter Wallnöfer1-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.
2010-11-29s4-samdb: give a better exception if multiple users match in password changeAndrew Tridgell1-1/+2
2010-11-29s4-samba-tool: fixed exception handling in subcommandsAndrew Tridgell1-5/+5
this switches to the new pattern of: except Exception, e: raise CommandError("some error message", e)
2010-11-28s4-python: Some reformatting for the purpose of pydoctor.Jelmer Vernooij1-13/+18
2010-11-28s4-python: Fix formatting of docstrings for the purpose of pydoctor.Jelmer Vernooij1-52/+57
2010-11-25s4-tests: Modified create_ou to only accept security.descriptor type for sd ↵Nadezhda Ivanova1-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
2010-11-25s4-dsdb: Switched to using a dictionary in create_ou for consistency.Nadezhda Ivanova1-4/+2
Autobuild-User: Nadezhda Ivanova <nivanova@samba.org> Autobuild-Date: Thu Nov 25 14:12:52 CET 2010 on sn-devel-104
2010-11-25s4-dsdb: Fixed wrong assignment of name attribute to description atribute in ↵Nadezhda Ivanova1-1/+1
create_ou.
2010-11-24s4-dsdb: Extended samdb.newgroup to set the group's security descriptor.Nadezhda Ivanova1-1/+5
2010-11-23s4-dsdb: Changed filter to find the account of a user by samAccountNameNadezhda Ivanova1-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.
2010-11-23s4-dsdb: Extended samdb.newuser to accept security descriptor for the object ↵Nadezhda Ivanova1-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.
2010-11-23s4-dsdb: Added a python method to SamDB for creating organizationalUnitsNadezhda Ivanova1-1/+29
2010-11-23s4-dsdb: Added python helpers for getting and seting dSHeuristics to SamDBNadezhda Ivanova1-0/+24