1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

942 Commits

Author SHA1 Message Date
Matthieu Patou
a5653bcf83 s4 upgradeprovision: add more attrbutes the ignore list
Also format in a pretty way the int64 ranges
2010-08-19 15:59:05 +04:00
Matthieu Patou
eaf1d050fe s4 upgradeprovision: upgrade_delta_samdb return a msg_diff of @ATTRIBUTES
This is used by upgradeprovision to readd this delta just before loading
a merged schema
2010-08-19 15:59:04 +04:00
Matthieu Patou
3e49b20cf0 s4 upgradeprovision: Fixes for increment_keyversion
fix
2010-08-19 15:59:04 +04:00
Matthieu Patou
503824b757 s4 upgradeprovision: fix a typo and pass correct parameter to increment_calculated_keyversion 2010-08-19 15:59:04 +04:00
Andrew Tridgell
82c171aa55 s4-net: use an encrypted ldap session when setting passwords
this allows for "net setpassword -H ldap://server -Uusername%password USERNAME"
to set a password remotely on a windows DC

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17 21:21:51 +10:00
Andrew Tridgell
ec3ed2898f s3-provision: cope with the policy directory already existing
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-08-17 08:44:28 +10:00
Andrew Tridgell
6b266b85cf s4-loadparm: 2nd half of lp_ to lpcfg_ conversion
this converts all callers that use the Samba4 loadparm lp_ calling
convention to use the lpcfg_ prefix.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-16 18:24:27 +10:00
Andrew Bartlett
299057d8d9 s4:provision Handle machine account password changes while keeping keytab
The challenge here is to update the existing record if it already
exists, rather than deleting the old record.  This ensures that the
secrets.keytab handling code keeps the previous password in the
keytab.

Andrew Bartlett
2010-07-15 22:08:22 +10:00
Matthieu Patou
62a32975c8 s4: Add unit test for increment_calculated_keyversion_number
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:21 +10:00
Matthieu Patou
9323901644 s4 upgradeprovision: introduce a new function to update the field use for calculating msds-keyversionnumber
This function change the version field of the unicodePwd in the
replPropertyMetaData so that the version is equal or
superior to the reference value passed.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:21 +10:00
Matthieu Patou
f97c90c9cd s4 python: Add functions to samdb to manipulate version of replPropertyMetaData attribute
This change contains also helpers for attribute id to attribute oid
conversion and from attribute id to attribute name.
It brings also unit tests

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:20 +10:00
Matthieu Patou
6a0856da9c s4 dsdb: Use the changereplmetadata control
This control allow to specify the replPropertyMetaData attribute to
be specified on modify request. It can be used for very specific needs
to tweak the content of the replication data.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:20 +10:00
Matthieu Patou
fd2eb0dfd0 s4 provision: move update_machine_account_password to helpers
This is to allow reuse of this function and also unit tests

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:20 +10:00
Stefan Metzmacher
800c7af0c9 s4:provision: also use fixed GUID names of the default group policies for domain and domain controllers in tests
metze
2010-07-10 11:18:19 +02:00
Matthieu Patou
f16007430a s4 provision: use correct GUID for default policies
The value of GUID for policy is not random for default policies, it is
described here ("How Core Group Policy Works"):
http://technet.microsoft.com/en-us/library/cc784268%28WS.10%29.aspx
at paragraph System\Policies Container.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-07-10 11:18:18 +02:00
Matthieu Patou
cad04dabbb s4 net: Add spn module to list/add/remove spn on objects
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-07-10 11:18:17 +02:00
Matthias Dieter Wallnöfer
32a2bbb44b s4:samdb.py - "setpassword" - performs password sets using the "unicodePwd" attribute
This does work per default on each AD-compatible DC. "userPassword" support on
Windows however has to be activated explicitly by the "dSHeuristics".
2010-07-08 19:28:43 +02:00
Matthias Dieter Wallnöfer
c0ee606474 s4:pwsettings net utility - change also here the "minPwdAge" to be the real default
Which is one day.
2010-07-03 11:38:54 +02:00
Andrew Bartlett
94637e5fe4 s4:provision Add an msDS-SupportedEncryptionTypes entry to our DC
This ensures that our DC will use all the available encyption types.

(The KDC reads this entry to determine what the server supports)

Andrew Bartlett
2010-06-29 16:59:22 +10:00
Matthias Dieter Wallnöfer
c7b52b233e s4:provision.py - fix comment regarding DNS entries
I think this should mean partially Samba4 specified (all beside the "dns"
account is standard)
2010-06-26 11:11:46 +02:00
Stefan Metzmacher
6ab234cec9 s4:provision: move Samba4 specific DNS stuff to its own file
metze
2010-06-26 09:50:56 +02:00
Stefan Metzmacher
c6b21931c6 s4:provision: add --next-rid option
Make it possible to provision a domain with a given next rid counter.
This will be useful for upgrades, where we want to import users
with already given SIDs.

metze
2010-06-26 09:50:55 +02:00
Stefan Metzmacher
712a149802 s4:provision: don't use hardcoded values for 'nextRid' and 'rIDAvailablePool'
On Windows dcpromo imports nextRid from the local SAM,
which means it's not hardcoded to 1000.

The initlal rIDAvailablePool starts at nextRid + 100.

I also found that the RID Set of the local dc
should be created via provision and not at runtime,
when the first rid is needed.
(Tested with dcpromo on w2k8r2, while disabling the DNS
 check box).

After provision we should have this (assuming nextRid=1000):

rIDAllocationPool: 1100-1599
rIDPrevAllocationPool: 1100-1599
rIDUsedPool: 0
rIDNextRID: 1100

rIDAvailablePool: 1600-1073741823

Because provision sets rIDNextRid=1100, the first created account
(typically DNS related accounts) will get 1101 as rid!

metze
2010-06-26 09:50:54 +02:00
Stefan Metzmacher
89f94a43d8 s4:provision: pass relax control also to modify_ldif
metze
2010-06-26 09:50:54 +02:00
Matthieu Patou
5c98ccd706 s4 python: Add unit tests related to PyLong/PyInt handling
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-25 11:33:33 +02:00
Michael Wood
92cfc63287 s4 upgradeprovision: Try to support older Pythons.
Use "...".split(sep, 1) instead of "...".partition(sep).

Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
2010-06-25 08:46:13 +02:00
Andrew Tridgell
4cb423f527 s4-python: python is not always in /usr/bin
Using "#!/usr/bin/env python" is more portable. It still isn't ideal
though, as we should really use the python path found at configure
time. We do that in many places already, but some don't.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-06-24 18:46:57 +10:00
Lukasz Zalewski
740c97b513 Fix to undo nasty hack for for grouptype conversion
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-23 14:49:02 +02:00
Andrew Bartlett
86ed5eb892 s4:net Remove warnings for 2000 native mode and Samba4.
We now support 2000 native mode, and so we just need to warn about mixed mode.

Andrew Bartlett
2010-06-23 20:10:07 +10:00
Andrew Bartlett
d0f52ddac2 s4:provision Raise default max functional level to 2008R2
We don't support many of the extra features, but that applies across many
other parts of AD.  Allow the admin to join a 2008R2 domain if he or she wants.

This also makes it possible to test 2008R2 domain code in 'make test'

Andrew Bartlett
2010-06-23 20:10:06 +10:00
Andrew Bartlett
b26125b7d3 s4:provision Remove am_rodc from Schema
The SamDB created in the schema code isn't real enough to care if it's an
rodc or not.
2010-06-23 20:10:05 +10:00
Andrew Bartlett
c4482bf53e libds:common Remove DS_DC_* domain functionality flags
These are just a subset of the DS_DOMAIN_ functionality flags, are compared and often confused with each other.  Just make them one set.

Andrew Bartlett
2010-06-23 20:10:03 +10:00
Matthias Dieter Wallnöfer
e062e7300b s4:python LDB __init__.py - remove completely unused "erase_partitions" call
Seems to be a relict from the past.
2010-06-20 18:52:28 +02:00
Jelmer Vernooij
0714e23971 provision: Look for Samba prefix a bit harder. 2010-06-20 17:46:39 +02:00
Jelmer Vernooij
9e02764f7c pydsdb: Mark all SamDB and Schema methods that are in pydsdb as
private, to discourage them being called directly.
2010-06-20 15:22:49 +02:00
Jelmer Vernooij
5f3d5a3ad8 provision: Properly cancel transactions on the secrets ldb. 2010-06-20 14:24:54 +02:00
Jelmer Vernooij
8f383fc5c8 s4-python: Remove more unused imports, fix use of sets in upgradehelpers. 2010-06-20 13:15:09 +02:00
Jelmer Vernooij
3795358aca Use standard Python syntax, booleans and set()'s where appropriate. 2010-06-20 12:06:50 +02:00
Jelmer Vernooij
66e27e5214 Remove unnecessary use of transactions. 2010-06-20 11:59:49 +02:00
Jelmer Vernooij
1f07f53827 ldb: Remove last import of dsdb. 2010-06-20 02:46:57 +02:00
Jelmer Vernooij
94e06fe203 Some more formatting fixes, move schema related functions from Ldb to Schema. 2010-06-20 02:46:57 +02:00
Jelmer Vernooij
d3d7ff66d4 Move convert_to_openldap onto Schema class. 2010-06-20 02:46:56 +02:00
Jelmer Vernooij
afad634207 Formatting cleanups; use True/False for booleans, unnecessary backslashes, spacing. 2010-06-20 01:57:11 +02:00
Jelmer Vernooij
a5e8ef884b Move a few more samdb-specific methods to SamDB, away from Ldb. 2010-06-20 01:37:06 +02:00
Jelmer Vernooij
1d86414eb0 samdb: Fix formatting, move get_oid_from_attid from Ldb to SamDB. 2010-06-20 01:30:51 +02:00
Jelmer Vernooij
b48182007c s4-python: Remove trivial function, replace by dictionary. 2010-06-20 01:30:51 +02:00
Lukasz Zalewski
214133fbec Modifications extending functionality of newuser cmd and new net group set of commands for group related operations on ldb
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 01:29:03 +02:00
Lukasz Zalewski
c58c0c2129 Modifications extending functionality of newuser cmd and new net group set of commands for group related operations on ldb
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 01:29:03 +02:00
Matthieu Patou
38a26f79ea s4 upgradeprovision: Make grouped commit / rollback more resistant to unexpected problems
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 00:43:09 +02:00
Matthieu Patou
c4f7b0e5f6 s4 upgradeprovision: Check that the policy for DC is present if not warn the user
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 00:43:09 +02:00