[Samba] Samba printer share with Windows
Joel Hammer
Joel at HammersHome.com
Tue Mar 25 23:57:20 GMT 2003
Make it simple.
Get a print queue on your Samba server that can handle postscript files.
This will need a correct printcap file. Something like this works for
me in my printcap:
ps|z53:\
sh:sd=/var/spool/lpd/z53:mx#0:\
:lp=/dev/lp0:\
:if=/usr/local/lexmark/z53/z53.sh
:mc#1
:sh:
(hmm... I forget what mc does)
Make sure you run checkpc -f, if you are using lprng.
Make sure your restart your print server after setting this up.
Then, in your smb.conf, have something like this:
[ps]
comment = Filtered for Z53
path = /tmp
read only = No
create mask = 0700
guest ok = yes
hosts allow = 192.168.
printable = Yes
printing = lprng
print command = echo %J %p %s >> /tmp/junkJ;\
a="`echo '%J' | sed "s/^.*- //"`" ;\
echo This is truncated $a >> /tmp/junkJ;\
/usr/bin/lpr -Pps -J"$a" %s;\
rm %s
lpq command = /usr/bin/lpq -Pps
lprm command = /usr/bin/lprm -Pps %j
lppause command = /usr/sbin/lpc hold ps %j
lpresume command = /usr/sbin/lpc release ps %j
share modes = No
use client driver = yes
You don't have to have a fancy print command. But, I do specify all
commands. It gets interesting when you realize you can have anything
you want for these commnands.
If you are using lprng, make sure your /etc/lpd.perms is permissive. Here
is all I have in mind, just this one line:
DEFAULT ACCEPT
Then, on your windows client, select for your printer an HP Laserjet
III Plus or something similar sounding.
In this way, you should be sending a postscript file to your samba server
which should be able to handle postscript files.
Joel
On Tue, Mar 25, 2003 at 12:45:36PM -0800, Matthew Wu wrote:
> Is there one can give me some information on how to setup printer in Samba
> so windows can print to it.
> My file sharing works fine. In winows can't see the printer. Thanks
>
>
>
> Matthew Wu
> School Loans Corp.
> 10780 Santa Monica Blvd, Ste 225
> Los Angeles, ca 90025
> Tel. 310-474-7456 ext.235
> Email mwu at higheredloans.com
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: http://lists.samba.org/mailman/listinfo/samba
More information about the samba
mailing list