ESP Print Pro

I was at a Linux client yesterday who wanted a better interface to the print spooling system. I showed him the Cups graphical manager at http://localhost:631 but while he liked that more than the command line, it still wasn't what he wanted, mostly because he would like individuals to manage their own printers.

That led us into the guts of /etc/cups/cupsd.conf and beyond.

The idea was to let users access the Cups web interface and kill or restart print jobs. By default, everyone on the local network can bring up that interface, although they aren't given access to the Administration section. That's the default of Cups, however: your particular Linux distro may change that. In this case (RedHat ES), cupsd.conf is changed, and only the host machine itself can browse to Cups at 631.

That momentarily surprised me, because I hadn't encountered that before. But I knew it was a simple configuration change, and a quick Google came up with examples of changing the cupsd.conf file. Unfortunately, the examples were syntactically incorrect.

The configuration directives are very Apache-like. You have sections, and you control access:

<Location />
AuthType None
AuthClass Anonymous

Order Deny,Allow
Deny From All
Allow From 127.0.0.1
</Location>
 

The first examples I came across said to change the Allow lines:

Allow From 127.0.0.1, 192.168.0.*
 

That looks sensible, but it's not right. You actually have to do separate lines:

Allow From 127.0.0.1
Allow From 192.168.0.*
 

That's granting access to the whole lan, but we wanted to be specific, so actually used specific ip addresses. That didn't really help; you can give someone access to a particular printer:

<Location /printers/accounting>
AuthType None
AuthClass Anonymous

Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From 192.168.0.10
</Location>
 

But that still doesn't let them perform all operations. I ran across this page which implies you have to be very specific: (examples modified from http://adam.rosi-kessel.org/weblog/index.php?s=cups)

<Location /jobs>
AuthType None
AuthClass Anonymous

Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From 192.168.0.10
</Location>

<Location /admin/?op=cancel-job>
AuthType None
Order Deny,Allow
Deny From all
Allow from 192.168.0.10
Allow From 127.0.0.1
</Location>
 

And so on. But that's not what we wanted either: we wanted to give someone the ability to cancel jobs for a specific printer, and only that printer.

None of this was making the client happy anyway: too much manual editing. I felt I could put a front end around it to make these edits automatically as printers were added or changed, but why reinvent the wheel? Easy Software are the people who actually created Cups and they sell commercial versions starting at $49.00. I thought they might have a flexible and easy solution for this clients needs.

Nope.

The software they sell is "based on Cups", they say. We downloaded a demo and installed it. That was a pretty annoying process: you have to remove Cups and install numerous rpms to replace it (mostly just printer drivers). Supposedly it backs up your cups configuration, but we did our own backup just in case, and as I expected, we did need that backup later and had to reinstall Cups from rpm after removing the demo. It didn't take very long to reach the decision to do so.

While ESP Print Pro does avoid hand-editing the cupsd.conf file, it really doesn't add much: you have to know just as much about how Cups works and what needs to be added to the file; the only "advantage" is that you add directives with a web interface rather than vi. To me, that's no advantage at all.

What the client wants is pretty simple: an interface that lets him say "Joe can manage printer accounting" and so on. Joe logs in to some web page, and all he sees is "accounting" and any other printers he is allowed to manage. That's it. It's simple and direct, but this software doesn't even come close to that. I could write a wrapper around Cups that would do it, but the client thinks someone, somewhere, must already be offering a package to do this, so he's looking further.



Got something to add? Send me email.





Increase ad revenue 50-250% with Ezoic


More Articles by

Find me on Google+

© Anthony Lawrence



Kerio Samepage


Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us





Any sufficiently advanced technology is indistinguishable from magic. (Arthur C Clarke)

If you lie to the computer, it will get you. (Perry Farrar)








This post tagged: