Printing on Windows box

Christian Barth barth at cck.uni-kl.de
Thu May 10 13:01:03 GMT 2001


> It's a system based  on rh 6.2, samba 2.07. Printcap was created
> manually
> 
> After adding
>  :if=/usr/bin/smbprint:\
> to the printcap file (I've found such a line in O'Reilly book) and
> writing as you wrote the command:
>  cat <print file> | smbclient //printman/brother -U ... -c 'print -'
> 
> I've got the message:
> 
> =================================================================
> added interface ip= ..... added interface ip=..... added interface
> ip=..... Got a positive name query response from <ip_number> putting
> file - as stdin-18663 (40.2829 kb/s) (average 40.2832 kb/s)
> =================================================================
> and... the file WAS SENT to the printer !!! (that's good, thanks)
> 
> That's OK, but what about the queue on Samba? How can I print not
> directly from server but from other stations?
4 pssibilities:
- use the control-panal command of Redhat, choose printers, set up a
  smb printer
- keep it manualy: Back up /usr/bin/smbprint and hard code your
  server and printer name in it.
- keep it manualy and create the .config file requiered by and
  descripted in /usr/bin/smbprint
- If you don't have a smbprint command, crate one: the simpest is:

#!/bin/sh
cat - | /usr/local/samba/bin/smbclient //printman/brother .......
# Note: The password may be requiered in pain text in the script
# it is a good habit to create a "print only" user on the
# Windows Machine with the printer

After you have set up /etc/printcap and smbprint, you should be able 
to use lpr to print form linux. Then check your "print command" in 
smb.conf and check /var/spool/samba for permissions. The it should 
work the way you want.

Christian


_______________________________________________________________________
In a world without walls and fences, who needs windows and gates? (SUN)




More information about the samba mailing list