Hi, 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 see that my script run as root, so I assume the calling user info is lost ? TIA, Charles -- Charles Bueche <charles@bueche.ch> sand, snow, wave, wind and net -surfer
Felipe Augusto van de Wiel
2006-Oct-03 17:00 UTC
[Samba] need %u parameter for lpq command
-----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, > CharlesKind regards, - -- Felipe Augusto van de Wiel <felipe@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-----
Possibly Parallel Threads
- sizing a print server for 10'000 users
- IMAP4rev1 broken with evolution
- dead bodies stacking up in Drafts folder
- Thunderbird : open() failed with index file /home/XYZ/mail/.imap/Trash/dovecot.index: Not a directory
- got stuck in setting up samba to linux box through putty tunneling