A Windows 2008 R2 Terminal Server License Server (configured for "per User" CALs) is not able to save the msTSExpireDate (<http://msdn.microsoft.com/en-us/library/cc220557.aspx>) attribute on the user object in S4. System eventlog shows the event 4105 at user login: The Terminal Services license server cannot update the license attributes for user “<UserName>” in Active Directory Domain “<DomainName>” <http://support.microsoft.com/kb/2030310/en-us> log.samba shows the following modify for the user logging in: ldb: ldb_trace_request: MODIFY dn: CN=testuser1,CN=Users,DC=foo,DC=bar changetype: modify replace: msTSManagingLS msTSManagingLS: 00486-237-9937597-84351 - replace: msTSLicenseVersion msTSLicenseVersion: 393216 - replace: msTSExpireDate msTSExpireDate: 20130616160028.000Z - control: 1.2.840.113556.1.4.1413 crit:0 data:no control: 1.3.6.1.4.1.7165.4.3.17 crit:0 data:no Running into the following error validating/normalizing the value for msTSExpireDate: ldb: ldb_asprintf/set_errstring: objectclass_attrs: attribute 'msTSExpireDate' on entry 'CN=butzer,CN=Users,DC=s4lish,DC=qa' contains at least one invalid value! It looks like the function "ldb_val_to_time" (lib/ldb/common/ldb_msg.c) does not recognize the .000Z time format.
Created attachment 8784 [details] Patch courtesy of http://www.snix.com/wiki/index.php/Samba_4
I also have this problem. We get event 4105 from Terminal Services Licencing service on Windows Server 2012 R2. Our AD is: # samba --version Version 4.1.4-Debian
I can confirm that the attached patch fixes the issue for me. Side note: I am running debian-jessie version of samba here and I had to apply the patch to ldb package not samba package. They both contain ldb_msg.c but I found out (the hard way) that the one in the samba package is not used. I don't know if this matters upstream or not. Thank you, Robert
*** Bug 10709 has been marked as a duplicate of this bug. ***
Where in the sources are the torture tests for existing date formats located? I want to have a look at it. Maybe I can adapt an existing test to this new format without much knowledge, to get this patch into the official version quickly. :-)
(In reply to comment #5) > Where in the sources are the torture tests for existing date formats located? I > want to have a look at it. Maybe I can adapt an existing test to this new > format without much knowledge, to get this patch into the official version > quickly. :-) lib/ldb/tests/python/api.py or lib/ldb/tests/schema-tests/schema-add-test.ldif, but "git grep '\.0Z' source4/dsdb/tests/" shows nothing.
Is this a showstopper for 4.2.0?
no regression, no blocker
Created attachment 10662 [details] Patches for v4-2-test
Karolin, please add the patch to 4.2. Thanks!
Pushed to autobuild-v4-2-test.
Pushed to v4-2-test. Closing out bug report. Thanks!