Bug 40298 - sync samba msPrint-ConnectionPolicy objects
sync samba msPrint-ConnectionPolicy objects
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: S4 Connector
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.1-0-errata
Assigned To: Felix Botner
Arvid Requate
:
Depends on:
Blocks: 45218 32041 40299 40300 40459 40467
  Show dependency treegraph
 
Reported: 2015-12-18 15:22 CET by Felix Botner
Modified: 2017-08-17 19:54 CEST (History)
1 user (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
test_1448331103.log (23.43 KB, text/plain)
2015-12-21 21:49 CET, Arvid Requate
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Botner univentionstaff 2015-12-18 15:22:08 CET
We need that for printer gpo's in ucs@school.
Comment 1 Felix Botner univentionstaff 2015-12-18 15:46:04 CET
fixed in univention-s4-connector 10.0.1-5.596.201512181532 in errata4.1-0

https://msdn.microsoft.com/en-us/library/ms682551%28v=vs.85%29.aspx - window msPrint-ConnectionPolicy spec

Example samba object:
dn: CN={356C319B-F89E-4FB6-BB5F-83F57E45CEF7},CN=PushedPrinterConnections,CN=User,CN={ACD32CD8-FC4E-4DC9-A3B1-8FA85C45CB33},CN=Policies,CN=System,DC=four,DC=one
objectClass: top
objectClass: msPrint-ConnectionPolicy
cn: {356C319B-F89E-4FB6-BB5F-83F57E45CEF7}
instanceType: 4
whenCreated: 20151211235919.0Z
whenChanged: 20151211235919.0Z
uSNCreated: 3949
showInAdvancedViewOnly: TRUE
name: {356C319B-F89E-4FB6-BB5F-83F57E45CEF7}
objectGUID: 0ab2135e-5222-4b67-b1e8-de1568460740
objectCategory: CN=ms-Print-ConnectionPolicy,CN=Schema,CN=Configuration,DC=fou
 r,DC=one
uNCName: \\slave\printer1
serverName: \\slave
printerName: printer1
printAttributes: 0
uSNChanged: 3950
distinguishedName: CN={356C319B-F89E-4FB6-BB5F-83F57E45CEF7},CN=PushedPrinterC
 onnections,CN=User,CN={ACD32CD8-FC4E-4DC9-A3B1-8FA85C45CB33},CN=Policies,CN=S
 ystem,DC=four,DC=one


* added ldap schema for ldap msPrintConnectionPolicy objectclass (as 
  counterpart for the windows msPrint-ConnectionPolicy class)

* added udm handler settings/msprintconnectionpolicy to access 
  msPrintConnectionPolicy

* added mapping for msPrintConnectionPolicy 
  UCS - Samba
  name -> cn
  description -> description
  displayName -> displayName
  msPrintAttributes -> printAttributes
  msPrinterName -> printerName
  msPrintServerName -> serverName
  msPrintUNCName -> uNCName

* increased version in join script, register schema and udm module in join 
  script and resync samba '(objectClass=msPrint-ConnectionPolicy)' objects
  during update if connector/s4/mapping/msprintconnectionpolicy is true

* by default connector/s4/mapping/msprintconnectionpolicy is not set 
  (msPrint-ConnectionPolicy not synced)

YAML: univention-s4-connector.yaml
Comment 2 Felix Botner univentionstaff 2015-12-21 16:57:25 CET
ucs-test: added 52_s4connector/405sync_msprintconnectionpolicy
Comment 3 Arvid Requate univentionstaff 2015-12-21 21:49:42 CET
Created attachment 7383 [details]
test_1448331103.log

The UDM module and sync mapping code works.

TODO: The test failed, see attached log, I guess the base GPO-Container obejct needs to be created first.

TODO: A translation file is missing, in a german UMC I see this in the LDAP module:

   Settings: MS Print Connection Policy



One observation, probably Ok:

After updating univention-s4-connector on the UCS DC Master I did this:

1. Create a printer distribution GPO from a Windows 7 client
2. ucr set connector/s4/mapping/msprintconnectionpolicy=yes
3. /usr/share/univention-s4-connector/resync_object_from_s4.py \
   --filter '(objectClass=msPrint-ConnectionPolicy)'

Then I got this reject:
===========================================================================
UCS rejected


S4 rejected

    1:    S4 DN: CN={61C348E4-7E03-453A-8567-FA7CE251C5D3},CN=PushedPrinterConnections,CN=Machine,CN={7B07DB58-C587-4BBF-9FBB-5E4084D46B16},CN=Policies,CN=System,DC=ar41i1,DC=qa
         UCS DN: <not found>

        last synced USN: 3994
===========================================================================

The reject resolves when I do

/etc/init.d/univention-s4-connector restart


I guess that's ok, because that's what the joinscript would have done if I would have set the new UCR variable before the update. I guess bug 40300 will set the UCR variable for UCS@school installations (and trigger the sync once again).

Maybe some more info should be added to the advisory, because as it stands, setting the UCR is definitely not enough. Maybe something like: "This is required for UCS@school and will be set there accordingly."
Comment 4 Felix Botner univentionstaff 2015-12-22 10:33:41 CET
(In reply to Arvid Requate from comment #3)

> TODO: The test failed, see attached log, I guess the base GPO-Container
> obejct needs to be created first.

fixed, the test now uses the default policy 
31B2F340-016D-11D2-945F-00C04FB984F9 (to lazy to create a new one).
> 
> TODO: A translation file is missing, in a german UMC I see this in the LDAP
> module:

added

> One observation, probably Ok:
> 
> After updating univention-s4-connector on the UCS DC Master I did this:
> 
> 1. Create a printer distribution GPO from a Windows 7 client
> 2. ucr set connector/s4/mapping/msprintconnectionpolicy=yes
> 3. /usr/share/univention-s4-connector/resync_object_from_s4.py \
>    --filter '(objectClass=msPrint-ConnectionPolicy)'
> ...
changed the advisory:
 * msPrint-ConnectionPolicy objects are now synced if the UCR
   variable connector/s4/mapping/msprintconnectionpolicy is set to true
   (the s4 connector has to be restarted after changing this UCR variable).
   This is required for UCS@school and will be set there accordingly.
is that enough?
Comment 5 Arvid Requate univentionstaff 2015-12-22 13:52:35 CET
Ok: Translation, test, advisory.
Comment 6 Arvid Requate univentionstaff 2015-12-22 16:04:44 CET
<http://errata.software-univention.de/ucs/4.1/39.html>