Operating System - HP-UX
1833982 Members
1682 Online
110063 Solutions
New Discussion

print from HP-UX to printer connected to Win2000 with CIFS

 
Kurt Beyers.
Honored Contributor

print from HP-UX to printer connected to Win2000 with CIFS

Hi,

I've got a HP-UX 11.0 server from which I want to send print jobs towards a printer connected to a 'Windows 2000 professional' workstation. I want to do this via CIFS/Samba that is installed on the HP9000 server.

I've followed the guidelines in chapter 7 'printing and name resolution' of the Samba manual. I've edited the /opt/samba/examples/printing/smbprint.sysv and changed the following lines:

server=sws00007
service=HP
password=""


I couldn't set any password when I've shared the printer (is this a Win2000 feature?), so I left it empty.

Then I've did:

# lpadmin -php -v/dev/null -i./smbprint.sysv
# enable hp
# accept hp

and restarted samba (/opt/samba/bin/smbstop and smbstart).

When I try to print now something:

lp -dhp /etc/hosts

it fails and I get the following error by mail:

From root Wed Jul 3 14:33:50 WES 2002
Received: (from lp@localhost)
by comp.dolmen.be (8.8.6 (PHNE_17190)/8.8.6) id OAA18200
for root; Wed, 3 Jul 2002 14:33:50 +0100 (WEST)
Date: Wed, 3 Jul 2002 14:33:50 +0100 (WEST)
From: root
Message-Id: <200207031333.OAA18200@husux008.dolmen.be>
X-Authentication-Warning: comp.dolmen.be: lp set sender to root using -f
To: root

error code 127 in request hp-11 on printer hp



What am I doing wrong? What is the correct way to setup printing via CIFS to a Windows printer?

Thanks,
Kurt
5 REPLIES 5
Bill Hassell
Honored Contributor

Re: print from HP-UX to printer connected to Win2000 with CIFS

Not necessary to use SAMBA/CIFS at all. Just go to your Win2000 system and setup Unix remote printing services. When you use lpadmin (or SAM), and setup a remote printer, HP-UX expects the lpr/lpd service to be running on the Windows box.

NOTE: All text files printed from HP-UX will stair-step down the page because Windows will not perform any cannonical file translation (ie, add CR to every LF), so on the HP side, once you get the connection working, you'll have to create an lp wrapper for remote printers which runs all text files through ux2dos and then prints them

Or you can avoid all of these problems by connecting the printer to trhe network with HP JetDirect cards or boxes and have the PCs and Unix bixes print direct to the printer.


Bill Hassell, sysadmin
Kurt Beyers.
Honored Contributor

Re: print from HP-UX to printer connected to Win2000 with CIFS

Thanks Bill,

I've just tested the setup with 'TCP/IP print server' and that works.

Still wondering what's wrong in my setup via Samba.

I'll take the setup via jetadmin into consideration as well.

Thanks,
Kurt
Victor_101
Regular Advisor

Re: print from HP-UX to printer connected to Win2000 with CIFS

Hi Guys,
Can someone please tell me about this lp wrapper and ux2dos. PLease explain how to do this.

NOTE: All text files printed from HP-UX will stair-step down the page because Windows will not perform any cannonical file translation (ie, add CR to every LF), so on the HP side, once you get the connection working, you'll have to create an lp wrapper for remote printers which runs all text files through ux2dos and then prints them
Kurt Beyers.
Honored Contributor

Re: print from HP-UX to printer connected to Win2000 with CIFS

@Victor,

It is better to open a new thread with all the details of your problem instead of replying at an old thread.

Time to try out the 'close thread' feature.

Kurt
Kurt Beyers.
Honored Contributor

Re: print from HP-UX to printer connected to Win2000 with CIFS

Closing the thread.