Wednesday 17 October 2007

CUPS and lpd jobs

On a couple of occasions I've updated CUPS print servers that are receiving jobs by lpd (one from OpenVMS and one from SCO OpenServer)

In both instances the jobs are simple plain text just to be thrown out again, usually to a dot matrix printer.

Some gotchas occurred in both cases!

Firstly, as of CUPS 1.2, the default is for banner pages to be printed on lpd received jobs. This is compounded by the fact that the banners are postscript and I'm sending jobs on raw to dot matrix printers - which don't make a great job of interpreting postscript!

The solution for that one is to amend the line in inetd.conf which runs the cups lpd server to look like:

printer stream tcp nowait lp /usr/lib/cups/daemon/cups-lpd cups-lpd -o job-sheets=none,none -o document-format=text/plain

thereby forcing the lack of banners and the document format.

The other problem I had was in the set up that receives jobs from the SCO box. This was a CUPS authentication issue. The lpd daemon calls CUPS to inject print jobs, but doesn't do any authentication as it does so. So the areas that it needs access to (/printers and /jobs) need to be able to be accessed without authentication.

The cupsd.conf for the server in question had:

<Location /jobs>
AuthType Basic
AuthClass User
</Location>

Thereby requiring authentication for /jobs which the lpd daemon wasn't passing on.

No comments: