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

112 Commits

Author SHA1 Message Date
Jelmer Vernooij
c95cac9420 r13063: Add --realm option to upgrade
(This used to be commit e6aa4e92f0)
2007-10-10 13:51:20 -05:00
Andrew Bartlett
ba07f94438 r12945: Try to move closer to getting Samba3 import working again.
There still a few things to work out

Andrew Bartlett
(This used to be commit 701558b5fe)
2007-10-10 13:51:12 -05:00
Andrew Bartlett
d59667fd21 r12944: Update scripts in setup to match changes in the provision.js
DNS is now done as a seperate step, to assist in migrations.

Andrew Bartlett
(This used to be commit 916607d1d0)
2007-10-10 13:51:11 -05:00
Andrew Bartlett
c96b572386 r12943: Generate a SID for the domain join account using the modules, rather
than a hardcoded SID.

Fix the samldb module to return the what *was* the nextrid, rather
than the new nextrid (that is for next time).

Andrew Bartlett
(This used to be commit ffe9042e15)
2007-10-10 13:51:11 -05:00
Simo Sorce
3725b1817f r12941: Add Attribute Scoped Search control
want to see what it does ?

do aq make test and try:
./bin/ldbsearch -H st/private/sam.ldb --controls=asq:1:member -s base -b 'CN=Administrators,CN=Builtin,DC=samba,DC=example,DC=com' 'objectclass=*'

have fun.
simo.
(This used to be commit 900f4fd343)
2007-10-10 13:51:11 -05:00
Simo Sorce
d45a8de617 r12905: add some ldap policies
not yet enforced except for the initial connection timeout
(This used to be commit fa1ae9a44b)
2007-10-10 13:51:01 -05:00
Andrew Bartlett
8c9d212f2a 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
(This used to be commit 1fbe09ce81)
2007-10-10 13:49:51 -05:00
Andrew Bartlett
27f997e682 r12749: Fix the newuser script.
Andrew Bartlett
(This used to be commit 42cdad5e3f)
2007-10-10 13:49:49 -05:00
Andrew Bartlett
a8eec31354 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
(This used to be commit be9d0cae89)
2007-10-10 13:49:48 -05:00
Simo Sorce
b51fe793c7 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.
(This used to be commit 4c685ac0d1)
2007-10-10 13:49:48 -05:00
Andrew Bartlett
8f4dc51345 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
(This used to be commit b349d2fbfe)
2007-10-10 13:49:48 -05:00
Andrew Bartlett
ff90c1c5c3 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
(This used to be commit 8e608dd4bf)
2007-10-10 13:49:45 -05:00
Andrew Bartlett
4bfe2907e7 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
(This used to be commit 097d9d0b7f)
2007-10-10 13:49:45 -05:00
Andrew Bartlett
bedfb06326 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
(This used to be commit 61700252e0)
2007-10-10 13:49:38 -05:00
Andrew Bartlett
5c03e1b46e 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
(This used to be commit 1a9992e56a)
2007-10-10 13:49:09 -05:00
Andrew Bartlett
c139e0eefa r12625: More 'useful' names for the DNS zone.
Andrew Bartlett
(This used to be commit 660fc3ff4e)
2007-10-10 13:49:07 -05:00
Andrew Bartlett
4ff20fcd31 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
(This used to be commit 41948c4bdb)
2007-10-10 13:49:01 -05:00
Andrew Bartlett
c82c9fe7bb 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.
(This used to be commit e902274321)
2007-10-10 13:49:01 -05:00
Andrew Bartlett
1c027f35d7 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
(This used to be commit 0aaff059ba)
2007-10-10 13:49:01 -05:00
Andrew Tridgell
d34e1e598d r12536: kerberos is on port 88, not port 389
i guess this shows that MS clients ignore the port number in SRV replies
(This used to be commit ce070ef50f)
2007-10-10 13:47:53 -05:00
Andrew Bartlett
77f4910b57 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
(This used to be commit c4520ba2e6)
2007-10-10 13:47:37 -05:00
Andrew Bartlett
2dc21b833a r12384: I can't spell...
(This used to be commit 566bbfd067)
2007-10-10 13:47:33 -05:00
Andrew Bartlett
4a56399798 r12383: Fixes for Apple's AD client. Don't segfualt in the KDC, and they
require the isSynchronized flag in the rootDSE.

Andrew Bartlett
(This used to be commit e48464c884)
2007-10-10 13:47:33 -05:00
Andrew Bartlett
9c6b7f2d62 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.
(This used to be commit 6b75573df4)
2007-10-10 13:46:56 -05:00
Andrew Bartlett
20f0e18854 r11990: Set the password set time as 'now', so it isn't expired back in 2004.
Andrew Bartlett
(This used to be commit b3929230b2)
2007-10-10 13:46:55 -05:00
Andrew Tridgell
09932e0383 r11956: removed the old rootdse.ldif, and the provision.js code that uses it
(This used to be commit 4b56c129c6)
2007-10-10 13:46:50 -05:00
Andrew Tridgell
4ccadc164e r11954: add the static rootdse content to the sam ldb,and enable the rootdse
module in @MODULES
(This used to be commit cfab88fcc2)
2007-10-10 13:46:50 -05:00
Andrew Tridgell
40b1305996 r11499: added a minimal set of display specifiers for mmc to use to display
the core elements of a Samba4 domain
(This used to be commit bee45531ea)
2007-10-10 13:45:45 -05:00
Andrew Tridgell
4764eb7a93 r11496: add a minimal ads-compatible schema into our sam.ldb setup. This is
needed for mmc management of Samba4.
(This used to be commit cbbce4fe40)
2007-10-10 13:45:45 -05:00
Andrew Bartlett
efa0106627 r11357: Add more standard 'servicePrincaipalName' entries to our host account
in provision.

Andrew Bartlett
(This used to be commit 8ed6156280)
2007-10-10 13:45:24 -05:00
Andrew Bartlett
16bbafb7e8 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
(This used to be commit ab5dbbe10a)
2007-10-10 13:45:06 -05:00
Andrew Bartlett
17be61b7b9 r11222: Small provision fixes: canonicalName is now generated, and the DC=
list should be from the dnsdomain (ie lowercae).

Andrew Bartlett
(This used to be commit 10d692a1c2)
2007-10-10 13:45:05 -05:00
Andrew Bartlett
d820c353dc r11218: Always return the mutual authentication reply (needed for kpasswd),
and remove now duplicated unwrap_pac().

Andrew Bartlett
(This used to be commit 90642d54e0)
2007-10-10 13:45:04 -05:00
Andrew Bartlett
4c4fbda7da r11208: Add DNS entries for finding the kpasswd server to the default zone.
Andrew Bartlett
(This used to be commit 7e01ff11fd)
2007-10-10 13:45:02 -05:00
Andrew Bartlett
372ca26b20 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
(This used to be commit 205f77c579)
2007-10-10 13:45:00 -05:00
Andrew Tridgell
bb3a915c9d 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
(This used to be commit 7e338c23f5)
2007-10-10 13:44:52 -05:00
Stefan Metzmacher
c3c26c9008 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
(This used to be commit 9f3b6746d8)
2007-10-10 13:44:46 -05:00
Andrew Tridgell
6b7d7f22e7 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?
(This used to be commit 68c5f807fd)
2007-10-10 13:39:48 -05:00
Andrew Tridgell
3572073491 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
(This used to be commit 61e8b01022)
2007-10-10 13:39:42 -05:00
Andrew Bartlett
51d2ae6e8d r10855: Put the domain SID in secrets.ldb by default, and add http as a
default SPN alias.

Andrew Bartlett
(This used to be commit e4fe5802da)
2007-10-10 13:39:37 -05:00
Andrew Bartlett
a388d683de 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
(This used to be commit 31e755c2ce)
2007-10-10 13:38:16 -05:00
Jelmer Vernooij
342d229b40 r10190: Do some very basic input checking when provisioning.
(This used to be commit 87f25fe49c)
2007-10-10 13:38:06 -05:00
Jelmer Vernooij
aae4b1a951 r9951: Add another value to the default HKLM.
Convert Samba3 policy "refuse machine pw change" to registry value.
(This used to be commit a143234ac7)
2007-10-10 13:36:24 -05:00
Jelmer Vernooij
6ff97621fa r9898: Add extra registry key used by WinXP (see r9894)
(This used to be commit 7666993fa9)
2007-10-10 13:36:21 -05:00
Jelmer Vernooij
0712cbdab4 r9834: More tests for the upgrade from Samba3
(This used to be commit d2db164d6f)
2007-10-10 13:36:17 -05:00
Jelmer Vernooij
f118373ea4 r9829: Registry key and value names are case insensitive
(This used to be commit 96ccbd6402)
2007-10-10 13:36:16 -05:00
Jelmer Vernooij
f58a74aaba r9816: Work on testsuite for upgrade
Add 'paths' object to provision code.
(This used to be commit 488d737fb0)
2007-10-10 13:35:04 -05:00
Jelmer Vernooij
cf016f972b 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:'
(This used to be commit 27eefbd905)
2007-10-10 13:35:03 -05:00
Jelmer Vernooij
6cf1b0c07c r9793: Be more verbose, check for errors in upgrade script.
(This used to be commit b7c09df9e5)
2007-10-10 13:35:02 -05:00
Jelmer Vernooij
f9447d2a17 r9786: Move ldb_map into ldb/modules/
Move samba3sam to dsdb/
(This used to be commit eb9d615bcd)
2007-10-10 13:35:01 -05:00