/usr/share/doc/lprng-doc/LPRng-Reference-Multipart/x5236.htm is in lprng-doc 3.8.A~rc2-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 6 November 2007), see www.w3.org">
<title>Printing to a SMB (MicroSoft) Printer</title>
<meta name="GENERATOR" content=
"Modular DocBook HTML Stylesheet Version 1.79">
<link rel="HOME" title=" LPRng Reference Manual" href=
"index.htm">
<link rel="UP" title="Printer Communication and Protocols " href=
"printercomm.htm">
<link rel="PREVIOUS" title="Problems With Network Print Servers"
href="x5205.htm">
<link rel="NEXT" title="Printing to AppleTalk Printers" href=
"x5250.htm">
</head>
<body class="SECT1" bgcolor="#FFFFFF" text="#000000" link="#0000FF"
vlink="#840084" alink="#0000FF">
<div class="NAVHEADER">
<table summary="Header navigation table" width="100%" border=
"0" cellpadding="0" cellspacing="0">
<tr>
<th colspan="3" align="center">LPRng Reference Manual: 24
Sep 2004 (For LPRng-3.8.28)</th>
</tr>
<tr>
<td width="10%" align="left" valign="bottom"><a href=
"x5205.htm" accesskey="P">Prev</a></td>
<td width="80%" align="center" valign="bottom">Chapter 11.
Printer Communication and Protocols</td>
<td width="10%" align="right" valign="bottom"><a href=
"x5250.htm" accesskey="N">Next</a></td>
</tr>
</table>
<hr align="left" width="100%">
</div>
<div class="SECT1">
<h1 class="SECT1"><a name="AEN5236" id="AEN5236">11.9. Printing
to a SMB (MicroSoft) Printer</a></h1>
<p>Microsoft use the SMB (Simple Message Block) protocol to
transfer files and print jobs to hosts and printers. SMB can be
used over TCP/IP, NetBEUI, IPX, and other lower level network
protocols.</p>
<p>Unfortunately, most printers do not provide detailed status
or error reports when using the SMB protocol. There are a very
large number of printers that have deficient SMB support that
causes problems when used in a high traffic or high throughput
environment.</p>
<p>It is highly recommended that this protocol not be used
unless there is no alternative.</p>
<p>If you have a printer or a remote print spooler that
supports SMB You can use the <a href="smb.htm">SAMBA</a>
<b class="APPLICATION">smbclient</b> program to send a print
job to an SMB client. The following is a sample Shell Script
script which you can use:</p>
<div class="INFORMALEXAMPLE">
<a name="AEN5244" id="AEN5244"></a>
<pre class="SCREEN">
#!/bin/sh -x
# This script is an input filter for printing on a unix machine. It
# uses the smbclient program to print the file to the specified smb-based
# server and service.
# The 'smb' printcap entry below shows how to configure LPRng
# for printing
#
# smb:
# :lp=|/usr/local/samba/smbprint
# :sd=/var/spool/smb:
# :filter= ... filter ...
#
# The /var/spool/smb/.config file should contain:
# server="PC_SERVER"
# service="PR_SHARENAME"
# password="PASSWORD"
#
# Set PC_SERVER to the server, PR_SHARENAME to the printer,
# and PASSWORD to the password for this service.
#
# E.g.
# server=PAULS_PC
# service=CJET_371
# password=""
#
#
config_file=.config
if [ -f $config_file ] ; then
eval `/bin/cat $config_file`
fi
#
# NOTE You may wish to add the line `echo translate'
# if you want automatic
# CR/LF translation when printing.
(
# echo translate
echo "print -"
/bin/cat
) | /usr/local/bin/smbclient "\\\\$server\\$service" \
"$password" -U "$server" -N -P 1>&2
</pre>
</div>
<p>If the above script was in <tt class=
"FILENAME">/usr/local/libexec/filters/smbprint</tt>, the
printcap entry for this printer would be:</p>
<div class="INFORMALEXAMPLE">
<a name="AEN5248" id="AEN5248"></a>
<pre class="SCREEN">
pauls_pc:
:sd=/var/spool/lpd/%P
# we filter the output
:lp=|/usr/local/libexec/filters/smbprint
# you can add filters if you want to do specific actions
:ifhp=model=hp4
:filter=/usr/local/libexec/filters/ifhp
</pre>
</div>
</div>
<div class="NAVFOOTER">
<hr align="left" width="100%">
<table summary="Footer navigation table" width="100%" border=
"0" cellpadding="0" cellspacing="0">
<tr>
<td width="33%" align="left" valign="top"><a href=
"x5205.htm" accesskey="P">Prev</a></td>
<td width="34%" align="center" valign="top"><a href=
"index.htm" accesskey="H">Home</a></td>
<td width="33%" align="right" valign="top"><a href=
"x5250.htm" accesskey="N">Next</a></td>
</tr>
<tr>
<td width="33%" align="left" valign="top">Problems With
Network Print Servers</td>
<td width="34%" align="center" valign="top"><a href=
"printercomm.htm" accesskey="U">Up</a></td>
<td width="33%" align="right" valign="top">Printing to
AppleTalk Printers</td>
</tr>
</table>
</div>
<p align="center"></p>
</body>
</html>
|