[CLUE-Tech] Can I do this with samba?

Jim Ockers ockers at ockers.net
Sat May 10 13:49:52 MDT 2003


Jeff:

Jeffery Cann wrote:
> 
> With samba, I have only accessed UNIX and Linux boxes from a Windows machine.  
> I want to go the opposite way for print services.
> 
> >From Linux (I use CUPS for printer services), I want to print to a printer 
> running on an NT server.  The printer is a Xerox copier / laser printer and 
> is not supported by Linux.
> 
> So, I figured I would set up my Linux box as an smb client, but I'm not 
> exactly sure how to do it.  Could someone post the high-level steps? (If this 
> is in fact possible).  I can RTFM from there.

Microsoft provides UNIX printing services for Windows NT.  In Control Panel,
Service, click "Add" and you'll see "Microsoft TCP/IP printing" in the list.
If you add this, you will find that the printers on the Windows NT box are
available for printing from your Linux box using lpr/lpd.

The printer names on the Windows NT box should NOT have spaces in the name.
If you have a "HP LaserJet IIIP Postscript" you should rename the printer
"HPLJ3P-PS" or something that has no spaces in it.  I've found that this
makes it much easier to send a print job to it.  You should use "Raw" as
the data type or print queue name, if one is needed.

Alternatively you can use smbclient to print, something like this:

cat file.prn | smbclient //server/share password -P -U username 

The "file.prn" should be in a printer language spoken by your printer.  Take
a look at the smbprint shell script for a good example of how to format the
smbclient command line, or just use the smbprint script itself to print the 
data.

You should read the man page for smbclient since that is the program that
lets you print to a Windows NT server.

Red Hat Linux provides the printconf-gui utility which will let you set up
a local print queue that prints to a remote NetBIOS printer on a Microsoft
server.  This is probably the easiest way to set it up, I think.

-- 
Jim Ockers, P.Eng. (ockers at ockers.net)
Contact info: please see http://www.ockers.net/



More information about the clue-tech mailing list