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/adam/cups/cupsd.conf)
<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.
More Articles by Anthony Lawrence - Find me on Google+
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. We appreciate comments and article submissions.
Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.
Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.
We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.
Click here to add your comments
Don't miss responses! Subscribe to Comments by RSS or by Email
Click here to add your comments
If you want a picture to show with your comment, go get a Gravatar