How can I change/map/force originating-user-name attibute for a printer?

Kurt Pfeifle kurt.pfeifle at infotec.com
Mon Jul 2 14:51:52 PDT 2007


> Using my GNU/Linux notebook I'm trying to print using a printer
> shared on a Windows with something like smb://xxx:yyy@host/printer
> it works because the job appears in the windows print-queue, but
> the problem is that "xxx" isn't equal to my linux username account
> and when the printer (a Canon iR2880) receive the job it discard
> the document probably because it expects a document generated
> by "xxx" instead of "mrfree".

Does this printer use any feature like "locked printing" or "secure printing" or similar, where only authenticated/known users can retrieve their jobs after typing in a PIN into the printer console?

Are you sure you are sending the jobfile in a format which is not understood by the printer?

Is this a PostScript printer?

Which PPD do you use on the CUPS side for it? What is the complete line starting with "*cupsFilter" in this PPD?

> I think the optimal solution consists in overwrite "originating-user-name"
> attribute with the user used to authenticate (in this case "xxx"),
> Does exist any options in printers.conf (for example) to force this
> behavior?

If you are using already the Windows "username:password" encoded in the smb-URL (which in general is a very unsecure thing to do, and only an "emergency crutch" to use for lack of better means), then it means that you can not do anything else here.

If you are part of an Active Directory, you may want to look at the package "samba-krb-printing" (at least that is  what it is called on openSUSE 10.2). It was written by the Jeremy Allison from the Samba Team as wrapper for the  current "smbspool" utility (the one you are using right now) that uses Kerberos. Have a look:

----------------- snip --------------------------------------------------------

#~> rpm -qivlf /usr/bin/get_printing_ticket
Name        : samba-krb-printing            Relocations: (not relocatable)
Version     : 3.0.25                             Vendor: (none)
Release     : 4.ccj1                         Build Date: Tue May 22 20:57:58 2007
Install Date: Mon Jul  2 20:36:04 2007       Build Host: ichi
Group       : Productivity/Networking/Samba  Source RPM: samba-3.0.25-4.ccj1.src.rpm
Size        : 5968                              License: GNU General Public License (GPL)
Signature   : DSA/SHA1, Tue May 22 21:23:12 2007, Key ID f7680582844c4360
Packager    : Jan Engelhardt <jengelh [at] gmx de>
URL         : http://www.samba.org/
Summary     : Wrapper binary for kerberized printing
Description :
A wrapper binary to run smbspool with the original calling UID.

Authors:
--------
    Jeremy Allison <jeallison at novell dot com>

Source Timestamp: 1307
Branch      : trunk
Distribution: openSUSE 10.2
-rwsr-x---    1 root    lp     5968 May 22 20:57 /usr/bin/get_printing_ticket
drwxr-xr-x    2 root    root      0 May 22 20:57 /usr/lib/cups
drwxr-xr-x    2 root    root      0 May 22 20:57 /usr/lib/cups/backend
-rw-r--r--    1 root    root      0 May 22 20:57 /usr/lib/cups/backend/smb

----------------- snap --------------------------------------------------------


Cheers,
Kurt

--
Kurt Pfeifle
System & Network Printing Consultant --- Linux/Unix/Windows/Samba/CUPS
Infotec Deutschland GmbH - A RICOH Company ......... Stuttgart/Germany





More information about the cups mailing list