old(?) thing: Printing to NT-Server

Urban Widmark urban at svenskatest.se
Tue Nov 30 23:32:46 GMT 1999


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



More information about the samba mailing list