Improve badPwdCount, lastLogon and logonCount updates

Andrew Bartlett abartlet at samba.org
Thu Jul 7 23:46:38 UTC 2016


On Fri, 2016-07-08 at 00:50 +0200, Stefan Metzmacher wrote:
> Am 07.07.2016 um 21:30 schrieb Andrew Bartlett:
> > On Thu, 2016-07-07 at 18:25 +0200, Stefan Metzmacher wrote:
> > > Hi Andrew,
> > > 
> > > 
> > > > > > > I've reviewed the bulk of these for pwdLastSet, and have
> > > > > > > started
> > > > > > > an
> > > > > > > autobuild with them, except for the code to force
> > > > > > > specific
> > > > > > > replPropertyMetaData values, which both didn't seem to be
> > > > > > > related
> > > > > > > and
> > > > > > > broke the repl_move test.
> > > > > > 
> > > > > > Can you be more specific about that? what did you skip?
> > > > > > What
> > > > > > did it
> > > > > > break?
> > > > > 
> > > > > Run 'make test TESTS=repl_move'
> > > > > 
> > > > > The check for expected replPropertyMetaData values in
> > > > > particular.
> > > 
> > > I've fix the problem with repl_move.
> > > 
> > > It seems Windows creates a metadata stamp for logonHours on add
> > > even when it's not present.
> > > 
> > > https://git.samba.org/?p=metze/samba/wip.git;a=shortlog;h=refs/he
> > > ads/
> > > master4-pwdlastset
> > > 
> > > Should pass now. I'm currently doing a private autobuild.
> > 
> > Thanks!
> > 
> > I really appreciate your efforts here.  These look good, expect a
> > positive review and push on these shortly.
> 
> It passed once and failed with the flakey:
> 
> [1900(12998)/1929 at 2h50m11s]
> samba4.drs.repl_schema.python(promoted_dc)(promoted_dc)
> UNEXPECTED(error):
> samba4.drs.repl_schema.python(promoted_dc).repl_schema.DrsReplSchemaT
> estCase.test_classWithCustomAttribute(promoted_dc)
> REASON: Exception: Exception: Traceback (most recent call last):
>   File
> "/memdisk/metze/W/b585808/samba/source4/torture/drs/python/repl_schem
> a.py",
> line 193, in test_classWithCustomAttribute
>     self._net_drs_replicate(DC=self.dnsname_dc2,
> fromDC=self.dnsname_dc1, nc_dn=self.schema_dn)
>   File
> "/memdisk/metze/W/b585808/samba/source4/torture/drs/python/drs_base.p
> y",
> line 119, in _net_drs_replicate
>     return self.check_output(cmd_line)
>   File "bin/python/samba/tests/__init__.py", line 804, in
> check_output
>     raise BlackboxProcessError(retcode, line, p.stdout.read(),
> p.stderr.read())
> BlackboxProcessError: Command
> '/memdisk/metze/W/b585808/samba/bin/samba-tool drs replicate
> -USAMBADOMAIN/Administrator%locDCpass1 --sync-forced
> promotedvdc.samba
> .example.com localdc.samba.example.com
> CN=Schema,CN=Configuration,DC=samba,DC=example,DC=com'; exit status
> 255;
> stdout: ''; stderr: 'ERROR(<class 'samba.drs_utils.drsException'>):
> DsReplicaSync failed - drsException: DsReplicaSync failed (-
> 1073741643,
> '{Device Timeout} The specified I/O operation on %hs was not
> completed
> before the time-out period expired.')
>   File "bin/python/samba/netcmd/drs.py", line 350, in run
>     drs_utils.sendDsReplicaSync(self.drsuapi, self.drsuapi_handle,
> source_dsa_guid, NC, req_options)
>   File "bin/python/samba/drs_utils.py", line 83, in sendDsReplicaSync
>     raise drsException("DsReplicaSync failed %s" % estr)
> 
> I saw some of these UNEXPECTED(error) in the last weeks, it also
> happened with repl_move
> and others.

Yes.  I'm swamped, but this is high on my list.  I has high hopes that
this was the schema bug, but we no longer see that symptom, so this is
a different issue.  



> > While not your job at all, if you have any clues as to why, after
> > these
> > fixes, the tombstone reanimation behaviour has changed, that would
> > be
> > very helpful.
> > 
> > I'm hoping to get tombstone_reanimate restored for Samba 4.5, and
> > the
> > restored tests fail with:
> > 
> > UNEXPECTED(failure):
> > samba4.tombstone_reanimation.python.tombstone_reanimation.RestoreUs
> > erOb
> > jectTestCase.test_restore_user(ad_dc_ntvfs)
> > REASON: Exception: Exception: Traceback (most recent call last):
> >   File
> > "/data/samba/git/samba/source4/dsdb/tests/python/tombstone_reanimat
> > ion.
> > py", line 364, in test_restore_user
> >     self.assertAttributesEqual(obj, attr_orig, obj_restore,
> > attr_rest)
> >   File
> > "/data/samba/git/samba/source4/dsdb/tests/python/tombstone_reanimat
> > ion.
> > py", line 88, in assertAttributesEqual
> >     % (str(attrs_orig.difference(attrs_rest)),
> > str(attrs_rest.difference(attrs_orig))))
> > AssertionError: Actual object does not have expected attributes,
> > missing from expected (set(['pwdLastSet'])), extra (set([]))
> > 
> > I'm sure I can figure it out - presumably pwdLastSet moved from
> > some
> > common code to a special case - but any clues give me more time to
> > review your other patches ;-)
> 
> So are we expecting pwdLastSet to be there and it's not or
> the other way?

s.difference(t) 	s - t 	new set with elements in s but
not in t

It seems pwdLastSet isn't restored, but it expected it to be restored. 

I'm going to validate the test against Windows.  Currently hitting what
I assume is the minPwdLen issue that seems common across all our tests.

Andrew Bartlett

-- 
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team         https://samba.org
Samba Development and Support, Catalyst IT   
https://catalyst.net.nz/services/samba



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160708/2428258e/signature.sig>


More information about the samba-technical mailing list