Sharing Printers and scanner in SAMBA
Hello,
I have a Linux box with 2 printers attached and 1 scanner. One printer
connects with LPT1, the other with USB and the scanner is USB also.
I want to share all these within my local network. For that, I installed
Samba.
When I start the Linux box, the parallel printer starts to print rubbish. I
supposed that was a problem with the printer itself, but I switched on alone
without the printer connection and was Ok. The thing starts when starts the
Linux. I observed that there is a daemon, lpd, that is started with Linux. I
killed it from the command line, but the printer continues to print rubbish.
I tried to share them within the LAN I have. It is composed of the Linux box
and 2 Windows machines. The 2 printers are 'seen' by the two Windows
machines, but when I install the drivers for them a message appears: "Access
denied".
I copy the smb.conf file I have here:
[global]
encrypt passwords = yes
workgroup = WORKGROUP
[HPLaserJ]
printable = yes
print command = /usr/bin/lpr -r %s
printer = /dev/lp0
printing = BSD
read only = yes
guest ok = yes
[Stylus740]
printable = yes
print command = /usr/bin/lpr -r %s
printer = /dev/usb/lp0
printing = BSD
read only = yes
guest ok = yes
[test]
Comment = Testeo de Samba
path = /hda3
valid users = juan jose
read only = no
The printers are HP LaserJet 1100 (parallel) and Epson Stylus Color 740I
(USB).
The scanner is an HP ScanJet 2200c (USB).
I have already installed the respective drivers in the Windows machines.
Maybe I have to put a different configuration in smb.conf.
I will wait your answers.
Thanks in advance.
Juan
Re: Sharing Printers and scanner in SAMBA
In article <3ef8b87c@shknews01>,
"Juan" <juancostello@yahoo.es> writes:[color=blue]
>
> I have a Linux box with 2 printers attached and 1 scanner. One printer
> connects with LPT1, the other with USB and the scanner is USB also.
> I want to share all these within my local network. For that, I installed
> Samba.[/color]
First off, Samba can be used for sharing the printers, and this is the
traditional approach to sharing with Windows clients. To share the
scanner, you'll need something else. The Linux SANE package
([url]http://panda.mostang.com/sane/[/url]) is the Linux scanner package, and it
supports network operations. If you want to share with another Linux or
Unix system, SANE alone should work. If you want to share with a Windows
client, you'll need a Windows SANE front-end, such as SaneTwain
([url]http://sanetwain.ozuzo.net[/url]).
[color=blue]
> When I start the Linux box, the parallel printer starts to print rubbish. I
> supposed that was a problem with the printer itself, but I switched on alone
> without the printer connection and was Ok. The thing starts when starts the
> Linux. I observed that there is a daemon, lpd, that is started with Linux. I
> killed it from the command line, but the printer continues to print rubbish.[/color]
My suspicion is that you've got a bad cable or a bad parallel port. It's
also possible you've got some non-standard process running that's feeding
gibberish to the parallel port, but this certainly isn't a standard part
of any Linux configuration.
[color=blue]
> I tried to share them within the LAN I have. It is composed of the Linux box
> and 2 Windows machines. The 2 printers are 'seen' by the two Windows
> machines, but when I install the drivers for them a message appears: "Access
> denied".
>
> I copy the smb.conf file I have here:
>
> [HPLaserJ]
> printable = yes
> print command = /usr/bin/lpr -r %s
> printer = /dev/lp0
> printing = BSD
> read only = yes
> guest ok = yes
>
> [Stylus740]
> printable = yes
> print command = /usr/bin/lpr -r %s
> printer = /dev/usb/lp0
> printing = BSD
> read only = yes
> guest ok = yes[/color]
Two problems with these shares jump out at me:
1) The "read only" parameter, when set to "yes" as you've done, creates a
read-only share. This makes a printer share 100% useless, because
users can't send print jobs to the share. Change this detail and the
"access denied" message will probably go away, although I can't make
any promises. (It's not clear from your message what's generating that
error.)
2) The "printer" parameter should specify a printer name, as listed in
/etc/printcap, not a printer device file. If you haven't yet configured
a printer to appear in /etc/printcap, do so now. Trying to get Samba to
share a printer before it's working in Linux is pointless. (Well, there
are partial exceptions and workarounds, but they're harder to describe
and configure, overall.)
Also, if you're using a Samba package that came with your Linux
distribution, the "print command" and "printing" options are probably
unnecessary. They may be OK as you've listed them, or they may cause
problems. Unless you have a specific reason to override the defaults, I
recommend omitting those lines. On another matter, you may need to add
passwords to the Samba encrypted password tool by using the smbpasswd
program.
--
Rod Smith, [email]rodsmith@rodsbooks.com[/email]
[url]http://www.rodsbooks.com[/url]
Author of books on Linux, FreeBSD, and networking