1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-16 20:59:12 +03:00
Commit Graph

55 Commits

Author SHA1 Message Date
57ac0a6042 s4-python: Move load_partition_usn to dsdb module. 2010-04-08 23:20:36 +02:00
dd4ef4e106 s4-python: More cleanups. 2010-04-08 23:20:36 +02:00
4f2d8d6ace s4-python: samdb: Default to using global schema. 2010-04-08 23:20:35 +02:00
2578072541 s4-python: Move set_global_schema to pydsdb. 2010-04-08 12:21:35 +02:00
c76bd65b60 s4-samdb: Allow skipping global schema. 2010-04-07 17:40:00 +02:00
21ab06f8a2 s4-python: Move samdb_ntds_objectGUID to pydsdb. 2010-04-07 17:39:59 +02:00
ccd954f2a7 s4-python: Avoid importing glue directly. 2010-04-04 00:30:34 +02:00
86e2b25186 More formatting fixes, pointed out by pylint. 2010-03-01 16:24:58 +01:00
7373bb79d4 s4:samdb/tools - That should fix now the last failures 2009-09-21 13:53:47 +02:00
c1527612b9 s4:python tools - try to fix some test problems 2009-09-20 23:49:05 +02:00
017092a028 s4:samdb.py - further rework
- I added a comment to the "new user" operation to point out that this works
  only on s4, since we add also ID mapping entries for winbind there
- The "new user" operation adds now the password through the "set password"
  operation which I find better due to the re-use principle
- Remove the word "DC" after "SAMBA 4" in the comment over the "set password"
  operation since this note and operation applies also to s4 in standalone mode
2009-09-19 21:57:41 +02:00
a873ea42ca s4:samdb.py - Unification of the interfaces
- When a user account is requested by a call always the search filter will be
  passed as argument. This helps us to unify the API
- Add/fix some comments; in particular new comments inform the developer which
  requirements exist if he wants to use calls which manipulate the
  "userPassword" attribute (On s4 no problem - but on certain domain levels on
  Windows Server)
2009-09-18 20:27:30 +02:00
aae07390e2 Revert "s4: Let the "setpassword" script finally use the "samdb_set_password" routine"
This reverts commit fdd62e9699.

abartlet and I agreed that this isn't the right way to enforce the password
policies. Sooner or later we've to control them anyway on the directory level.
2009-09-10 00:48:19 +02:00
9c4827e433 s4:setpassword script - Passwords set by this script are set by the administrator not the user 2009-09-08 12:02:22 +02:00
fdd62e9699 s4: Let the "setpassword" script finally use the "samdb_set_password" routine
The "setpassword" script should use the "samdb_set_password" call to change
the NT user password. Windows Server tests show that "userPassword" is not the
right place to save the NT password and does not inherit the password complexity.
2009-09-07 12:29:34 +02:00
7a79d16183 s4: Major rework of the LDB/SAMDB/IDMAP python bindings
- 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-17 11:58:40 +02:00
36f828bafb Revert "s4:samdb python bindings - we don't need the attributes here"
This reverts commit 53ef426e6f.

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-17 11:06:39 +02:00
7a9030b7ce s4:provision Move helper functions back to provision
(These will be added back in a future commit)
2009-08-17 09:50:57 +10:00
14aff84adc s4:python Push some helper functions from SamDB into samba.Ldb
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-17 09:50:57 +10:00
346aa6e093 s4:schema Provide a way to reference a loaded schema between ldbs
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-17 09:50:56 +10:00
53ef426e6f s4:samdb python bindings - we don't need the attributes here 2009-08-14 01:56:34 +02:00
915b789c87 s4: Simplify two lines in the "samdb.py" file (cosmetic) 2009-08-06 12:35:47 +02:00
ba58edd0bc Add a way to set an opaque integer onto a samdb
This will allow us to set some more flags into ldb during the provision.
2009-07-16 09:23:35 +10:00
1e6fb7d730 s4: Add tests and 'must change password' flags in setpassword and newuser
In particular, ensure that we can acutally change the password under
these circumstances.

Andrew Bartlett
2009-06-18 13:49:30 +10:00
2afc6df9b4 s4:setup Add an option to 'setpassword' to force password change at next login 2009-06-18 13:49:30 +10:00
ee4c1ed010 Modified SamDB to accept options like Ldb. 2009-05-27 21:08:35 +10:00
27c6eca04c Merge branch 'master' of ssh://git.samba.org/data/git/samba into wspp-schema 2009-03-20 13:22:08 +11:00
483525f73c use a base64 encoded password when changing passwords
This avoids problems with embedded control characters in password
changes
2009-03-12 15:20:25 +11:00
0770028cbe fixed more embedded spaces in LDIF
This one added 3 spaces to the end of any new passwords
2009-03-12 15:13:23 +11:00
917905aea0 removed leading spaces from embedded ldif
This fixes the problem with the setpassword command failing like this:
   Error: First line of ldif must be a dn not '    dn'
2009-03-12 13:13:14 +11:00
17aac8cad2 Remove ad2oLschema, insted call it directly from provision-backend
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-03-05 16:52:11 +11:00
b9cf189404 expand tabs in python file, consistent with the rest of the file. 2009-02-24 01:02:26 +01:00
ddb4db7c65 Move some samdb-specific code out of provision. 2009-02-11 18:31:52 +01:00
f13895851f Cancel transactions when exceptions are raised. 2009-02-11 17:54:58 +01:00
2e7a6cb6bf py: Fix initialisation of subtypes, fix segfaults. 2008-12-21 03:08:14 +01:00
9817f3d785 Add a setexpiry operation in samdb.py
This makes it easy to set the expiry (or no expiry) for a samdb user
(This used to be commit 25171f18a4)
2008-08-30 07:32:44 +10:00
fff006bd84 Move domain DN determination out of newuser function.
(This used to be commit cbac27e6fa)
2008-08-01 20:47:22 +02:00
44ea6a26fd rename sambaPassword -> userPassword.
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 1cf0d75149)
2008-07-12 15:26:42 +10:00
c401aa9357 Use restructuredText formatting for docstrings.
(This used to be commit 0cc58decd7)
2008-05-23 00:37:22 +02:00
5a37b3fc5d Fix newuser and setpassword scripts, and port to idmap.
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 8bd8bc1475)
2008-04-14 11:51:02 +02:00
8ac91d9132 provision: Set up id mappings in the idmap db, only map Administrator.
(This used to be commit 206b7d387c)
2008-04-02 23:07:53 +02:00
786deaf928 Make the setup/newuser and setup/setpassword scripts actually work...
These need a testsuite, but this will come soon.

Andrew Bartlett
(This used to be commit fbcaa622bd)
2008-03-28 12:08:54 +11:00
b4ce9dc360 Fix invalid symbol.
(This used to be commit bd0ef811c4)
2008-02-13 01:21:06 +01:00
dcb04065cd python: Fix representation of UUIDs as strings in zone files rather than 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 dff54ff043)
2008-01-25 03:54:33 +01:00
37f35d2a03 python/provision: Reconcile code partitions-only provisioning and generic provisioning, some other minor refactoring of the provisioning.
Pair-programmed by Andrew and me using obby :-)
(This used to be commit 688adcbb63)
2008-01-25 01:02:13 +01:00
859b847a68 python: Add bindings for SamDB.set_invocation_id().
(This used to be commit c09efa7b77)
2008-01-24 22:08:39 +01:00
7c3e8c838f Python: Simplify code in a couple of places. Copy Andrew's changes from g53b5166.
(This used to be commit f056f62495)
2008-01-11 16:13:46 +01:00
6817c5d885 r26628: python: Add more documentation, simplify code in Samba3 module.
(This used to be commit 3c329ee73d)
2007-12-29 12:21:04 -06:00
109a903750 r26545: Sync output with ejs.
(This used to be commit 48ceaa9643)
2007-12-21 06:28:46 +01:00
c2fffa8335 r26538: Pass path generation function around rather than base directory.
(This used to be commit 5f921af41e)
2007-12-21 05:51:59 +01:00