summaryrefslogtreecommitdiff
path: root/source4/scripting/python/samba/samdb.py
AgeCommit message (Collapse)AuthorFilesLines
2009-08-17s4: Major rework of the LDB/SAMDB/IDMAP python bindingsMatthias Dieter Wallnöfer1-30/+21
- Centralise the lookups for the default domain (root) in the call "domain_dn" - Reduce the LDB connections attempts ("connect" calls) from three to one - tools should load faster - Make the LDB connection init more like the "ldb_wrap_connection" call - Load the right UTF8 casefolder which fixes up problems with special characters (discovered by me: e.g. small "Umlaute" (ä, ö, ü, ...) in the DN weren't upcased - so records "seemed" lost in TDB)
2009-08-17Revert "s4:samdb python bindings - we don't need the attributes here"Matthias Dieter Wallnöfer1-1/+2
This reverts commit 53ef426e6f68728763436bd0cd3dd91180c00579. As abartlet pointed out this causes to load all attributes and therefore gives us more here than we need (only the check for the DN)!
2009-08-17s4:provision Move helper functions back to provisionAndrew Bartlett1-21/+0
(These will be added back in a future commit)
2009-08-17s4:python Push some helper functions from SamDB into samba.LdbAndrew Bartlett1-31/+0
This makes it possible to do a bit more of the provision with Samba helpers, but without some of the otherwise useful things (such as loading in the global schema) that SamDB does. Rewrite provision_erase to use a recursive search, rather than a looping subtree search. This is much more efficient, particularly now we have one-level indexes enabled. Delete the @INDEX and similar records *after* deleting all other visible records, this hopefully also assists performance. Andrew Bartlett
2009-08-17s4:schema Provide a way to reference a loaded schema between ldbsAndrew Bartlett1-2/+5
This allows us to load the schema against one ldb context, but apply it to another. This will be useful in the provision script, as we need the schema before we start the LDAP server backend. Adnrew Bartlett
2009-08-14s4:samdb python bindings - we don't need the attributes hereMatthias Dieter Wallnöfer1-2/+1
2009-08-06s4: Simplify two lines in the "samdb.py" file (cosmetic)Matthias Dieter Wallnöfer1-2/+1
2009-07-16Add a way to set an opaque integer onto a samdbAndrew Bartlett1-0/+8
This will allow us to set some more flags into ldb during the provision.
2009-06-18s4: Add tests and 'must change password' flags in setpassword and newuserAndrew Bartlett1-10/+21
In particular, ensure that we can acutally change the password under these circumstances. Andrew Bartlett
2009-06-18s4:setup Add an option to 'setpassword' to force password change at next loginAndrew Bartlett1-2/+12
2009-05-27Modified SamDB to accept options like Ldb.Nadezhda Ivanova1-2/+2
2009-03-20Merge branch 'master' of ssh://git.samba.org/data/git/samba into wspp-schemaAndrew Bartlett1-13/+14
2009-03-12use a base64 encoded password when changing passwordsAndrew Tridgell1-2/+3
This avoids problems with embedded control characters in password changes
2009-03-12fixed more embedded spaces in LDIFAndrew Tridgell1-3/+3
This one added 3 spaces to the end of any new passwords
2009-03-12removed leading spaces from embedded ldifAndrew Tridgell1-10/+10
This fixes the problem with the setpassword command failing like this: Error: First line of ldif must be a dn not ' dn'
2009-03-05Remove ad2oLschema, insted call it directly from provision-backendAndrew Bartlett1-1/+4
This removes a level of indirection via external binaries in the provision-backend code, and also makes better use of our internal code for loading schema from an LDIF file. Remaining to do: Sort the output again, as the load from LDIF is unsorted (also needed because the normal LDB load from sorted input is too slow anyway, and is only needed here). Andrew Bartlett
2009-02-24expand tabs in python file, consistent with the rest of the file.Jelmer Vernooij1-5/+5
2009-02-11Move some samdb-specific code out of provision.Jelmer Vernooij1-0/+8
2009-02-11Cancel transactions when exceptions are raised.Jelmer Vernooij1-83/+92
2008-12-21py: Fix initialisation of subtypes, fix segfaults.Jelmer Vernooij1-7/+7
2008-08-30Add a setexpiry operation in samdb.pyAndrew Tridgell1-0/+33
This makes it easy to set the expiry (or no expiry) for a samdb user (This used to be commit 25171f18a4b242b5a731f4ac1eefc51cc82efd74)
2008-08-01Move domain DN determination out of newuser function.Jelmer Vernooij1-6/+9
(This used to be commit cbac27e6faa99ebaa3e6d653017c968db836560a)
2008-07-12rename sambaPassword -> userPassword.Andrew Bartlett1-3/+3
This attribute is used in a very similar way (virtual attribute updating the password) in AD on Win2003, so eliminate the difference. This should not cause a problem for on-disk passwords, as by default we do not store the plaintext at all. Andrew Bartlett (This used to be commit 1cf0d751493b709ef6b2234ec8847a7499f48ab3)
2008-05-23Use restructuredText formatting for docstrings.Jelmer Vernooij1-0/+2
(This used to be commit 0cc58decd74d20f3d7dff93ddef1c8bce4d49ad0)
2008-04-14Fix newuser and setpassword scripts, and port to idmap.Andrew Bartlett1-1/+27
The new idmap world does not use the unixUser any more, so we need to set up the entry (if wanted) in the idmap database. Users without a backing unix user will get an allocated uid by idmap later. Andrew Bartlett (This used to be commit 8bd8bc1475ddf22d4702dcd17028a9043a5e629f)
2008-04-02provision: Set up id mappings in the idmap db, only map Administrator.Kai Blin1-19/+0
(This used to be commit 206b7d387c6d17e5cc40fd45b489abac9235a7a4)
2008-03-28Make the setup/newuser and setup/setpassword scripts actually work...Andrew Bartlett1-16/+42
These need a testsuite, but this will come soon. Andrew Bartlett (This used to be commit fbcaa622bd1929399e32326349e96b6676a49b96)
2008-02-13Fix invalid symbol.Jelmer Vernooij1-3/+5
(This used to be commit bd0ef811c4e6419ba05076fbc151827cea5d1ca1)
2008-01-25python: Fix representation of UUIDs as strings in zone files rather than ↵Jelmer Vernooij1-1/+1
binary blobs, fix escaping of LDAP URL's in PHP LDAP admin configuration. Pair-programmed with Andrew, but git doesn't appear to support multiple --author arguments. :-( (This used to be commit dff54ff043563f93b86361039c46e662045f62cc)
2008-01-25python/provision: Reconcile code partitions-only provisioning and generic ↵Jelmer Vernooij1-3/+3
provisioning, some other minor refactoring of the provisioning. Pair-programmed by Andrew and me using obby :-) (This used to be commit 688adcbb635af87fcfedb869b7f1857a947fd2f9)
2008-01-24python: Add bindings for SamDB.set_invocation_id().Jelmer Vernooij1-0/+7
(This used to be commit c09efa7b778f9cb29032a6abfd914fcaae8df163)
2008-01-11Python: Simplify code in a couple of places. Copy Andrew's changes from ↵Jelmer Vernooij1-2/+2
g53b5166. (This used to be commit f056f624958af79204c972eba3f85e36e93daed7)
2007-12-29r26628: python: Add more documentation, simplify code in Samba3 module.Jelmer Vernooij1-17/+33
(This used to be commit 3c329ee73d9979236313c37e51750ec06b8dd69e)
2007-12-21r26545: Sync output with ejs.Jelmer Vernooij1-1/+0
(This used to be commit 48ceaa964327ed7094275780cc3c0767636bcb18)
2007-12-21r26538: Pass path generation function around rather than base directory.Jelmer Vernooij1-2/+2
(This used to be commit 5f921af41e4dcd6844f6a662d56bd27c4e76ff88)
2007-12-21r26523: Refactor provisioning code.Jelmer Vernooij1-1/+1
(This used to be commit ac1083178f9e521dcd5d3d8b5199abcb00159adf)
2007-12-21r26522: Fix warnings on SamDB connect from Python, simplify the setup code ↵Jelmer Vernooij1-2/+6
for the various LDBs. (This used to be commit 20c686f501b652ec0578a075a124b72ecb5f41b6)
2007-12-21r26520: More Python updates.Jelmer Vernooij1-1/+7
(This used to be commit a8b1fe15ac853082961132ede061fe1556ae29f7)
2007-12-21r26505: Add python bindings for some samdb-related functions, improve ↵Jelmer Vernooij1-0/+5
provisioning in python. (This used to be commit d2402251666738c0372bbbaeaa1d26c06e254033)
2007-12-21r26496: Move some provision functions to a new SamDB class, support setting ↵Jelmer Vernooij1-0/+117
session_info on a ldb context from python. (This used to be commit 75cfb0d609687538048a7d72a499a5205af46a34)