1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-08 16:23:49 +03:00
Commit Graph

107 Commits

Author SHA1 Message Date
Simo Sorce
fa1ae9a44b r12905: add some ldap policies
not yet enforced except for the initial connection timeout
2007-10-10 13:51:01 -05:00
Andrew Bartlett
1fbe09ce81 r12762: Simo correctly asked that the policy logic (which attributes contain
passwords) be moved into the database, and not be hard-coded in the
module source.

Andrew Bartlett
2007-10-10 13:49:51 -05:00
Andrew Bartlett
42cdad5e3f r12749: Fix the newuser script.
Andrew Bartlett
2007-10-10 13:49:49 -05:00
Andrew Bartlett
be9d0cae89 r12746: An initial version of the kludge_acls module.
This should be replaced with real ACLs, which tridge is working on.
In the meantime, the rules are very simple:

- SYSTEM and Administrators can read all.

- Users and anonymous cannot read passwords, can read everything else

- list of 'password' attributes is hard-coded

Most of the difficult work in this was fighting with the C/js
interface to add a system_session() all, as it still doesn't get on
with me :-)

Andrew Bartlett
2007-10-10 13:49:48 -05:00
Simo Sorce
4c685ac0d1 r12745: Initial work to support a syntax to pass over controls via
command line to ldbsearch. Very rough work, no checks are
done on the input yet (will segfault if you make it wrong).
Controls are passed via the --controls switch an are comma
separated (no escaping yet).

General syntax is <ctrl_name>:<criticality>
<ctrl_name> is a string
<criticality> is 1 or 0

Current semi-parsed controls are:

server_sort
syntax: server_sort:1:0:attributename

	1st parm: criticality
	2nd parm: reversed
	3rd parm: attribute name to be used for sorting

todo:	still missing suport for multiple sorting
	  attributes and ordering rule
	no check on result code

paged_results
syntax: paged_results:1:100

	1st parm: criticality
	2nd parm: number of results to be returned

todo:	ldbsearch will return only the first batch
	  (missing code to cycle over conditionally)
	no check on result code

extended_dn
syntax: extended_dn:1:0

	1st parm: criticality
	2nd parm: type, see MS docs on meaning

Simo.
2007-10-10 13:49:48 -05:00
Andrew Bartlett
b349d2fbfe r12739: Add support for using credentials in the provision process.
This should allow us to provision to a 'normal' LDAP server.

Also add in 'session info' hooks (unused).  Both of these need to be
hooked in on the webserver.

Andrew Bartlett
2007-10-10 13:49:48 -05:00
Andrew Bartlett
8e608dd4bf r12720: By metze's request, rename the ntPwdHistory attribute to
sambaNTPassword.  Likewise lmPwdHistory -> sambaLMPwdHistory.

The idea here is to avoid having conflicting formats when we get to
replication.  We know the base data matches, but we may need to use a
module to munge formats.

Andrew Bartlett
2007-10-10 13:49:45 -05:00
Andrew Bartlett
097d9d0b7f r12719: Rename unicodePwd -> sambaPassword.
Because we don't know the syntax of unicodePwd, we want to avoid using
that attribute name.  It may cause problems later when we get
replication form windows.

I'm doing this before the tech preview, so we don't get too many
supprises as folks upgrade databases into later versions.

Andrew Bartlett
2007-10-10 13:49:45 -05:00
Andrew Bartlett
61700252e0 r12686: Push the real SASL list into the rootdse.
Get this out of the server credentials, and push it down to ldb via an
opaque pointer.

Andrew Bartlett
2007-10-10 13:49:38 -05:00
Andrew Bartlett
1a9992e56a r12630: Remove attributes which should be automaticly generated.
This fixes a problem I had with kpasswd, as the account had 'expired'
due to the old pwdLastSet, hardcoded in the ldif.

Andrew Bartlett
2007-10-10 13:49:09 -05:00
Andrew Bartlett
660fc3ff4e r12625: More 'useful' names for the DNS zone.
Andrew Bartlett
2007-10-10 13:49:07 -05:00
Andrew Bartlett
41948c4bdb r12600: Add a new module to sort the objectclass attribute on store. The
module is perhaps not the most efficient, but I think it is
reasonable.

This should restore operation of MMC against Samba4 (broken by the
templating fixes).

Andrew Bartlett
2007-10-10 13:49:01 -05:00
Andrew Bartlett
e902274321 r12599: This new LDB module (and associated changes) allows Samba4 to operate
using pre-calculated passwords for all kerberos key types.
(Previously we could only use these for the NT# type).

The module handles all of the hash/string2key tasks for all parts of
Samba, which was previously in the rpc_server/samr/samr_password.c
code.  We also update the msDS-KeyVersionNumber, and the password
history.  This new module can be called at provision time, which
ensures we start with a database that is consistent in this respect.

By ensuring that the krb5key attribute is the only one we need to
retrieve, this also simplifies the run-time KDC logic.  (Each value of
the multi-valued attribute is encoded as a 'Key' in ASN.1, using the
definition from Heimdal's HDB.  This simplfies the KDC code.).

It is hoped that this will speed up the KDC enough that it can again
operate under valgrind.
2007-10-10 13:49:01 -05:00
Andrew Bartlett
0aaff059ba r12598: Make the 'objectClass' part of the templating process actually work.
We need to add to the multivalued objectClass, not ignore it because
the user has already specified a value.

Also rename the template again.

This was caught by more stringent tests in the unicodePwd module, but
breaks MMC.  A later commit will sort the objectClass.

Andrew Bartlett
2007-10-10 13:49:01 -05:00
Andrew Tridgell
ce070ef50f r12536: kerberos is on port 88, not port 389
i guess this shows that MS clients ignore the port number in SRV replies
2007-10-10 13:47:53 -05:00
Andrew Bartlett
c4520ba2e6 r12427: Move SAMR CreateUser2 to transactions, and re-add support for
different computer account types.  (Earlier code changes removed the
BDC case).

We don't use the TemplateDomainController, so just have a
TemplateServer in provision_templates.ldif

Andrew Bartlett
2007-10-10 13:47:37 -05:00
Andrew Bartlett
566bbfd067 r12384: I can't spell... 2007-10-10 13:47:33 -05:00
Andrew Bartlett
e48464c884 r12383: Fixes for Apple's AD client. Don't segfualt in the KDC, and they
require the isSynchronized flag in the rootDSE.

Andrew Bartlett
2007-10-10 13:47:33 -05:00
Andrew Bartlett
6b75573df4 r11995: A big kerberos-related update.
This merges Samba4 up to current lorikeet-heimdal, which includes a
replacement for some Samba-specific hacks.

In particular, the credentials system now supplies GSS client and
server credentials.  These are imported into GSS with
gss_krb5_import_creds().  Unfortunetly this can't take an MEMORY
keytab, so we now create a FILE based keytab as provision and join
time.

Because the keytab is now created in advance, we don't spend .4s at
negprot doing sha1 s2k calls.  Also, because the keytab is read in
real time, any change in the server key will be correctly picked up by
the the krb5 code.

To mark entries in the secrets which should be exported to a keytab,
there is a new kerberosSecret objectClass.  The new routine
cli_credentials_update_all_keytabs() searches for these, and updates
the keytabs.

This is called in the provision.js via the ejs wrapper
credentials_update_all_keytabs().

We can now (in theory) use a system-provided /etc/krb5.keytab, if

krb5Keytab: FILE:/etc/krb5.keytab

is added to the secrets.ldb record.  By default the attribute

privateKeytab: secrets.keytab

is set, pointing to allow the whole private directory to be moved
without breaking the internal links.
2007-10-10 13:46:56 -05:00
Andrew Bartlett
b3929230b2 r11990: Set the password set time as 'now', so it isn't expired back in 2004.
Andrew Bartlett
2007-10-10 13:46:55 -05:00
Andrew Tridgell
4b56c129c6 r11956: removed the old rootdse.ldif, and the provision.js code that uses it 2007-10-10 13:46:50 -05:00
Andrew Tridgell
cfab88fcc2 r11954: add the static rootdse content to the sam ldb,and enable the rootdse
module in @MODULES
2007-10-10 13:46:50 -05:00
Andrew Tridgell
bee45531ea r11499: added a minimal set of display specifiers for mmc to use to display
the core elements of a Samba4 domain
2007-10-10 13:45:45 -05:00
Andrew Tridgell
cbbce4fe40 r11496: add a minimal ads-compatible schema into our sam.ldb setup. This is
needed for mmc management of Samba4.
2007-10-10 13:45:45 -05:00
Andrew Bartlett
8ed6156280 r11357: Add more standard 'servicePrincaipalName' entries to our host account
in provision.

Andrew Bartlett
2007-10-10 13:45:24 -05:00
Andrew Bartlett
ab5dbbe10a r11239: Use ${REALM} for the realm in rootdse.ldif
Add the kpasswd server to our KDC, implementing the 'original' and
Microsoft versions of the protocol.

This works with the Heimdal kpasswd client, but not with MIT, I think
due to ordering issues.  It may not be worth the pain to have this
code go via GENSEC, as it is very, very tied to krb5.

This gets us one step closer to joins from Apple, Samba3 and other
similar implementations.

Andrew Bartlett
2007-10-10 13:45:06 -05:00
Andrew Bartlett
10d692a1c2 r11222: Small provision fixes: canonicalName is now generated, and the DC=
list should be from the dnsdomain (ie lowercae).

Andrew Bartlett
2007-10-10 13:45:05 -05:00
Andrew Bartlett
90642d54e0 r11218: Always return the mutual authentication reply (needed for kpasswd),
and remove now duplicated unwrap_pac().

Andrew Bartlett
2007-10-10 13:45:04 -05:00
Andrew Bartlett
7e01ff11fd r11208: Add DNS entries for finding the kpasswd server to the default zone.
Andrew Bartlett
2007-10-10 13:45:02 -05:00
Andrew Bartlett
205f77c579 r11200: Reposition the creation of the kerberos keytab for GSSAPI and Krb5
authentication.  This pulls the creating of the keytab back to the
credentials code, and removes the special case of 'use keberos keytab
= yes' for now.

This allows (and requires) the callers to specify the credentials for
the server credentails to GENSEC.  This allows kpasswdd (soon to be
added) to use a different set of kerberos credentials.

The 'use kerberos keytab' code will be moved into the credentials
layer, as the layers below now expect a keytab.

We also now allow for the old secret to be stored into the
credentials, allowing service password changes.

Andrew Bartlett
2007-10-10 13:45:00 -05:00
Andrew Tridgell
7e338c23f5 r11113: fixed two small bugs in newuser
- randpass() is now in the random ejs module, not global

- don't dereference the undefined variable on getopt failure
2007-10-10 13:44:52 -05:00
Stefan Metzmacher
9f3b6746d8 r11087: - add type,name,scope as attributes to winsRecords,
so you can use them in search filters,
  only for administration not used inside the winserver code
- fix the samba3 ugrade scripts to create a correct samba4 wins.ldb

metze
2007-10-10 13:44:46 -05:00
Andrew Tridgell
68c5f807fd r10955: finally worked out why our computer accounts were being identified as users in mmc.
The problem was that the samdb module was auto-adding objectClass=user
for these accounts. That would be OK, as computer accounts are
supposed to be in that objectClass, but mmc cares about the order of
the values in the objectClass attribute! It looks for the last value,
and takes that as the value to use when deciding how to manipulate the record.

So, this patch adds an explicit objectClass=user to the record when it
gets created, which tells the samdb module to not add it as well. That
fixes the order. I suspect we are missing something else though - is
objectClass supposed to auto-sort based on the schema?
2007-10-10 13:39:48 -05:00
Andrew Tridgell
61e8b01022 r10916: - finished the 'operational' ldb module
- removed the timestamps module, replacing it with the operational module

- added a ldb_msg_copy_shallow() function which should be used when a module
  wants to add new elements to a message on add/modify. This is needed
  because the caller might be using a constant structure, or may want to
  re-use the structure again

- enabled the UTC time attribute syntaxes in the operational module
2007-10-10 13:39:42 -05:00
Andrew Bartlett
e4fe5802da r10855: Put the domain SID in secrets.ldb by default, and add http as a
default SPN alias.

Andrew Bartlett
2007-10-10 13:39:37 -05:00
Andrew Bartlett
31e755c2ce r10314: Apply the controvertial 'server role =' patch after discussion on the list:
This patch removes the 'domain logon' and 'domain master' controls from
Samba4, in favour of a 'server role =' that users can actually
understand.

We can expand the list of roles as needed, and nobody has to figure out
what a 'domain master' actually means.

Andrew Bartlett
2007-10-10 13:38:16 -05:00
Jelmer Vernooij
87f25fe49c r10190: Do some very basic input checking when provisioning. 2007-10-10 13:38:06 -05:00
Jelmer Vernooij
a143234ac7 r9951: Add another value to the default HKLM.
Convert Samba3 policy "refuse machine pw change" to registry value.
2007-10-10 13:36:24 -05:00
Jelmer Vernooij
7666993fa9 r9898: Add extra registry key used by WinXP (see r9894) 2007-10-10 13:36:21 -05:00
Jelmer Vernooij
d2db164d6f r9834: More tests for the upgrade from Samba3 2007-10-10 13:36:17 -05:00
Jelmer Vernooij
96ccbd6402 r9829: Registry key and value names are case insensitive 2007-10-10 13:36:16 -05:00
Jelmer Vernooij
488d737fb0 r9816: Work on testsuite for upgrade
Add 'paths' object to provision code.
2007-10-10 13:35:04 -05:00
Jelmer Vernooij
27eefbd905 r9805: Add 'data' property to param EJS object
Write out new smb.conf file. Parameters that have disappeared
between Samba 3 and 4 will optionally be prefixed with 'samba3:'
2007-10-10 13:35:03 -05:00
Jelmer Vernooij
b7c09df9e5 r9793: Be more verbose, check for errors in upgrade script. 2007-10-10 13:35:02 -05:00
Jelmer Vernooij
eb9d615bcd r9786: Move ldb_map into ldb/modules/
Move samba3sam to dsdb/
2007-10-10 13:35:01 -05:00
Jelmer Vernooij
8baa2ac377 r9754: Upgrading with the command line utility now works, at least partially (-:
Upgrading using SWAT should work as well now.
2007-10-10 13:34:56 -05:00
Jelmer Vernooij
435e4c6389 r9744: - [upgrade.js] Start working on smb.conf conversion.
- [ldb_map] Support storing non-mappable data in a fallback LDB
2007-10-10 13:34:55 -05:00
Jelmer Vernooij
d569465dc4 r9735: More work on generating a valid Samba4 configuration using the
Samba3 data (both console and SWAT)
2007-10-10 13:34:55 -05:00
Andrew Tridgell
804f2485d0 r9646: fixed error message 2007-10-10 13:34:37 -05:00
Rafal Szczesniak
1990793b23 r9477: Convert popt options to an ejs object. Doesn't seem to break anything
except of popt help (-h) option (unexpected ?).

rafal
2007-10-10 13:34:20 -05:00