[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Linux print server, windows machines



Brian Morgan <bmorgan@greenville.edu> wrote:

> I'm running hamm, 2.0.33 kernel, and need to connect several printers on
> our campus to the linux print server (whatever that may be:  I don't
> know.  Is there a print server type package I need to have installed?)
> All the printers will have ip addresses, via HP jetdirect boxes and
> cards.  I will have several laptops that will need to be able to print
> to these printers.  All the laptops will be running windows 98.
> 
> I'm also running samba on my linux box, but haven't quite got the hang
> of it yet (getting closer).  Is this the service I need to allow the
> windows machines to print to the linux print server?  Do I need to
> specify anything in the smb.conf file (ip addresses, etc.) or is that
> done somewhere else in a different package?

We use Samba and the lpr package to accomplish the same thing you are
trying to do (Windows for Workgroups, Windows 95 and Windows
NT clients).

Quick Start:

1) Edit /etc/smb.conf:

[global]
   printing = bsd
   printcap name = /etc/printcap
   load printers = yes
   [...]

[printers]
   comment = Printers in /etc/printcap
   browseable = no
   path = /var/tmp
   writable = no
   public = no
   printable = yes

[...]

(the default smb.conf provided with the Samba package for Debian has
these).

2) Edit /etc/printcap:

lj5_text|Remote LaserJet 5 in text mode:\
        :lp=:\
        :rm=laserjet5:\
        :rp=text:\
        :sd=/var/spool/lpd/remote/lj5_text:\
        :mx#0:\
        :sh:

lj5|Remote LaserJet 5 in raw mode:\
        :lp=:\
        :rm=laserjet5:\
        :rp=raw:\
        :sd=/var/spool/lpd/remote/lj5_raw:\
        :mx#0:\
        :sh:

The important lines are those with "rm" and "rp". "rm" especifies the
IP address (or name if DNS is configured right) of the JetDirect box. 
Instead of "laserjet5" (which really refers to laserjet5.ven.ra.rockwell.com)
you could have used rm=130.151.17.154. rp especifies what printer
queue you want to use. For a H-P JetDirect that can be "raw" or "text"
depending on if you want CR-LF conversion or not.

3) When you browse the shares of the Samba server you'll see the same
printers in /etc/printcap. In our example you'll see 2 printers:
lj5_text and lj5. Installing a printer in Windows is a piece of cake:
just "Add Printer", select Network Printer and browse the network
until you find the Samba server and the printers shared inside it.

Windows machines will send print jobs to the Samba print server. The,
the Samba print server will spool the job using the lpr Unix command
and the lpd daemon will send the job to the JetDirect box, which will
send it finally to the printer.

That should be all, and this really works well.

Do not hesitate to ask if you need more information.

peloy.-

-- 

 Eloy A. Paris
Information Technology Department
Rockwell Automation Venezuela
Telephone: +58-2-9432311 Fax: +58-2-9431645


--  
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: