1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-04 05:18:06 +03:00
Commit Graph

337 Commits

Author SHA1 Message Date
Andrew Bartlett
1a97bd915d s4:provision Ensure that @OPTIONS is mirrored into each partition
The previous patches to the provision system cut down on the number of
reconnects, and disabled the partition handling for part of the
process.  This means we lost the setting of @OPTIONS as a replicated
attribute into the partitions.

Andrew Bartlett
2009-08-26 17:37:01 +10:00
Andrew Bartlett
a1da91174b s4:provison Add prefixes to ldb using same code a later modify will use
This allows us to test out the code that will do the modify of the
prefixMap, and to provide the bindings that may assist a future
upgrade script.

Andrew Bartlett
2009-08-26 13:49:10 +10:00
Andrew Bartlett
b9ec6bb1eb s4:provision Only create references to our server DN after the self join
This will ensure that the GUID can be filled in correctly, and assist
us to validate DN targets in the future.

Andrew Bartlett
2009-08-26 13:48:35 +10:00
Andrew Tridgell
87921bf694 sigh - still not right 2009-08-17 17:50:26 +10:00
Andrew Tridgell
52108a19a4 fixed up add_foreign again
my last patch was not even close ...

I'll leave abartlet to work out how to fix the test case
2009-08-17 17:48:27 +10:00
Andrew Tridgell
905db32885 more fixups from provision changes
Andrew, can you please check this? The idmap.setup_name_mapping tests
look totally out of place here. I'm also not sure I captured your
intention with the other changes
2009-08-17 17:35:36 +10:00
Andrew Bartlett
e349316550 s4:provision Add comments to the provision script
Hopefully this will explain a bit more whey things are done the way
that they are done.

Andrew Bartlett
2009-08-17 11:47:14 +10:00
Andrew Bartlett
5f917d5f17 s4:provision Avoid one more call to ltdb_reindex
The Samba4 schema code (called via
samdb.set_schema_from_ldb(schema.ldb)) manages the @ATTRIBUTES and
@INDEXLIST records, so don't wipe them early.  The chances are that we
will not change them anyway.

Andrew Bartlett
2009-08-17 11:47:14 +10:00
Andrew Bartlett
df3ef12cf8 s4:provision Fix existing ldapi:// backend detection exception
Found by Oliver Liebel <oliver@itc.li>

Andrew Bartlett
2009-08-17 09:52:09 +10:00
Andrew Bartlett
2af06385ed s4:provision Make sure that we don't use Kerberos to our LDAP backend
This makes no sense, and just causes trouble - we are aiming for
DIGEST-MD5 or NTLM.

Andrew Bartlett
2009-08-17 09:51:01 +10:00
Andrew Bartlett
84ee0af244 s4:provison Print the LDAP backend admin username/password 2009-08-17 09:51:00 +10:00
Andrew Bartlett
e7bae2eb0a s4: Re-add --ldapadminpass as an option to provision
This should make setting up LDAP servers more predictable.

When not specified, it is random

Andrew Bartlett
2009-08-17 09:51:00 +10:00
Andrew Bartlett
410114e41c s4:provision Keep a single transaction for the erase and rebuild
Using a single transaction to both erase the bulk of the data and the
rebuild of that data means that the in-memory index list is
maintained, and not written out to disk until it is all compleated.
All the writes then occour at the end.

Andrew Bartlett
2009-08-17 09:50:59 +10:00
Andrew Bartlett
f87811f6b3 s4:provision Rework provision-backend into provision
This removes a *lot* of duplicated code and the cause of much
administrator frustration.  We now handle starting and stopping the
slapd (at least for the provision), and ensure that there is only one
'right' way to configure the OpenLDAP and Fedora DS backend

We now run OpenLDAP in 'cn=config' mode for online configuration.

To test what was the provision-backend code, a new --ldap-dryrun-mode
option has been added to provision.  It quits the provision just
before it would start the LDAP binaries

Andrew Bartlett
2009-08-17 09:50:58 +10:00
Andrew Bartlett
7bc566a882 s4:provision Allow provision-backend to not run slapd for 'make test'
As the version of OpenLDAP required for Samba4 is fairly new, we don't
want to make it a requirement before this python code is run in 'make
test'.

As such, skip over the actual starting of slapd, but check the rest
runs alright (which still validates syntax and other modules).

Andrew Bartlett
2009-08-12 11:09:50 +10:00
Andrew Bartlett
6dc41bf27c s4:provision Make the --ol-slapd paramter take the full path to slapd 2009-08-12 10:01:48 +10:00
Oliver Liebel
28bcdf5266 s4:provision Rework and further automate setup of OpenLDAP backend
heres the summary of all changes/extensions:

- Andrew Bartlett's patch to generate indext
- Howard Chu's idea to use nosync on the DB included, but made optional

- slaptest-path is not needed any more (slapd -Ttest is used instead)
and is therefore removed. slapd-path is now recommended when
openldap-backend is chosen.
its also used for olc-conversion

- slapd-detection is now always done by ldapsearch (ldb module),
looking anonymous for objectClass: OpenLDAProotDSE via our ldapi_uri.

- if ldapsearch was not successfull, (no slapd listening on our socket)
slapd is
started via special generated slapdcommand_prov  (ldapi_uri only)

- slapd-"provision-process" startup is done via pythons subprocess.

- the slapd-provision-pid is stored under paths.ldapdir/slapd_provision_pid.

- after provision-backend is finished:
--- slapd.pid is compared with our stored slapd_provision_pid.
if the are unique, slapd.pid will be read out, and the
slapd "provison"-process will be shut down.
--- proper slapd-shutdown is verified again with ldb-search -> ldapi_uri
-> rootDSE.
--- if the pids are different or one of the pid-files is missing, slapd
will not be shut down,
instead an error message is displayed to locate slapd manually
--- extended help-messages (relevant to slapd) are always displayed,
e.g. the commandline with which slapd has to be started when everythings
finished
(slapd-commandline is stored under paths.ldapdir/slapd_command_file.txt))

- upgraded the content of the mini-howto (howto-ol-backend-s4.txt)
2009-08-12 10:01:48 +10:00
Jelmer Vernooij
478446f96d Remove unnecessary imports. 2009-07-19 18:51:15 +02:00
Andrew Bartlett
271b5af92e s4:dsdb Handle dc/domain/forest functional levels properly
Rather than have the functional levels scattered in 4 different,
unconnected locations, the provision script now sets it, and the
rootdse module maintains it's copy only as a cached view onto the
original values.

We also use the functional level to determine if we should store AES
Kerberos keys.

Andrew Bartlett
2009-07-16 09:23:35 +10:00
Andrew Bartlett
354ba5e2e3 s4:schema Update Windows 2008 schema from Microsoft to latest version 2009-04-03 08:18:14 +11:00
Andrew Tridgell
631e688c82 Merge branch 'master' into wspp-schema 2009-03-31 11:58:37 +11:00
Matthias Dieter Wallnoefer
62ab39dde3 s4/provision: Use existing serverrole variable.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-03-21 03:07:00 +01:00
Andrew Bartlett
5ffe7de348 s4:provision load_schema in provision.py no longer takes a hostname
This was missed in the earlier work to use this in provision-backend

Andrew Bartlett
2009-03-11 12:16:27 +11:00
Andrew Bartlett
4c32d8f1a7 Load the schema for provision-backend in a transaction
Loading data in a transaction is faster than without.

Andrew Bartlett
2009-03-06 12:14:08 +11:00
Andrew Bartlett
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
Andrew Bartlett
41760c18bd Merge branch 'master' of ssh://git.samba.org/data/git/samba into wspp-schema 2009-03-05 12:24:35 +11:00
Andrew Bartlett
952bdffaad Don't print the admin password if we don't set one.
For example, if we don't create the admin user (perhaps expecting
users to be in LDAP already, or we are due an incoming replication) we
should not confuse the administrator by printing a unused password.

Andrew Bartlett
2009-03-04 14:02:35 +11:00
Jelmer Vernooij
258ae4cec5 Merge branch 'master' of ssh://git.samba.org/data/git/samba
Conflicts:
	source4/scripting/python/samba/provision.py
2009-02-25 12:49:37 +01:00
Andrew Bartlett
8249383efb Add the new, updated AD schema file from Microsoft
Also remove the copy of the licence text from licence.txt, to ensure
we don't get variations between the copies.

Andrew Bartlett
2009-02-25 10:40:42 +11:00
Andrew Bartlett
8be9941354 Don't parse the schema data twice 2009-02-25 10:40:42 +11:00
Sreepathi Pai
f83e754ae6 Create schema.ldif at runtime directly from ad-schema files
Here's a first attempt at moving the minschema_wspp code into a
library as Andrew requested. Since this script no longer has to
generate CN=aggregate, I've simplified it quite a bit to a level where
it almost does a line-by-line translation. This is faster and simpler,
but it may not catch as many errors in the ad-schema files as the
previous versions did.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-02-25 10:40:41 +11:00
Oliver Liebel
503d15e8df Updates to the recent cn=config support for the OpenLDAP backend
- removed workaround for olcSyncprovConfig - creation (works perfect now
with 2.4.15, release was today)
- added 1 message-helpline, which is displayed when running
provision-backend with olc and/or mmr setup
- corrected 1 wrong slapcommand-helpline
- slapd.conf is removed now in case of olc-setup
- added 1 copyright-line to provision.py and provision-backend

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-02-25 10:39:35 +11:00
Oliver Liebel
31f2cddcf5 Added mmr and olc to the OpenLDAP backend provisioning-scripts
These extensions add mmr (multi-master-replication) and olc
(openldap-online-configuration) capabilities to the
provisioning-scripts (provision-backend and provision.py), for use
with the openldap-backend (only versions >=2.4.15!).

Changes / additions made to the provision-backend  -script:
added new command-line-options:
--ol-mmr-urls=<list of whitespace separated ldap-urls> for use with mmr
(can be combined with --ol-olc=yes),
--ol-olc=[yes/no] (activate automatic conversion from static slapd.conf
to olc),
--ol-slaptest=<path to slaptest binary> (needed in conjunction with
--ol-olc=yes)

Changes / additions made to the provision.py -script: added
extensions, that will automatically generate the chosen mmr and/or olc
setup for the openldap backend, according to the to chosen parameters
set in the provision-backend script

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-02-24 21:34:44 +11:00
Jelmer Vernooij
dcb2e7d577 expand tabs in python file, consistent with the rest of the file. 2009-02-24 01:00:09 +01:00
Jelmer Vernooij
10c047c6f4 Fix finding of setup data. 2009-02-24 00:58:29 +01:00
Andrew Bartlett
6b8b7665bd paper over failure to reprovision with os.unlink()
We need to figure out why the deletes on the database fail, but for
now doing an unlink of templates_tdb isn't too bad.

Andrew Bartlett
2009-02-18 17:44:07 +11:00
Jelmer Vernooij
be9a4157f0 Catch specific exceptions, rather than catching everything, which might hide other exceptions silently. 2009-02-11 19:04:33 +01:00
Jelmer Vernooij
53b59aa2cf Use convenience function for finding setup_dir based on location of
python module.
2009-02-11 18:44:57 +01:00
Jelmer Vernooij
ddb4db7c65 Move some samdb-specific code out of provision. 2009-02-11 18:31:52 +01:00
Jelmer Vernooij
b876478219 Make sure server_role gets initialized in backend provisioning code -
fixes test.
2009-01-19 21:14:37 +01:00
Andrew Bartlett
9fa6fb3d9f Print more useful suggestion for the main provision command line 2009-01-19 12:39:57 +11:00
Jelmer Vernooij
673ca5145c Find default smb.conf path correctly, when it was not specified on the
command-line.
2009-01-16 15:05:15 +01:00
Andrew Bartlett
447f266887 Only do special DN tracking for normal DNs in OpenLDAP backend.
This means trying (again, harder), not to do this for DN+Binary and
DN+String attributes.

Andrew Bartlett
2009-01-09 12:08:11 +11:00
Matthias Dieter Wallnöfer
05f97d3235 Fix typo 2009-01-06 16:23:29 +01:00
Andrew Bartlett
d22adc14a9 More work to have OpenLDAP accept the full AD schema
We need to avoid handling DN+Binary and DN+String with the refint
module for now, as this is a currently unsupported syntax.

Also rename entryTTL to avoid a conflict with the operational
attribute of the same name.

Andrew Bartlett
2009-01-05 12:38:47 +11:00
Jelmer Vernooij
2227860a79 Fix more tests, improve repr() functions for various Python types. 2008-12-21 23:05:35 +01:00
Jelmer Vernooij
7e651c7ef3 Simplify customization of pidl-generated Python modules. 2008-12-21 21:10:40 +01:00
Jelmer Vernooij
a32194033a Move tests for ParamFile. 2008-12-21 16:39:17 +01:00
Jelmer Vernooij
eeb25cf548 Fix more introduced regressions in new bindings. 2008-12-21 04:36:16 +01:00
Jelmer Vernooij
2e7a6cb6bf py: Fix initialisation of subtypes, fix segfaults. 2008-12-21 03:08:14 +01:00
Jelmer Vernooij
0d585a67ed Support subtypes of ldb.Ldb. 2008-12-20 23:00:23 +01:00
Andrew Bartlett
f52fc2f90e Move aggregate schema stub to it's own file
This should make it easier to import just the schema entries from the
WSPP docs.

Andrew Bartlett
2008-12-19 09:51:42 +11:00
Jelmer Vernooij
61a2d5c878 Use plain Python C API for registry module, rather than SWIG. 2008-12-18 16:49:33 +00:00
Andrew Bartlett
7a5b6a2ea1 Handle different failure modes when we wipe the db in provision
We didn't handle the mode where we can't load the main sam.ldb due to
the modules being 'wrong', and when we did remove the file, we didn't
wipe the partitions.
2008-12-18 17:17:56 +11:00
Andrew Bartlett
ebe1e923c8 s4:provision: use extended_dn_out_ldb or extended_dn_out_dereference depending on the backend
This just changes the existing stratagy of loading different modules
for the OpenLDAP backend to also include extended_dn_out_*

When we provision the OpenLDAP backend, we make sure to include the
'deref' overlay (which must be made available by the OpenLDAP build)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:28 +11:00
Andrew Bartlett
1f28541a24 s4:dsdb: split extended_dn into extended_dn_in, extended_dn_out and extended_dn_store.
By splitting the module, the extended_dn_in and extended_dn_store
moudles can use extended_dn_out to actually get the extended DN.  This
avoids code duplication.

The extended_dn_out module also contains a client implementation of
the OpenLDAP dereference control (draft-masarati-ldap-deref-00).

This also introduces a new control
'DSDB_CONTROL_DN_STORAGE_FORMAT_OID' to ask the extended_dn_out module
to return whatever the 'storage format' is.  This allows us to work
with both OpenLDAP (which performs a dereference at run time) and LDB
(which stores the GUID and SID on disk).

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:28 +11:00
Jelmer Vernooij
e549759efe Fix blackbox tests on IPv6-only hosts. 2008-10-20 10:18:02 +02:00
Andrew Bartlett
fc54ca014b Move the password_hash module up the module stack.
This makes it operate in all partitions (minor), but more importantly
places it above some other modules that implement some extra schema
checks.  (The linked_attributes module objects to unknown attributes,
which inclues clearTextPassword, which we need internally but is not
in the schema).

Andrew Bartlett
2008-10-16 12:31:19 +11:00
Stefan Metzmacher
fae2fce47e s4:provision: don't do the full provision in the become_dc
metze
2008-09-27 02:12:22 +02:00
Andrew Bartlett
ef9169bfa6 Make it clear that the MMR password can differ from the admin passsword
In the future, we might simply randomly generate this, or allow the
admin to specify it seperate to the admin password.  However, both are
highly sensitive, as they imply read access to the krbtgt.

Andrew Bartlett
(This used to be commit 57d19ad002)
2008-09-08 15:09:06 +10:00
Oliver Liebel
b76f383eef Use DIGEST-MD5 authentication for OpenLDAP replication
This avoids passing rootdn passwords or replicated data in cleartext
across the network.

Signed-of-by: Andrew Bartlett <abartlet@samba.org>
(This used to be commit 67373c143a)
2008-09-08 14:39:54 +10:00
Andrew Bartlett
8237c0ba83 The index handling is now configured from the schema load, not by a
template.

Andrew Bartlett
(This used to be commit b36c6a21ad)
2008-08-21 12:59:16 +10:00
Andrew Bartlett
41493cbe68 Update OpenLDAP MMR configuration per comments by Oliver Liebel
<oliver@itc.li>

This changes the RIDs to be <serverID><DBID>, to ease later debugging.

The need to specify the port on the MMR URLs is now included in the
help.

Andrew Bartlett
(This used to be commit a5cbe8c09c)
2008-08-20 12:21:36 +10:00
Andrew Bartlett
b33f4541f6 Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-abartlet
(This used to be commit fc6b4f03eb)
2008-08-19 14:11:51 +10:00
Andrew Bartlett
7ef21658fb Fix up new OpenLDAP MMR code.
This changes the MMR password from hard-coded value of 'linux',
adds tests and fixes the Fedora DS backend.

Currently the MMR password matches the admin password, but we can
change this to be another random value if required.

Also require the port to be specified on the command line, so we don't
hard-code a port of 9000.

Andrew Bartlett
(This used to be commit 08257c6d6c)
2008-08-19 14:10:14 +10:00
Oliver Liebel
805dd85291 Generate Multi-Master Replication configuration for OpenLDAP
This patches provision-backend and the related scripts to generate the
correct configuration blobs for N-way multi-master replication using
OpenLDAP.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
(This used to be commit 6ed0b3f247)
2008-08-19 12:03:04 +10:00
Andrew Bartlett
47d80366be Fix templates.ldb reprovision handling.
This sets the attributes in a seperate transaction, and allows a
forced delete of the whole file.

Andrew Bartlett
(This used to be commit 423db2468b)
2008-08-19 11:43:41 +10:00
Jelmer Vernooij
1c94f3e95d Use new style python classes.
(This used to be commit 2a39aae0ce)
2008-08-01 21:00:09 +02:00
Jelmer Vernooij
3b4ff07ded Actually fix missing substitution variables.
(This used to be commit 783412ecb2)
2008-08-01 20:47:03 +02:00
Jelmer Vernooij
2fbe25b39d Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into manpage
(This used to be commit c87a8ba1fe)
2008-08-01 20:17:56 +02:00
Jelmer Vernooij
3573420d7d Fix some forgotten substitute variables in provision, add check to prevent this sort of regression in the future.
(This used to be commit a461118f3b)
2008-08-01 20:17:29 +02:00
Andrew Bartlett
e80115deb9 We don't use EXTENSIBLEOBJECT any more.
(This used to be commit 4b137085c8)
2008-07-28 20:51:02 +10:00
Andrew Bartlett
08795db6d6 Make it even clearer what to do next in the LDAP backend setup
(This used to be commit bace931ad6)
2008-07-28 20:26:14 +10:00
Andrew Bartlett
45d60f5bd9 Always print the slapd startup command
(This used to be commit b1d05e7d14)
2008-07-28 20:18:17 +10:00
Andrew Bartlett
cff30c6da6 Remove unused function and make sensitive directories private.
(This used to be commit e23333d163)
2008-07-28 08:04:15 +10:00
Andrew Bartlett
1f285560bc Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-local
(This used to be commit b12dd8ee54)
2008-07-25 11:58:51 +10:00
Andrew Bartlett
11798902dc Complain if we are told to use an ldap backend, without the type
(This used to be commit e9c3c9ad82)
2008-07-25 08:45:16 +10:00
Andrew Bartlett
c9c296b6bb Install'named.txt' to private/ as documentation.
This document is much more use when subbed with all the right things.

Andrew Bartlett
(This used to be commit 136a855998)
2008-07-22 11:09:18 +10:00
Matthias Dieter Wallnöfer
fb3e663678 Improve DNS and Group poicy configurations.
- fixes bug #4813 (simplify DNS setup)
  - This reworks the named.conf to be a fully fledged include
  - This also moves the documentation into named.txt
 - improves bug #4900 (Group policy support in Samba)
   - by creating an empty GPT.INI
 - fixes bug #5582 (DNS: Enhanced zone file)
   - This is now closer to the zone file AD creates

committed by Andrew Bartlett
(This used to be commit 74d684f6b3)
2008-07-22 11:06:47 +10:00
Andrew Bartlett
3408a2d18f Make a seperate template for the refint configuration too
(This used to be commit d2a527acc5)
2008-07-18 18:58:56 +10:00
Andrew Bartlett
cfc2063f23 Put the memberof template into a seperate setup/ file.
Set a memberof-dn in a fruitless attempt to fix the ACL problem I'm
having with OpenLDAP

Andrew Bartlett
(This used to be commit 6d6e03834a)
2008-07-18 18:44:07 +10:00
Andrew Bartlett
fe9fa62a05 Reorder whitespace in generated slapd.conf
This helps us see the real groupings in the generated memberOf
handling.

Andrew Bartlett
(This used to be commit ec70ebb831)
2008-07-16 14:04:24 +10:00
Andrew Bartlett
e400b3ec4e Fix asking for credentials for non-LDAP provisions.
(This used to be commit 78416f4840)
2008-07-15 18:44:58 +10:00
Andrew Bartlett
0f1eea2672 Rework provision to handle both simple and SASL binds.
Fedora DS is still setup for simple binds only, at this point.
(it also fails on other issues).

Andrew Bartlett
(This used to be commit b24c572d5a)
2008-07-15 15:46:32 +10:00
Andrew Bartlett
a6b842f963 Connect to the LDAP backend with SASL credentials.
This reworks our LDAP backend code to move from anonymous access to a
shared-secret SASL-protected connection.  (SASL selects NTLM or
DIGEST-MD5 on my system).

To get this working, we must pre-populate the LDAP backend with a DN
to store ths SASL secret on, and we use back-ldif for this.

This gives us a reasonable basis to deploy a replicated OpenLDAP
backend solution.

Andrew Bartlett
(This used to be commit cd0745253c)
2008-07-15 15:15:12 +10:00
Andrew Bartlett
9ea25cacf1 Add a blackbox test for the provision-backend script.
This test (as most tests do :-) found a few bugs, also fixed in this
commit.

Andrew Bartlett
(This used to be commit d96a6482da)
2008-06-19 11:05:20 +10:00
Simo Sorce
370f95acfc Try to get a bit further with provisioning
(This used to be commit 649f6c0c10)
2008-06-16 17:52:50 -04:00
Jelmer Vernooij
2772871146 Fix samdb python test.
(This used to be commit 0e3d488cc1)
2008-05-30 14:15:40 +02:00
Andrew Bartlett
b9babfe4cc Fix up provision and samdb tests.
This fixes up the provision to operate with a target directory - it
must override the smb.conf in this case.

Andrew Bartlett
(This used to be commit 89fc39f7ed)
2008-05-30 14:26:47 +10:00
Andrew Bartlett
b7c8e020a6 Print prefixMap in a human-readable format.
This should allow the prefixMap to be edited, until we find the right
way to autogenerate it.

Andrew Bartlett
(This used to be commit 24ae9a55ec)
2008-05-29 18:38:17 +10:00
Andrew Kroeger
815c0ef2ed provision: Add missing string parameter token when assigning ldap_backend.
(This used to be commit 7d26145a7f)
2008-05-28 22:43:25 -05:00
Jelmer Vernooij
73b789b6d2 Add docstrings to a couple more python modules.
(This used to be commit b4560c90e5)
2008-05-24 04:01:57 +02:00
Jelmer Vernooij
a203ee1ab1 Fix indentation, add docstring in provisioning script.
(This used to be commit 86a8a08549)
2008-05-23 16:43:26 +02:00
Jelmer Vernooij
e3d000f3bf Some more PEP improvements.
(This used to be commit 015ca850df)
2008-05-23 16:29:08 +02:00
Jelmer Vernooij
cceac63aaa Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-wsgi
Conflicts:

	source/scripting/python/samba/provision.py
(This used to be commit d27de63365)
2008-05-23 16:24:07 +02:00
Jelmer Vernooij
c401aa9357 Use restructuredText formatting for docstrings.
(This used to be commit 0cc58decd7)
2008-05-23 00:37:22 +02:00
Andrew Kroeger
bf3f3af926 provision: Generate krb5.conf template separate from named.conf template.
(This used to be commit ebf130e9e5)
2008-05-21 20:46:15 -05:00
Andrew Kroeger
25ea110c38 provision: Create instructions for enabling DNS GSS-TSIG updates.
Added code to the python provisioning to create the named.conf file that was
previously generated by the EJS provisioning.

Updated the named.conf template to provide the additional details necessary
to get things working.
(This used to be commit 0b7a6bfcba)
2008-05-18 01:54:57 -05:00
Jelmer Vernooij
251f6bd991 make sure to always use string version of uuid rather than object.
(This used to be commit bcd5fc7dc9)
2008-05-11 04:36:37 +02:00
Jelmer Vernooij
5319d9620b Use consistent function names with the standard Python uuid module that is available in >= 2.4.
(This used to be commit 60d458e319)
2008-05-11 03:31:26 +02:00
Andrew Bartlett
2ddd23a875 Re-add 'db' subdirectory for LDAP backend provision
Andrew Bartlett
(This used to be commit 19890c0d15)
2008-04-15 17:10:47 +02:00
Andrew Bartlett
f8f4856ab7 Fix provision-backend script
Andrew Bartlett
(This used to be commit ee6e4f8da2)
2008-04-15 15:52:52 +02:00
Andrew Bartlett
e44f0e7b75 Don't reopen the sam.ldb again
Andrew Bartlett
(This used to be commit b51b8a2d84)
2008-04-11 19:33:52 +10:00
Andrew Bartlett
393007315d Far less cryptic traceback when you have an existing smb.conf
When the user has an existing smb.conf, but no [netlogon] or [sysvol]
share, the provision script would trigger a traceback.  While we still
need to abort in this situation, we do so now with a useful error.

Andrew Bartlett
(This used to be commit 10a8b7ea48)
2008-04-11 19:04:43 +10:00
Andrew Bartlett
ae977ef247 Fix merge errors on C provision interface after jelmer's good work.
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-abartlet

Conflicts:

	source/torture/local/torture.c
(This used to be commit 5bf1c89cf8)
2008-04-11 11:11:42 +10:00
Jelmer Vernooij
ad8e3e4192 Add infrastructure for returning ProvisionResult in C provision code.
(This used to be commit 98c3d34eb2)
2008-04-10 05:23:17 +02:00
Andrew Bartlett
b202b6e7d4 Fix up provision to specify SERVERDN in more places.
Andrew Bartlett
(This used to be commit d01d542502)
2008-04-09 15:32:49 +10:00
Andrew Bartlett
9d2948f4bd Don't fill in the secrets DB unless we make the entries.
Leave filling in (we still initialise it) the secrets DB for the join
or vampire code.

Andrew Bartlett
(This used to be commit c93208c13c)
2008-04-09 14:57:57 +10:00
Jelmer Vernooij
ac10ac62c1 Add docstring, PEP8.
(This used to be commit f8cac3735c)
2008-04-09 03:51:41 +02:00
Andrew Bartlett
b2805c50ee Re-add support for the --ldap-backend-port option to provision-backend
This option allows Fedora DS multi-master replication to work.  I've
tried to update the wiki and scripts to the largely consistant with
each other.

Andrew Bartlett
(This used to be commit 42393c8307)
2008-04-08 17:28:25 +10:00
Jelmer Vernooij
7c7880695b More PEP8 compliancy.
(This used to be commit d16b30d005)
2008-04-06 00:40:01 +02:00
Jelmer Vernooij
3e97aa73c2 Simplify some code, fix style.
(This used to be commit 1c983e4e4d)
2008-04-05 16:32:28 +02:00
Jelmer Vernooij
14e443b868 Improve PEP8 (Python code style) compliancy a bit.
(This used to be commit c7d388a6e2)
2008-04-05 16:13:42 +02:00
Andrew Bartlett
c764791100 Clean up provision and rootdse module to hard-code less stuff.
In particular, allow for the server DN to be in a different site
(possible outcome of a DRS replication).

Andrew Bartlett
(This used to be commit 9ee4e39fe1)
2008-04-04 12:25:19 +11:00
Kai Blin
c26387a473 provision: Remove backup group mapping
Some distros seem to neither have a backup nor a staff group.
(This used to be commit 21fcf7c419)
2008-04-03 00:01:34 +02:00
Kai Blin
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
Andrew Bartlett
4ccb384327 Fix merge of my host GUID removal and the IPv6 addition to provision
Merge branch 'v4-0-ipv6' of git://git.id10ts.net/samba into 4-0-abartlet

Andrew Bartlett
(This used to be commit d3336684f0)
2008-04-02 12:03:03 +11:00
Andrew Kroeger
3c0c6acc59 provision: Add support for IPv6 (bz #4593).
(This used to be commit 8585a3c77d)
2008-04-01 19:51:24 -05:00
Andrew Bartlett
2ab6dd9ea5 Remove references to setting the host GUID, as the repl_meta_data
module prohibits it anyway.

Andrew Bartlett
(This used to be commit c5b287c056)
2008-04-02 11:38:58 +11:00
Andrew Bartlett
238a1a52f1 Rework 'compleated' message in provision to be more useful.
In particular, this should draw attention to accidential 'standalone'
server provisions and therefore cause less frustration.

Andrew Bartlett
(This used to be commit e906ae041a)
2008-03-29 17:17:56 +11:00
Andrew Bartlett
4ddce8c28c Don't specify what should be a default option in the generated smb.conf
Instead, sub in "", so that the default continued to come from the code.

Andrew Bartlett
(This used to be commit b1829da8f7)
2008-03-28 10:38:12 +11:00
Kai Blin
677dc6aa89 provision: Initialize uninitialized variables if "targetdir" is not
defined and there is no smb.conf file
(This used to be commit 19c29f4738)
2008-03-27 17:49:56 +01:00
Andrew Bartlett
d7299d82c3 Rework memberof handling in slapd.conf (used for OpenLDAP backend)
Instead of using an include file, put the generated configurationd
directly into slapd.conf.

Andrew Bartlett
(This used to be commit 95ac786136)
2008-03-15 19:03:04 +11:00
Andrew Bartlett
0c88240236 Rework to have member server 'domains' be CN=NETBIOSNAME
This reworks quite a few parts of our provision system to use
CN=NETBIOSNAME as the domain for member servers.

This makes it clear that these domains are not in the DNS structure,
while complying with our own schema (found by OpenLDAP's schema
validation).

Andrew Bartlett
(This used to be commit bda6a38b05)
2008-03-13 11:36:58 +11:00
Andrew Bartlett
07a7c8fa0d Update the provision scripts and selftest for LDAP
This should allow us to provision onto an OpenLDAP backend again.

Also ensure we always have a sysvol and netlogon share in the selftest
environment.

Andrew Bartlett
(This used to be commit b2d9b03ba3)
2008-03-13 09:55:06 +11:00
Andrew Bartlett
69d66e6fb0 Upgrade provision-backend to python.
This required a large rework of the provision code, so as to move much
of the 'guess' logic into subprocedures, rather than just inline in
the provision code.

Andrew Bartlett
(This used to be commit a0754c2a85)
2008-03-13 08:08:05 +11:00
Andrew Bartlett
9703948850 Fix provision script to work without smb.conf location specified.
Andrew Bartlett
(This used to be commit b4da374a99)
2008-03-11 14:41:10 +11:00
Andrew Bartlett
a7e1fa0bef Try to fix up part of the upgrade test.
There are still problems with the upgrade test, but these are not
related to the provision system.

Andrew Bartlett
(This used to be commit d331bc400f)
2008-03-07 19:20:39 +11:00
Andrew Bartlett
14c5f968e1 Rework provision scripts for more testing
This fixes up some issues with testdir (was not honoured) and
increases test coverage.

We now check all the major provision modes.  In doing so, to make it
possible to call from the multiple layers of 'sh', I have allowed 'dc'
to alias 'domain controller' and 'member' to alias 'member server'.
Fighting shell quoting in the test system was just too hard...

Also fix upgrade.py

Andrew Bartlett
(This used to be commit 0923de1228)
2008-03-07 10:57:52 +11:00
Andrew Bartlett
449c0c5242 Merge branch 'v4-0-test' of git://git.samba.org/samba into 4-0-local
(This used to be commit a6997c333c)
2008-03-07 07:38:44 +11:00
Andrew Bartlett
8b24d248b7 Start to rework provision for LDAP backends
This is the start of the rework of the provision script to handle an
LDAP backend correctly.  For example, we must not set the 'tdb
modules' against an LDAP backend such as OpenLDAP that handles subtree
renames.

Andrew Bartlett
(This used to be commit e462a107d3)
2008-03-07 07:33:14 +11:00
Andrew Bartlett
7e0ef3fd0e Make Samba4 pass the NET-API-BECOMEDC test against Win2k3 (again).
To make Samba4, using the python provision system, pass this test
required some major rework.  Untested code is broken code, and some of
the refactoring for a seperate provision test (which also now passes)
broke things.

Similarly, the iconv work has compiled, but these codepaths have never
been run (NULL pointer de-reference).

In working to use a local, rather than global, loadparm context, and
to support using a target directory, a few things needed to be
reworked, particularly around path handling.

Andrew Bartlett
(This used to be commit 1169e8d7be)
2008-03-06 21:55:26 +11:00
Andrew Bartlett
4d4a898742 Fix failure to re-provision.
Somewhere in the conversion from ejs we lost calling the 'delete
partitions' code.  However, we have to be careful not to wipe
partitions when we are the second client connecting to an LDAP server.

Andrew Bartlett
(This used to be commit 272eb765b8)
2008-03-03 13:03:19 +11:00
Douglas VanLeuven
c20cf59768 Fix member server provision
Can't add "member server" because the script aborts with null
reference when no match on serverrole.  This is fixed by checking for
the keyword "member server".
(This used to be commit 62536750ae)
2008-03-03 11:08:59 +11:00
Andrew Bartlett
9b7baec42b Reorder modules to have rdn_name before objectclass.
This ensures the relative DN is placed in the correct case into the
DB.

Andrew Bartlett
(This used to be commit 16378219fb)
2008-02-28 08:39:45 +11:00
Kai Blin
895874d966 idmap: Handle uid->SID mapping
(This used to be commit 6ac6de8476)
2008-02-21 11:21:59 +01:00
Jelmer Vernooij
7c96ca88c4 Formatting fixes.
(This used to be commit bc0fab89e3)
2008-02-16 15:23:26 +01:00
Jelmer Vernooij
85fe22a85f Use struct for provision parameters since there are so many of them.
(This used to be commit 4b9d5bc57c)
2008-02-15 15:14:55 +01:00
Jelmer Vernooij
08e3f99f14 Initial work on a test for samba.tests.samdb
(This used to be commit 8b33860954)
2008-02-13 02:18:45 +01:00
Jelmer Vernooij
2fa4c15858 Fix syntax of docstrings, set project name when generating Python API documentation.
(This used to be commit 68f13d87eb)
2008-02-09 17:37:42 +01:00
Jelmer Vernooij
bd0bfe6833 Fix provision python test.
(This used to be commit b173fa6bd2)
2008-02-09 03:09:56 +01:00
Jelmer Vernooij
2aac2a5df8 Add tests for findnss(), add some docstrings.
(This used to be commit 4eec2bbc9a)
2008-02-09 02:10:49 +01:00
Jelmer Vernooij
c1d8ac0ab1 Remove unused class members.
(This used to be commit 373ef4287f)
2008-02-09 01:42:38 +01:00
Jelmer Vernooij
f47093baf0 Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-trivial
Conflicts:

	source/scripting/python/samba/provision.py
(This used to be commit e367df5d99)
2008-02-08 14:02:22 +01:00
Andrew Bartlett
26897518ea Fix LDAP backend with python
We were still setting the hard-coded users.ldb etc, rather than
switching to the ldapi:// URI

Andrew Bartlett
(This used to be commit 603e981250)
2008-02-08 17:11:26 +11:00
Jelmer Vernooij
fffe4f3bdd Fix formatting.
(This used to be commit 73d1b0fcb6)
2008-02-08 03:03:44 +01:00
Jelmer Vernooij
cab677a33f python: Use relative paths for registry.
(This used to be commit 079200b824)
2008-01-26 04:22:42 +01:00
Jelmer Vernooij
1c5e713cce Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-trivial
Conflicts:

	source/scripting/python/samba/provision.py
(This used to be commit 64babbec22)
2008-01-25 11:50:00 +01:00
Jelmer Vernooij
6c2d4f2806 python/provision: Reload secrets when necessary, fix unix names in mappings.
Pair programmed with Andrew.
(This used to be commit 04fe8c8aef)
2008-01-25 11:47:44 +01:00
Andrew Bartlett
1b18de131c Tidy up the last regresesions on the python smbscript, from my work
with Jelmer today.

The only remaining issue is that for the build farm, we will need to
manually specify the users and groups from the NSS_WRAPPPER, as python
isn't compiled with this.

Andrew Bartlett
(This used to be commit 5370484d25)
2008-01-25 17:11:20 +11:00
Jelmer Vernooij
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
Jelmer Vernooij
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
Jelmer Vernooij
a2dcf7bd22 Python: add some docstrings.
(This used to be commit 1de69a772e)
2008-01-24 01:06:19 +01:00
Andrew Bartlett
064eb82870 Remove --ldap-base from the python provision script
(This is a merge from the ejs script)

Andrew Bartlett
(This used to be commit d822dfa017)
2008-01-18 13:25:01 +11:00
Jelmer Vernooij
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
Jelmer Vernooij
2bd4bf6a1b r26629: python: Improve documentation in various places.
(This used to be commit ee71a27bca)
2007-12-29 12:21:04 -06:00
Jelmer Vernooij
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
Jelmer Vernooij
a61e25f174 r26622: python: Update license version, clarify copyright.
(This used to be commit 3ee6209407)
2007-12-28 10:33:02 -06:00
Jelmer Vernooij
222262b54e r26608: More improvements to the upgrade code.
(This used to be commit 7ea06d91f6)
2007-12-26 21:18:02 -06:00
Jelmer Vernooij
533cc583ed r26596: Fixed upgrade.py.
Added blackbox tests for provision and upgrade Python scripts.
Clean up temporary files created by the Python tests.
(This used to be commit 2227fb6df6)
2007-12-26 11:57:08 -06:00
Jelmer Vernooij
aa0a06f13c r26570: - Trim size of the swig-generated Python bindings by removing a bunch of {}'s.
- Start working on Python equivalents for various EJS tests.
- Fix regression in argument order for reg_diff_apply() in EJS bindings.
(This used to be commit c550c03372)
2007-12-24 01:51:03 -06:00
Jelmer Vernooij
f053e385ff r26566: Fix member provision when using python.
(This used to be commit e5573283df)
2007-12-24 01:51:01 -06:00
Jelmer Vernooij
249cc734ce r26565: Fix python registry bindings. 'PROVISION_PYTHON=yes make test' works now.
(This used to be commit 485d1fa3d1)
2007-12-24 01:51:01 -06:00
Jelmer Vernooij
09f820f0bd r26564: More python bindings for registry code.
(This used to be commit f40fad9827)
2007-12-24 01:51:01 -06:00
Jelmer Vernooij
b7ffc3b404 r26562: Fix provisioning using Python.
(This used to be commit b07ca944ba)
2007-12-24 01:51:00 -06:00
Jelmer Vernooij
30ce895e0c r26559: Make the provision function a bit smaller.
(This used to be commit a1175231a5)
2007-12-24 01:51:00 -06:00
Jelmer Vernooij
109a903750 r26545: Sync output with ejs.
(This used to be commit 48ceaa9643)
2007-12-21 06:28:46 +01:00
Jelmer Vernooij
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
Jelmer Vernooij
86f91db7d5 r26536: More tests for provisioning code.
(This used to be commit 43c8bfeedf)
2007-12-21 05:51:56 +01:00
Jelmer Vernooij
595ec370da r26535: Get rid of all-knowing ProvisionSettings object.
(This used to be commit 40bf88c8a7)
2007-12-21 05:51:56 +01:00
Jelmer Vernooij
4e6ab64762 r26527: Start on tests for provision.
(This used to be commit 84ac6c6bbf)
2007-12-21 05:51:50 +01:00
Jelmer Vernooij
44946cefb3 r26525: Consistency in the API.
(This used to be commit 37577fee58)
2007-12-21 05:51:48 +01:00
Jelmer Vernooij
4bfbd78086 r26524: Import self join.
(This used to be commit daae983c26)
2007-12-21 05:51:47 +01:00
Jelmer Vernooij
1c29a63d44 r26523: Refactor provisioning code.
(This used to be commit ac1083178f)
2007-12-21 05:51:44 +01:00
Jelmer Vernooij
54a48d40a1 r26522: Fix warnings on SamDB connect from Python, simplify the setup code for the various LDBs.
(This used to be commit 20c686f501)
2007-12-21 05:51:42 +01:00
Jelmer Vernooij
63f53094ef r26520: More Python updates.
(This used to be commit a8b1fe15ac)
2007-12-21 05:51:31 +01:00
Jelmer Vernooij
12a513b47b r26518: Fix provision of registry using Python.
(This used to be commit 12eb38e553)
2007-12-21 05:51:25 +01:00
Jelmer Vernooij
57b8a8fd42 r26517: Add functions for setting and getting parameters on a LoadParm.
Pass loadparm context along to Ldb contexts.
Other minor Python improvements.
(This used to be commit 7a15b486ba)
2007-12-21 05:51:23 +01:00
Jelmer Vernooij
ca74c6e6c4 r26513: Update substitution dictionary for ldifs.
(This used to be commit 60fb2de211)
2007-12-21 05:51:18 +01:00
Jelmer Vernooij
f89c7a6e5e r26505: Add python bindings for some samdb-related functions, improve provisioning in python.
(This used to be commit d240225166)
2007-12-21 05:51:09 +01:00
Jelmer Vernooij
32f439bfa4 r26503: Change order of arguments in param interface so it's easier to make the
section name optional. Fix several smaller bits and pieces in the Python code.
(This used to be commit 1b89311e5f)
2007-12-21 05:51:06 +01:00
Jelmer Vernooij
09915ce8b7 r26499: Allow testing python provision by setting the PROVISION_PYTHON environment variable.
(This used to be commit 379d0bbb2f)
2007-12-21 05:50:55 +01:00
Jelmer Vernooij
b0360e3a86 r26496: Move some provision functions to a new SamDB class, support setting session_info on a ldb context from python.
(This used to be commit 75cfb0d609)
2007-12-21 05:50:50 +01:00
Jelmer Vernooij
be99991267 r26484: Don't rely on removed header.
(This used to be commit 6ca2b35085)
2007-12-21 05:50:42 +01:00
Jelmer Vernooij
eb2c71912b r26471: Sync with js version.
(This used to be commit c0eea26e8e)
2007-12-21 05:50:33 +01:00
Jelmer Vernooij
eba25f5d18 r26375: Move provision-independent utility function to main samba python module.
(This used to be commit 9d0ff47be0)
2007-12-21 05:49:10 +01:00
Jelmer Vernooij
c926cddfad r26366: Import provision scripts in Python.
(This used to be commit 090c799f98)
2007-12-21 05:49:06 +01:00