Sunday, February 8, 2004

Sharing a Printer with Samba

Disclaimer: I have no idea if this post is still applicable. Technology has changed so much since I wrote this 4 years ago, but just in case it's useful to somebody somewhere......

When I first shared my printer with the default RedHat 8 smb.conf, I could print from windows but had an annoying "Access denied: " error message and could not see jobs in the printer queue. If you're reading this page, first find out what print system you are using: LPRng is the one used for Redhat 7 and 8, CUPS is the prefered system now and is used in RedHat 9. I suggest going with CUPS.

This is the best site I've for setting up CUPS / Samba:

If you are using LPRng, then the following lines must be added to the smb.conf file.

  • The three commands (print, lpq and lprm) allows the windows Printers dialog to update the printer queue (list and remove print jobs).
  • The last line "use client driver = yes" eliminates a windows error of "Access denied".


# (obviously a lot of other stuff not shown here)

# The print command by which data is spooled to a printer under Linux. print command = lpr -r -P%p %s # The print command by which job queue information (printer status) # can be obtained. lpq command = lpq -P%p # The print command by which unwanted print jobs can be deleted # from the queue. lprm command = lprm -P%p %j [printers] comment = All Printers path = /var/spool/samba browseable = no # Set public = yes to allow user 'guest account' to print guest ok = no writable = no printable = yes use client driver = yes

No comments: