There are two steps you need to have a BSD Unix recognize a remote printer:
-
Place an entry for the printer in the
/etc/printcap file (or equivalent).
-
Place a configuration file in the
/var/spool directory for the printer.
First, edit your
/etc/printcap file and add an entry for the remote printer. Note that the input filter (
if
) entry needs to point to the
smbprint program if the machine is on Windows 95/98. The following set of lines will accomplish on a Linux machine, for example:
laserjet:\
:sd=/var/spool/lpd/laser:\
# spool directory
:mx#0:\
# maximum file size (none)
:sh:\
# surpress burst header (no)
:if=/usr/local/samba/bin/smbprint:
# text filter
After that, you need to create a configuration file in the spool directory that you specified with the
sd
parameter above. (You may need to create that directory.) The file must have the name
.config and should contain the following information:
-
The NetBIOS name of the Windows machine with the printer
-
The service name that represents the printer
-
The password used to access that service
The last two parameters were set up in the Sharing dialog for the requested resource on the Windows machine. In this case, the
.config file would have three lines:
server = phoenix
service = CANON
password = ""
After you've done that, reset the Samba server machine and try printing to it using any standard Unix program.