Set username to send to remote LPD/LPR print queue

Brett Ussher breusshe at hotmail.com
Thu Mar 5 17:18:53 PST 2009


Actually, Michael and rca1, found out how to do this.

rca1, do the following:

1.  Create a new system user on your linux box that is the same as the network ID you use when logging into your school network. So, following your example, that new user account would be called "schooluser".

2.  Issue the following command from a command prompt.  I am assuming the linux Pharos queue you created is called "myPrinter", change as necessary:

sudo lpadmin -p myPrinter -o job-originating-user-name-default=schooluser

This will add the print queue option "job-originating-user-name" to your printer definition for the Pharos queue in printers.conf (might find this file at /etc/cups) and set it to "schooluser".  The "-default" part of the command is what makes it system-wide.  Run it under sudo or as root so that the command will take.

3.  Restart the cups daemon (sudo "/etc/init.d/cups restart" for Ubuntu).

Once the new linux account and this lpadmin command is run and the cups daemon is restarted, it should print with the correct Pharos username.  Give it a try and let me know.  The above worked for me, so it should for you.  If it does not, you might need to check with your Pharos Administrator since the header information coming from a CUPS server will add extra content that Pharos is not expecting.  This causes the username to appear, but with additional info that will confuse Pharos.  If that is the case your Pharos admin can see what the username that is coming through (via the Pharos logs) and make a filter on the Pharos server app that will strip this extra content.  I know that BYU had to do this and my school (SIUC) had to also.

Anyhow, good luck.

Brett

> Hey, Michael;
>
> What if the Pharos queues were IPP print queues?  Could the format for the DeviceURI be:
>
> ipp://username@printer_ip ?
>
> Would that properly convert the usernames being sent by the jobs to one the Pharos system is looking for?
>
> Brett
>
> > rca1 wrote:
> > > My school uses the Pharos print system, which requires sending the
> > > correct username to the campus printers. If my local login on Linux
> > > is "localuser" but my username for school is "schooluser", how do I
> > > tell CUPS to send the username "schooluser" when it prints, no matter
> > > what my local username is? The queue is LPD/LPR.
> >
> > There is no way to do this, sorry.
> >
> > --
> > ______________________________________________________________________
> > Michael Sweet, Easy Software Products           mike at easysw dot com
> > Internet Printing and Publishing Software        http://www.easysw.com
>





More information about the cups mailing list