job-originating-user-name not working suddenly?

Brett Ussher breusshe at hotmail.com
Fri Mar 20 16:54:50 PDT 2009


Ok, let me try it from this angle then.  What I'm trying to do is get a print queue to do the equivalent of what using the -U option with lp does.  Job-originating-user-name was doing this for me until God knows why it stopped.  If job-originating-user-name is going to be deprecated at some point, then is there something that I can do that will make the print queue basically do a "lp -U <username>" whenever a job is pushed to it?

Also, I should say that I'm using this CUPS server more as a print spooler than a full print server.  It simply exists so that I can print my homework assignments to a printer that is attached to another print server.  Therefore, I'm making lpd:\\ queues to an <IP address\queue name>.  The reason the username is significant is because the print server uses it for billing.  There is no authentication, so to speak, since my school uses ID cards with magnetic strips.  When we print, the username that is detected by the school's print server is used to store the job.  When I'm ready to print, I swipe my ID card at a print station, choose the job I wish to print and it comes out.  My ID card acts as the authentication portion of this system.  Because of this, printing to the wrong username will only do one of two things:  drop the job due to no matching user ID's or store it for the wrong user.  Right now it is dropping my jobs due to no matching ID's.  When I use lp -U however, the job does get stored on the school's print server and I'm able to print it.  This isn't any good for me, though since lp doesn't seem to be able to do subtle things like understand openoffice.org files (apparently OOO internally converts the file to postscript before passing it to lp, as I understand it).

I thought of renaming lp to lp.real and then writing a script to take it's place that will have "lp.real -U <username> %@" in it, but I don't want a situation where all jobs are using that username, regardless of the queue.  Also, I'm not even sure if that will work for all apps since I don't fully understand how CUPS receives and pushes jobs.

Any input would be useful, thanks.

Brett

> --Apple-Mail-3--814244612
> Content-Transfer-Encoding: 7bit
> Content-Type: text/plain;
> 	charset=us-ascii;
> 	format=flowed;
> 	delsp=yes
>
> A few things:
>
> 1. Setting job-originating-user-name-default is an unintended side-
> effect of the defaults system and will probably go away in a future
> CUPS release.
>
> 2. Any time you authenticate you'll override any requesting-user-name
> or job-originating-user-name-default value since the authenticated
> user is better trusted.
>
> 3. When printing from a client system, I'm not sure the job-
> originating-user-name-default stuff will actually work on the client
> if you set the default on the server. That is, I'm not sure CUPS
> browsing sends this default, and I'm sure the other methods (SLP,
> LDAP, DNS-SD) don't.
>
> On Mar 17, 2009, at 4:28 PM, Brett Ussher wrote:
> > I set the following option on two of my queues:
> >
> > job-originating-user-name-default=<username>
> >
> > and it worked like a charm.  However, all of the sudden my print
> > jobs don't seem to be going out to the printer with the username I
> > defined.  CUPS is logging that it did use the correct username,
> > however when I used wireshark to watch the traffic going to the
> > printer, the packets show two instances where the wrong username
> > (which is the one I'm logged in with on my linux system) was sent
> > with the job.  The first packet seems to announce a job to the
> > printer server I'm printing to.  The packet states the filename of
> > what I'm printing and my linux username.  The next instance is
> > inside the postscript sent to the print server.  It has a line "%
> > %For:(username)" where username is, once again, my linux account.  I
> > need it it to use the username that I defined with job-originating-
> > user-name, why isn't it doing this all of the sudden?
> >
> > Thanks for any help you can offer,
> >
> > Brett
> > _______________________________________________
> > cups mailing list
> > cups at easysw.com
> > http://lists.easysw.com/mailman/listinfo/cups
>
> ________________________________________
> Michael R Sweet, Senior Printing System Engineer
>
>
> --Apple-Mail-3--814244612
> Content-Transfer-Encoding: quoted-printable
> Content-Type: text/html;
> 	charset=us-ascii
>
> <html><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =
> -webkit-line-break: after-white-space; ">A few =
> things:<div><br></div><div>1. Setting job-originating-user-name-default =
> is an unintended side-effect of the defaults system and will probably go =
> away in a future CUPS release.<div><br></div><div>2. Any time you =
> authenticate you'll override any requesting-user-name or =
> job-originating-user-name-default value since the authenticated user is =
> better trusted.</div><div><br></div><div>3. When printing from a client =
> system, I'm not sure the job-originating-user-name-default stuff will =
> actually work on the client if you set the default on the server. That =
> is, I'm not sure CUPS browsing sends this default, and I'm sure the =
> other methods (SLP, LDAP, DNS-SD) don't.</div><div><br></div><div>On Mar =
> 17, 2009, at 4:28 PM, Brett Ussher wrote:</div><div><div><blockquote =
> type=3D"cite"><div>I set the following option on two of my =
> queues:<br><br>job-originating-user-name-default=3D<username><br><br=
> >and it worked like a charm.  However, all of the sudden my print =
> jobs don't seem to be going out to the printer with the username I =
> defined.  CUPS is logging that it did use the correct username, =
> however when I used wireshark to watch the traffic going to the printer, =
> the packets show two instances where the wrong username (which is the =
> one I'm logged in with on my linux system) was sent with the job. =
>  The first packet seems to announce a job to the printer server I'm =
> printing to.  The packet states the filename of what I'm printing =
> and my linux username.  The next instance is inside the postscript =
> sent to the print server.  It has a line "%%For:(username)" where =
> username is, once again, my linux account.  I need it it to use the =
> username that I defined with job-originating-user-name, why isn't it =
> doing this all of the sudden?<br><br>Thanks for any help you can =
> offer,<br><br>Brett<br>_______________________________________________<br>=
> cups mailing list<br><a =
> href=3D"mailto:cups at easysw.com">cups at easysw.com</a><br>http://lists.easysw=
> ..com/mailman/listinfo/cups<br></div></blockquote></div><br><div>
> <span class=3D"Apple-style-span" style=3D"border-collapse: separate; =
> color: rgb(0, 0, 0); font-family: Monaco; font-size: 12px; font-style: =
> normal; font-variant: normal; font-weight: normal; letter-spacing: =
> normal; line-height: normal; orphans: 2; text-align: auto; text-indent: =
> 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: =
> 0px; -webkit-border-horizontal-spacing: 0px; =
> -webkit-border-vertical-spacing: 0px; =
> -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =
> auto; -webkit-text-stroke-width: 0px; "><span class=3D"Apple-style-span" =
> style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: =
> Helvetica; font-size: 12px; font-style: normal; font-variant: normal; =
> font-weight: normal; letter-spacing: normal; line-height: normal; =
> orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; =
> widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; =
> -webkit-border-vertical-spacing: 0px; =
> -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =
> auto; -webkit-text-stroke-width: 0px; "><div style=3D"word-wrap: =
> break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
> after-white-space; =
> "><div><div>________________________________________</div><div>Michael R =
> Sweet, Senior Printing System Engineer</div></div></div></span></span>
> </div>
> <br></div></div></body></html>=
>
> --Apple-Mail-3--814244612--
>





More information about the cups mailing list