[Samba] need %u parameter for lpq command
Charles Bueche
charles at bueche.ch
Fri Oct 6 08:03:46 GMT 2006
Hi Felipe,
My goal was to have my own script for "lpq command", and the only supported parameter is %p. Samba doesn't pass %u because it is not available the way it is implemented within Samba.
Now I have realized that it is not such a big issue when a user see all jobs (against only his own jobs). It's even better, he now sees why it takes long.
N.B. my "print command" is a PDF converter for 40'000 desktops.
Charles
Felipe Augusto van de Wiel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 09/29/2006 03:59 PM, Charles Bueche escreveu:
>> Hi,
>
> Hey Charles,
>
>
>> 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.
>
>
>> TIA,
>> Charles
>
> Kind regards,
>
> - --
> 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
>
> iD8DBQFFIpcTCj65ZxU4gPQRAkv1AJsGYlfie81B6XS+P3JF3J6XPNBYLwCePMIk
> u7QiEjv0Fc0ISzJL5Y16UlA=
> =DkOM
> -----END PGP SIGNATURE-----
--
Charles Bueche <charles at bueche.ch>
sand, snow, wave, wind and net -surfer
More information about the samba
mailing list