Bug 55492 - Samba keeps showing deleted printers
Samba keeps showing deleted printers
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Printserver
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-2-errata
Assigned To: Arvid Requate
Julia Bremer
https://git.knut.univention.de/univen...
:
Depends on: 35068
Blocks:
  Show dependency treegraph
 
Reported: 2022-12-13 10:31 CET by Arvid Requate
Modified: 2023-02-01 17:24 CET (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.034
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2022101121000353
Bug group (optional): External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2022-12-13 10:31:57 CET
Samba keeps showing deleted printers.

The cups-printers.py listener doesn't remove printer information from its local registry and /var/cache/samba/printing/ . Looks like cleaning up these places halps avoiding the issue. Also maybe services need to be reloaded. Some investigation required. We should also write a test case for this.


+++ This bug was initially created as a clone of Bug #35068 +++

Samba and Windows clients communicate information about printers via the registry on the Samba server. This information can be retrieved from the Samba server remotely via regedt32 orlocally via this samba shell command:

net registry enumerate_recursive  'HKLM\Software\Microsoft\Windows NT\CurrentVersion\Print'

When printers are deleted via UMC this information is not cleaned up. This may potentially lead to configuration-issues when a new printer is created under the name of a previously deleted one. E.g. the name of the windows driver assigned for client side rendering may still be one for a perviously used printer hardware.

If this issues like this occur and are irritating to customers, we may remove the printer specific registry information from samba in the delete handler of the listener module cups-printers.py by something like this:

'net registry deletekey_recursive "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Print\Printers\%s"' % (printername,)
Comment 1 Arvid Requate univentionstaff 2023-01-26 17:17:30 CET
0124f7303b | Remove printer from samba registry and cache tdb too
a04528569f | minor code cleanup
945bbd93aa | minor code cleanup
8b7a0879a2 | Advisory update

Package: univention-printserver
Version: 13.0.5-2A~5.0.0.202301261714
Branch: ucs_5.0-0
Scope: errata5.0-2
Comment 2 Julia Bremer univentionstaff 2023-01-30 13:43:19 CET
OK: Printers are removed
OK: tdb file is removed
OK: error handling
OK: yaml
Verified