Discussion:
Authenticated Printing (Linux on Linux) using CUPS and IPP
Michael Lackner
2008-03-31 13:38:41 UTC
Permalink
Hello!

I'm currently trying to set up authenticated printing (currently without SSL to eliminate another source of error). The Server is CentOS 5 with CUPS and an IPP printer share.

The clients are of different Linux flavors, but I'm currently using a Fedora Core 4 Client machine for testing.

CUPS version on CentOS 5 server: cups-1.2.4-11.14.el5_0.1
CUPS version on Fedora Core 4 client: cups-1.1.23-15.4

The Server also hosts an OpenLDAP server containing all User information. However, most clients do no system authentification against LDAP, so the users credentials will have to be transmitted using the IPP URI. On top of that, "Papercut" is installed on the server, for print accounting and some sort of billing system. However, i tried to use this with AND without the Papercut/CUPS backend wrapper, same results, so Papercut shouldn't really be the cause of my problems.

So, what I am trying to do is this:

Client connects to IPP Printserver and transmits its User Credentials. Like this:
====

ipp://<user>:<pwd>@printerhost:631/<printqueue>


Now, the server should check its own LDAP database, and look for the user and check his or her PWD. Should the credentials match, printing should occur.

On the server, the /etc/cups/cupsd.conf looks like this (iR3025N is the queues name, modified, added "AuthType" line):
====

<Location /printers/iR3025N>
AuthType Basic
Order Deny,Allow
Deny From All
Allow From All
</Location>

Again on the server, /etc/pam.d/cups looks like this (modified, added pam_ldap.so lines, commented the system-auth lines out):
====

#%PAM-1.0
#auth include system-auth
#account include system-auth
auth required pam_ldap.so
account required pam_ldap.so


The server queue uses the appropriate PPD file from Canon to render the printjobs for the iR3025N.

Now, i open Acrobat Reader on the client machine with just some file, and say "print". I select the iR3025N (it's not the default printer), and AS i select it, the print dialog hangts. As i have started Acrobat Reader from a BASH shell, i can now see a message on the shell i started Adobe Reader. It says:
====

Password for <user> on <printhost>?


Here i can enter my users password, and the printer gets selected, the printing dialog no longer hangs. Same goes for actually sending the printjob, I am again asked for my password on the shell. So, entering UN:PWD within the IPP URI doesn't seem to work at all.

On top of that, why am I not being asked with some sort of GUI popup? If i hadn't started Adobe Reader from the bash, i would have never seen the CLI dialog prompting me for a password to authenticate against the server...

I would love some solution that works seamlessly (please advise as what exactly i have to do, and how i have to configure OpenLDAP, CUPS and the CUPS clients to make this work).

It would also be nice to be able to store passwords in some hashed form (like CRYPT or SSHA), so that it's not readable as blank from the clients /etc/cups/printers.conf.

Thanks a lot for your help, i tried several guides on the web, but failed to do this so far. I guess I'm somehow missing a few details (or even the "big picture"?) here..
Tim Waugh
2008-03-31 15:51:55 UTC
Permalink
Post by Michael Lackner
On top of that, why am I not being asked with some sort of GUI popup?
If i hadn't started Adobe Reader from the bash, i would have never
seen the CLI dialog prompting me for a password to authenticate
against the server...
For what it's worth, I am working on a solution for this as part of the
system-config-printer administration and job monitoring tool in Red Hat
Enterprise Linux and Fedora.

Tim.
*/
henri
2008-04-01 00:19:33 UTC
Permalink
Sorry this is slightly off topic. PrintAgent offers CUP's print-job
authentication so I believe this is relevant to your question.

PrintAgent is a component of PrintingWorks : http://www.lucidsystems.org/printingworks

There is a demonstration available online. The demonstration is shown
on Mac OS X. However, PrintAgent is capable of providing print
authentication on most modern operating systems including RedHat as it
is written in ruby.

PrintAgent is a free download and is licensed under the GNU GPL so you
can tailor the system to meet your requirements.

Hope this helps.
Post by Michael Lackner
Post by Michael Lackner
On top of that, why am I not being asked with some sort of GUI
popup?
Post by Michael Lackner
If i hadn't started Adobe Reader from the bash, i would have never
seen the CLI dialog prompting me for a password to authenticate
against the server...
For what it's worth, I am working on a solution for this as part of
the
system-config-printer administration and job monitoring tool in Red
Hat
Enterprise Linux and Fedora.
Stefan Monnier
2008-04-01 09:16:31 UTC
Permalink
[...]
Post by Michael Lackner
<Location /printers/iR3025N>
AuthType Basic
Order Deny,Allow
Deny From All
Allow From All
</Location>
Sorry, can't help you, but I just want to point out that this is exactly
what I want to do as well. I already posted a question about it on this
list, tho not nearly as clear as yours (because I had no idea how to
even start using Basic auth), and didn't get any useful answer.
Hopefully your better formulated question will bring some concrete answer.


Stefan

Loading...