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

Joe Daily jdaily at mines.edu
Sat May 10 19:20:11 MDT 2003


Here is what I would do:

First check and and see if you can even print some Xerox printer and have
you rip out all of your hair and then some.

$ echo "test" |smbprint //winclient//Printer_share -U password (may have
user%password depending on domain setup) -I hostip -c 

then you can throw a printer def in the /etc/printcap like this

lpsmb:\
	:sd=/war/spool/lpd/lpsmb:\
	:mx#0:\
	:sh:\
	:if=/usr/bin/smbprint:\
	:af=/var/spool/lpd/lpsmb/acct:\
	:lp=/dev/null:

make sure that you have /var/spool/lpd/lpsmb as chmod 777

then in the spool directory create a .config like this

server=winclient
service=printer_share\
hostip=111.222.333.444
user=username
password=password

that should take care of it,

joe

+---------------------------+
| Email:                    |
| qnetjoe at qnetlpha.com      |
| jdaily at mines.edu          |
| Or Reach me on an IM      |
| AIM & Yahoo: qnetjoe      |
| ICQ: 297495442            |
| MSN: dailyjoe at hotmail.com |
+---------------------------+


-----Original Message-----
From: clue-tech-admin at clue.denver.co.us
[mailto:clue-tech-admin at clue.denver.co.us] On Behalf Of Jim Ockers
Sent: Saturday, May 10, 2003 1:50 PM
To: clue-tech at clue.denver.co.us
Subject: Re: [CLUE-Tech] Can I do this with samba?

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/
_______________________________________________
CLUE-Tech mailing list
CLUE-Tech at clue.denver.co.us
http://clue.denver.co.us/mailman/listinfo/clue-tech




More information about the clue-tech mailing list