Hi, old problem, i thing but i did not find a good solution in the archives nor docs: My Linux-Box sits in a WinNT-Domain, where exist some printers on different servers. I adepted the smbprint program from the examples to read SERVER and PRINTERQUEUE for every printer in my printcap. The next problem is the authentication. We need a USERNAME, WORKGROUP and PASSWORD, that has to be sent. As far as i understand it, the smbpasswd-file is only used for local authentification, not for the purpose, i need it. So, we again need some file, readable by lp, that contains the PASSWORD in an uncrypted form *UUUUHHHH*. I think, nobody likes that. If i only print from the commandline, some script could be invented, to use smbclient, similar to the smbprint-script, where one should type in his password. But what, if i want to print from within other programms? Has anyone a good solution for that? And help would be phaniastic. Ingo ---------------------------------------------------------------- I. Reimann reimann@uni-muenster.de Inst. fuer Angew. Physik +49 251 83-33527 (fon) Correnstr. 2-4 +49 251 83-33513 (fax) D-48149 Muenster Germany ----------------------------------------------------------------
On Tue, 30 Nov 1999, Ingo Reimann wrote:> If i only print from the commandline, some script could be invented, to use > smbclient, similar to the smbprint-script, where one should type in his > password. But what, if i want to print from within other programms?You add the filter to the printcap, then everyone gets the right stuff since they all pass it to lpr (AFAIK). I have something like this in my RedHat printtool generated printcap: ##PRINTTOOL3## SMB pjxl300 300x300 a4 {} PaintJetXL300 3 {} dj1600:\ :sd=/var/spool/lpd/dj1600:\ :mx#0:\ :sh:\ :if=/var/spool/lpd/dj1600/filter:\ :af=/var/spool/lpd/dj1600/acct:\ :lp=/dev/null: The RH setup includes a filter script in the lpd spool dir, that calls other scripts as needed, depending on input and configuration. The authentification stuff is kept in a file: .config in the spool dir for the printer. And to my horror I realize that it is world readable. Good thing no one else has access to this machine ... :) It should work to read protect it since I have: cola:~>d `which lpr` -r-sr-sr-x 1 root lp 15768 Mar 22 1999 /usr/bin/lpr* /Urban
snip> My Linux-Box sits in a WinNT-Domain, where exist some printers on different servers. <snip I assume you want to print from linux/samba to NT (\\server\printer) If this is the case why don't you just add a printcap entry with :rm=<NT server> :rp=<printer>? Or am I missing something? 'ooroo Mike...(:)-) --------------------------------------------------- o Email: mike.phillips@tek.com o //// Work: + 44 (0)8707 405803 /@ `\ /) ~ CDP: 855 2538 > (O) X< ~ Fish!! Mob: + 44 (0)7785 762976 `\___/' \) ~ Home: + 44 (0)8707 405804 \\\ ---------------------------------------------------