cups print accounting and lpr -U
kevin at infogroep.be
Fri May 16 02:18:28 PDT 2008
I'm a member of a students organisation called Infogroep at the Vrije Universiteit Brussels. We manage the main computerrooms at the university and I'm responsible for the print services.
I manage a script to account each student for it's prints (they pay in advance). The script is run as a cups backend, when the accounting is done if forwards the job to the lpr backend with the correct printer. This all works very well, there is only one flaw: lpr -U
Linux and OSX users can change their username using the -U option for lpr. I'm searching for a solution to this issue, as it makes it really simple to print with someone else's username.
The printjob mentions only one username (the username one logs in with or the one provided with the -U option). So at first I thought I could path the lpr source to mention an extra variable REAL_USERNAME that contains the username the user logged in with.
Are there better ways to do this or any other solutions/thoughts that might help me?
Thanks very much,
More information about the cups