Again: delete printer does not work

Rob Foehl rwf at loonybin.net
Wed Dec 22 16:14:05 GMT 2004


On Wed, 22 Dec 2004, Martin Zielinski wrote:

> I'm still not able to delete printers via rpc calls.
> I'm using Samba 3.0.10 with jerry's printing patch.
>
> As mentioned in an earlier post, the reason seems to be
> that lp_killunused() in param/loadparm.c does not delete autoloaded services.
> When using a simple [printers] - share, the printers are marked autoloaded in
> lp_add_one_printer() (also in param/loadparm.c).
>
> Now after deleting a printer, the logfiles are filled with error messages from
> the printing subsystem (cups).
>
> When I mark the printers as autoloaded = False, the printer is deleted.
> Nevertheless the SECDESC\printername key in ntprinters.tdb as well as the
> printers\printername.tdb remains.
>
> Please tell me, if somone (Jerry ?) is working on it.

I've been working on proper cleanups after printers are removed, as part 
of a larger printcap cleanup / overhaul.  I've been specifically 
targetting complete (and safe) removal of printers when they're deleted 
from the underlying print queue (usually CUPS, in my case).

Deleting printers via RPC is not completely handled in all cases in the 
current code, due to the way printcaps are loaded; right now, it'll call 
del_a_printer and then run the command given in the 'deleteprinter 
command' parameter.  Setting the latter to remove the printer from CUPS is 
probably your best bet for now; I'll take a look at doing this more 
consistently in the future.

-Rob


More information about the samba-technical mailing list