1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-27 14:04:05 +03:00

661 Commits

Author SHA1 Message Date
Matthias Dieter Wallnöfer
cb50af5fe1 s4:provision - Lets the user choose between the supported forest/domain function levels
Adds a parameter "--function-level" which allows to specify the domain and
forest function level.
2009-09-30 16:00:07 +02:00
Jelmer Vernooij
a6d4eec3a5 samba.tests.provision: Remove broken become_dc test. 2009-09-26 02:38:09 +02:00
Jelmer Vernooij
96dd5719d4 Add init file for DCE/RPC tests. 2009-09-24 15:03:59 +02:00
Jelmer Vernooij
0450a5bf90 PEP8 2009-09-24 15:03:59 +02:00
Jelmer Vernooij
5cf25fd225 Revert "s4:python fixed subunit tests of dcerpc"
This reverts commit ffd48a79ee34dc90c0f6f16564c3a0de8b53d3d2.
2009-09-24 15:03:58 +02:00
Nadezhda Ivanova
10c6f3f71a Initial Implementation of the DS objects access checks.
Currently disabled. The search will be greatly modified,
also the object tree stuff will be simplified.
2009-09-21 17:27:50 -07:00
Nadezhda Ivanova
13b979b03d Merge branch 'master' of git://git.samba.org/samba 2009-09-21 14:26:15 -07:00
Andrew Bartlett
1afc7c453c s4:kerberos Fix the salt to match Windows 2008.
The previous commit changed the wrong end - we must fix our server,
not our client.

Andrew Bartlett
2009-09-21 12:28:38 -07:00
Andrew Bartlett
8738b83a44 s4:provision Make our default salt match our server behaviour
We need to look into salting algorithms further.

Andrew Bartlett
2009-09-21 11:59:33 -07:00
Matthias Dieter Wallnöfer
63f280cfef s4:provision - Fix up ProvisioningError class as suggested by Jelmer 2009-09-21 17:20:49 +02:00
Matthias Dieter Wallnöfer
7373bb79d4 s4:samdb/tools - That should fix now the last failures 2009-09-21 13:53:47 +02:00
Andrew Bartlett
23ffccd5d7 s4:provision Make us Windows 2008 level by defualt again
Also add a note to clarify that this should not be changed without
discussion and consensus.  We don't want this bouncing around.

Paramater support to allow optional selection of Win2003 mode welcomed.

Andrew Bartlett
2009-09-20 23:05:30 -07:00
Nadezhda Ivanova
025590e7a4 Merge branch 'master' of git://git.samba.org/samba 2009-09-20 17:43:46 -07:00
Andrew Bartlett
bfddb6816f s4:provision Use code to store domain join in 'net join' as well
This ensures we only have one codepath to store the secret, and
therefore that we have a single choke point for setting the
saltPrincipal, which we were previously skipping.

Andrew Bartlett
2009-09-20 16:29:38 -07:00
Andrew Bartlett
509a2bb97c s4:provision split provision of DNS zone and self join keytab 2009-09-20 16:29:37 -07:00
Nadezhda Ivanova
6283f2caaa Initial implementation of security descriptor creation in DS
TODO's:
ACE sorting and clarifying the inheritance of object specific ace's.
2009-09-20 15:16:17 -07:00
Matthias Dieter Wallnöfer
c1527612b9 s4:python tools - try to fix some test problems 2009-09-20 23:49:05 +02:00
Nadezhda Ivanova
05653fce78 Fixed a difference in domain sid type when SID is provided by user. 2009-09-20 10:12:04 -07:00
Stefan Metzmacher
93e1e8bec9 s4:provision: add the 'resolve_oids' on the top of the module stack
metze
2009-09-20 06:44:18 +02:00
Matthias Dieter Wallnöfer
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
Matthias Dieter Wallnöfer
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
Matthias Dieter Wallnöfer
89f5df6fa7 s4:provision - Bump down the domain and forest level to Windows 2000
- The DC level we keep on Windows Server 2008 R2 (we should call ourself
  always the newest server type)
- The domain/forest level we set to the minimum (Windows 2000 native) to
  allow all AD DC types (from Windows 2000 on) in our domain - the NT4 "mixed"
  mode isn't supported by us (discussed on mailing list) -> "nTMixedDomain" is
  set always to 0
- I'll add a script which allows to bump the DC level (basically sets the
  "msDS-Behaviour-Version" attributes on the "Partitions/Configuration/DC" and
  on the "DC" object)
2009-09-18 16:21:29 +02:00
Matthias Dieter Wallnöfer
fa4023d6f7 s4:provision - Some rework (continuation)
- Fix up "servicePrincipalNames" attributes on the DC object
- Add some informative comments (most in "provision_self_join.ldif")
- Add also comments where objects are missing which we may add later when we
  support the feature (mainly for FRS)
- Add "domain updates" objects also under "CN=Configuration" (they exist twice)
- Add the default services under "Services" to allow interoperability with some
  MS client tools
- Smaller changes
2009-09-17 21:19:24 +02:00
Matthias Dieter Wallnöfer
4fa327a19f s4:provision - Some rework
- Add/change "wellKnownObjects" attributes
- Order entries in "provision_basedn_modify.ldif"
- Add/change "delete entries" object under BASEDN and CONFIGDN
- Fix default version number of "Default domain policy" group policy
- Add "domain updates" objects for interoperability with MS AD maintaining tools
- Show version number in the "oEMInformation" attribute (suggested by ekacnet)
- Smaller fixups
2009-09-17 18:27:31 +02:00
Matthias Dieter Wallnöfer
0c202e403f s4/domain behaviour flags: Fix them up in various locations
Additional notes:
- Bump the level to Windows Server 2008 R2 (we should support always the latest
  version - if we provision ourself)
- In "descriptor.c" the check for the "domainFunctionality" level shouldn't be
  needed: ACL owner groups (not owner user) are supported since Windows 2000
  Server (first AD edition)
  - I took the argument from: http://support.microsoft.com/kb/329194
2009-09-17 12:40:33 +02:00
Matthias Dieter Wallnöfer
bfb3eaabe7 s4/python: flags
- Introduce the "userAccountControl", "groupType" and "sAMAccountType" flags
- Corrects the "domain/forestFunctionality" and "domainControllerFunctionality" flags
2009-09-17 12:40:27 +02:00
Nadezhda Ivanova
d70e171719 Owner and group defaulting.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-09-16 07:52:05 -07:00
Andrew Bartlett
ffe831452b s4:provision Prevent some invalid combinations of realm and domain
We don't do well (even just trying to create duplicate
servicePrincipalName values) with some of these combinations, so kill
it off early before the administrator thinks it's going to work.

Andrew Bartlett
2009-09-14 22:41:09 -07:00
Matthias Dieter Wallnöfer
b0b8340d95 s4:group policies - upcase directory names of default group policies
The directory names (MACHINE, USER) are upcased to help locating the default
group policies under the SYSVOL dir (the additional ones have only the first
letter upcased of those directory names).
2009-09-12 11:12:22 +02:00
Matthias Dieter Wallnöfer
10833f641a s4:group policies - add the domain controller group policy
This patches fixes the last difference between s4 and Windows Server regarding
group policy objects: we hadn't the domain controller policy.

- Adds the domain controller policy as it is found in the "original" AD
- Adds also the right version number in the GPT.INI file for the domain group
  policy (was missing)
2009-09-11 22:41:58 +02:00
Andrew Tridgell
f009fa15a1 s4-provision: use DNS name, not domain name
The SPNs end in the DNS domain name
2009-09-11 17:14:01 +10:00
Andrew Tridgell
d26c42f5bf s4/provision: add the nTDSDSA GUID based DNS entries and SPNs
The DNS entries and SPNs are needed for samba<->samba DRS
replication. This patch adds them for a standalone DC configure. A
separate patch will add them for the vampire configure
2009-09-11 14:07:22 +10:00
Matthias Dieter Wallnöfer
aae07390e2 Revert "s4: Let the "setpassword" script finally use the "samdb_set_password" routine"
This reverts commit fdd62e9699b181a140292689fcd88a559bc26211.

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
Andrew Bartlett
f85e77c43f s4:provision Only delete SASL mappings with Fedora DS, not OpenLDAP
We need to be more careful to do the cleanup functions for the right
backend.  In future, these perhaps should be provided by the
ProvisionBackend class.

Andrew Bartlett
2009-09-10 19:47:51 +10:00
Andrew Tridgell
9460427c24 s4: kludge_acl needs to be above repl_meta_data
We have to bypass kludge_acl in replication as otherwise we aren't
allowed access to the password entries
2009-09-10 17:45:25 +10:00
Andrew Tridgell
c0efa51929 s4/provision: another fix for breakage from b1dabb1133 2009-09-10 12:42:57 +10:00
Andrew Bartlett
22c4ffa398 s4:provision Don't reference provision_backend when using LDB
This broke in Endi's patch for Fedora DS support

Andrew Bartlett
2009-09-10 12:27:04 +10:00
Endi Sukma Dewata
b1dabb1133 s4: Use SASL authentication against Fedora DS.
1. During instance creation the provisioning script will import the SASL
   mapping for samba-admin. It's done here due to missing config schema
   preventing adding the mapping via ldapi.

2. After that it will use ldif2db to import the cn=samba-admin user as
   the target of SASL mapping.

3. Then it will start FDS and continue to do provisioning using the
   Directory Manager with simple bind.

4. The SASL credentials will be stored in secrets.ldb, so when Samba
   server runs later it will use the SASL credentials.

5. After the provisioning is done (just before stopping the slapd)
   it will use the DM over direct ldapi to delete the default SASL
   mappings included automatically by FDS, leaving just the new
   samba-admin mapping.

6. Also before stopping slapd it will use the DM over direct ldapi to
   set the ACL on the root entries of the user, configuration, and
   schema partitions. The ACL will give samba-admin the full access
   to these partitions.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-09-10 09:52:22 +10:00
Nadezhda Ivanova
269fe99a62 Added "admin_session" method.
The purpose of admin_session is to be able to execute parts of provisioning
as the user Administrator in order to have the correct group and owner in the
security descriptors. To be used for provisioning and tests only.
2009-09-09 18:57:50 +10:00
Matthias Dieter Wallnöfer
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
Matthias Dieter Wallnöfer
51479feb20 s4:provision - Cosmetic: Indent the parameters better 2009-09-08 11:55:40 +02:00
Matthias Dieter Wallnöfer
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
Michael Ströder
231d276430 s4: Exceptions in "provision.py"
This looks much nicer than "normal" string exceptions - and fits better in the OO
programming style.
2009-09-07 09:12:09 +02:00
Matthias Dieter Wallnöfer
90d6829f8a s4:Foreign security principals - Fix them up
I fixed them up to match with Windows Server 2003. I don't think that the
creation of them in the provision script is needed so I put them in the
"provision_users.ldif" file.
2009-09-07 08:37:25 +02:00
Matthias Dieter Wallnöfer
a3d7534c86 s4:provision - Change the module order to match Windows Server
Tests show that Windows Server seems to do the access checks on the very last moment.
2009-09-07 08:37:24 +02:00
Matthias Dieter Wallnöfer
5f2832a5dc s4:samldb - Major rework
This fixes up the change of the primary group of a user when using the ADUC
console:
- When the "primaryGroupId" attribute changes, we have to delete the
  "member"/"memberOf" attribute reference of the new primary group and add one
  for the old primary group.
- Deny deletion of primary groups according to Windows Server (so we cannot
  have invalid "primaryGroupID" attributes in our AD).
- We cannot add a primary group directly before it isn't a secondary one of a
  user account.
- We cannot add a secondary reference ("member" attribute) when the group has
  been chosen as primary one.

This also removes the LDB templates which are basically overhead now.

This should also fix bug #6599.
2009-09-07 08:37:24 +02:00
Matthias Dieter Wallnöfer
353481daa2 s4:provision - Add a new delete function only for users and computers
We need this new function to delete users and computers before other objects
on reprovisioning. Otherwise primary groups could be deleted before user/computer
accounts (which isn't allowed anymore by the reworked "samldb" module).
2009-09-07 08:37:23 +02:00
Andrew Kroeger
fddcee6325 s4:setup: Use ms_display_specifiers script for provision.
Changed the provisioning to use the new script to parse the Microsoft-provided
DisplaySpecifiers LDIF file.
2009-09-07 11:18:18 +10:00
Andrew Kroeger
1a657b0413 s4:setup: Added script to parse Microsoft DisplaySpecifiers document.
Created this script based on the existing ms_schema.py script.

- Removed some unnecessary transformations that are only necessary for schema
  processing.
- Added capability to parse and properly output base64-encoded values.
- Removed unnecessary attributes based on what attributes were present (and also
  what were explicitly removed) from display_specifiers.ldif.
2009-09-07 11:18:18 +10:00
Andrew Tridgell
ffd48a79ee s4:python fixed subunit tests of dcerpc
The version of the unitest python module in Ubuntu Jaunty doesn't seem
to support this many level of subdirectories. Moving the tests up one
level solves the problem.
2009-09-04 18:07:04 +10:00