[Samba] need %u parameter for lpq command
Felipe Augusto van de Wiel
felipe at paranacidade.org.br
Tue Oct 3 17:00:03 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
On 09/29/2006 03:59 PM, Charles Bueche escreveu:
> I'm developing a script for "lpq command". It would need a %U
> option so that the script can know which user asked for the
> job list. Currently, lpq command seem to only serve %p. Is
> there any hope to get %U ?
I'm not quite sure about what exactly you are asking, but
if you talking about the 'lpq command' parameter on the smb.conf,
you should be able to use the common variables. The real question
is: "the lpq command that you are using has support to username?"
I'm using etch on my desktop, 'man lpq' told me that lpq
supports -U, so you should be able to use:
lpq command = /usr/bin/lpq -P%p -U%u
> I see that my script run as root, so I assume the calling
> user info is lost ?
Hmmm... the Samba should be able to pass the right
information of who is connecting to the share (or querying
the printer) even if the command is running as root.
Felipe Augusto van de Wiel <felipe at paranacidade.org.br>
Coordenadoria de Tecnologia da Informação (CTI) - SEDU/PARANACIDADE
http://www.paranacidade.org.br/ Phone: (+55 41 3350 3300)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Debian - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the samba