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>”
log.samba shows the following modify for the user logging in:
ldb: ldb_trace_request: MODIFY
control: 1.2.840.1135220.127.116.113 crit:0 data:no
control: 18.104.22.168.4.1.722.214.171.124 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
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.
*** 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.