Change username in job

Dieter Schicker dilino at dilino.org
Sat Sep 23 12:19:08 PDT 2006


> Dieter Schicker wrote:
> > Hi,
> >
> > I have a small problem with cups. Before I begin let me say that I'm not a cups expert at all, just using (and loving) it. ;-)
> >
> > Let me explain:
> >
> > 1. I got a linux workstation that prints via cups to a print server
> > running cups. I'm logged in as user "dilino".
> > 2. In this linux workstation I have vmware running in NAT mode with
> > Windows XP. It's a very downsized installation of Windows XP (we only
> > need it for testing purposes with Internet Exploiter and some VB
> > scripting) with only one user account named "labwin". This user gets
> > logged in automatically in Win XP (because the authorization is already
> > done in the underlying linux). For this user I added a printer with the
> > following device URI "http://local.ip:631/printers/HP_Laserjet_8150" and
> > tried to print.
> >
> > What happens until now is that the jobs arrives at the local linux spool
> > and gets "forwarded" to the machine running the cups server
> > under the username "labwin".
> >
> > => Question: Is there a possibility to "rewrite" the username from
> > "labwin" to the linux user "dilino" (username can vary!) "on the fly" and then submit the job so that the job arrives at the print server with username "dilino".
> >
> > Any ideas?
> >
> > Many thanks in advance
> > Dieter
> Not by simple configuration. But you could set up a CUPS sever on your workstation and define
> a raw "printer" that uses a shell(Perl/Python/ or whatever)-script as a backend that
> simply executes a lp (or lpr) command as the user you want to sorward the print job
> unchanged to your print server.

Could you give me an example how to do that, please? It's enough when you point out the steps to get there, not a full explanation.

I tried with this "FakePrinter" configuration, but I get the error:
Raw printers cannot use file: devices!

I assume what I'm trying to do here is complete nonsense ... ;-)

<Printer FakePrinter>
Info FakePrinter
DeviceURI file://home/didi/fake.pl
State Stopped
StateMessage Raw printers cannot use file: devices!
StateTime 1159038908
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>

Many thanks in advance
Dieter




More information about the cups mailing list