Hi! Not a very descriptive title I know, but one that describes exactly how I’ve been feeling for the last couple of days. I’ve been fighting with CUPS on one of my servers. I’ve seen a lot of forum posts all over the web wondering why they can’t seem to add local printers connected via USB/parallel… I finally understand why. Apparently entering your root password into the CUPS web interface doesn’t give you root permissions, it just allows you to access the admin features of the GUI. Here was my misunderstanding… The 3 second fix for this:
chmod a+rw /dev/usb/lp*
Wasn’t that easy? If you now go to the web interface at http://localhost:631 (assuming you have activated it), when you add a printer, it’ll pick it up straight away. Now just follow the prompts, and if necessary choose a PPD and you’re away!
The problem I immediately see is that if the printers become detached from the machine the permissions will revert on plugin. It would be pretty easy to write a UDEV rule which counteracts this… It’d read something like this:
KERNEL="lp*", RUN+="chmod a+rw /dev/usb/lp*"
Also, note that this is by no means the best way to do this… chmod-ing a device a+rw in a business environment is a BAD IDEA. A better way to do it would be create a script which chmods the device g+rw then changes the ownership of the device to root:(group of users). Then all you’d have to do is add anybody who you want to have access to the printer to that group.
Anyway… Hope this has been useful for some of you.