Previous Next Contents

8. Sharing A Linux Printer With Windows Machines

To share a linux printer with Windows machines, you need to make certain that your printer is set up to work under linux. If you can print from linux, setting up an SMB share of the printer is stright forward.

See the Printing HOWTO to set up local printing.

Since the author uses a printer connected to a Windows NT machine, this section should not be taken as definitive, but merely a suggestion. Anyone with details to share, please send them to dwood@plugged.net.au so this section can be completed.

Add printing configuration to your smb.conf:


[global]
   printing = bsd
   printcap name = /etc/printcap
   load printers = yes
   log file = /var/log/samba-log.%m
   lock directory = /var/lock/samba

[printers]
   comment = All Printers
   security = server
   path = /var/spool/lpd/lp
   browseable = no
   printable = yes
   public = yes
   writable = no
   create mode = 0700

[ljet]
   security = server
   path = /var/spool/lpd/lp
   printer name = lp
   writable = yes
   public = yes
   printable = yes
   print command = lpr -r -h -P %p %s

Make certain that the printer path (in this case under ljet) matches the spool directory in /etc/printcap!

NOTE: There are some problems sharing printers on UNIX boxes with Windows NT machines using Samba. One problem is with NT seeing the shared printer properly. To fix this, see the notes in the Samba distribution in the file docs/WinNT.txt. The other deals with password problems. See the comments in the same file for an annoying gain of understanding and failure to fix the problem.


Previous Next Contents