Technical article 118624

How can I print to a SCO Unix remote printer from Windows?

OpenServer 6.0.0OpenServer 5.0.5OpenServer 5.0.6OpenServer 5.0.7UnixWare 7.1.0UnixWare 7.1.1UnixWare 7.1.3UnixWare 7.1.4Open UNIX 8

Written · Last revised

Problem

How can I set up a SCO Unix remote printer on my UNIX operating system and be able to print via LPR from a Windows client?

You may wish to do this in order to ensure that your prints are routed through a central print server or for application printing, for example, such as Tarantella.

Solution

The remote printer can be connected via LPD or via HPNP or locally.

There are two steps ; the first is to set the printer up on the SCO Unix server and the second is then to set it up on your Windows client.

STEP 1:
======
From UnixWare7/Open UNIX 8:
--------------------------
1. Configure your printer through the ScoAdmin Printer Manager with:
# "scoadmin printer"  -- or --  "scoadmin Printer Setup Manager"

- For Local printers, please skip straight to step 2.

- For HPNP also see:
TA 110358

- If configuring a "LPD" printer with UnixWare7/Open UNIX 8:

1a. On the server add a new printer in "scoadmin printer" and call it
    "lw2", for example.  You will not be able to add printer names
    with a dash "-" in them.

1b. Select the printer type to "LPD" (not System V Legacy, as selecting "HP Printer" will default to System V Legacy and this will not print from a Windows client) and choose "Other" as the printer type (which is right at the bottom of the list).

2.  Grant access from your PC both short name and FQDN name, for
    example, "myclient" and "myclient.mydomain.com" so that you can
    access the printer from your Windows client.
3.  Print to the printer directly from the Unix shell using "lp" to
    test that printing works.
   From OpenServer
   ---------------
1. Configure your printer through the "scoadmin printer manager".
- If using HPNP:
See TA 105666
And:
TA 118062

2. Ensure that Remote Printing is enabled on OpenServer, as detailed in:

TA 111021
And:
TA 117651

To check, run "scoadmin printer" -> System -> Print Services and "Remote UNIX Print Service Enabled" should be checked.

3. Within the "scoadmin printer" Printer Manager ensure that the printer is enable to accept remote jobs in the "Settings" -> "Control" -> Accept New Remote Jobs

4. Ensure that the client you wish to print from is listed in:

/etc/hosts.lpd

as shortname and FQDN name, as above, so that you can access the printer from your Windows client.

5. Ensure that /etc/printcap does not have a :ex: entry for the remote printer, for example:

prn003:\
       :lp=/dev/null:sd=/usr/spool/lpd/prn003:mx#0:

6. Print to the print locally using "lp" and also using "lpr", eg:

# lpr -d <printer> <file>
STEP 2:
======

From Windows: ------------ In these steps we need to ensure a test print will work, and if so, is the LPR Network Printing enabled, and then we need to add a specific LPR port for this printer and finally, add the printer.

1)  Test the printer is accessible

You will need to have some LPR software on the client side. Windows XP/2000 etc provides a DOS utility called LPR whereas this command is not available for Windows NT4 WorkStation.

Enter the command:
"lpr -S <my_server> -P <my_printer> <file>"
and this should then print.

2) To Configure the LPR Network Component the Printer under Windows: ---------------------------------------------------------------- Add the LPR network components, then configure the LPR port.

Adding LPR Network Components for Windows:
a)  Right-click My Network Places (desktop), and select
    Properties.
b)  Select Advanced from the menu, and then select Optional
    Networking Components
c)  Place a check in Other Network File and Print Services then
    select Details.
d)  Add a checkmark to Print Services for UNIX.
e)  Select OK then select Next.  LPR Ports will now be an option
    within Printer Ports.

3) To add printer LPR Port run the following options:

-  Start-> Settings-> Printers-> File->
   Server Properties-> Ports-> Add Port-> LPR Port->
   New Port-> Enter the name of the Server and then the Printer
   queue name created above along with the driver.
4) To add the printer, add the printer as 'Local' Printer and select
   the appropriate Port, above.  You can then send a 'Test Print' to
   the printer.  This may take some time to complete.

- To Configure the Printer under Windows NT4 WorkStation: ------------------------------------------------------ Add the LPR printing services, and then configure the LPR port.

Adding LPR printing services for Windows NT 4.0:

From the Taskbar, click Start, Settings, and Control Panel or from the Control Panel, double-click the Network icon.

Select the Services tab from the Network Dialog box. If Microsoft (R) TCP/IP Printing is not listed, select Add, Microsoft TCP/IP Printing in the Select Network Service dialog box, and OK. (A prompt may appear asking for a Windows NT disk or CD-ROM to be used to install files.)

Select Close.

Select Yes when asked to restart the system.

Configuring LPD printing from Windows NT

Assuming that the Printer Driver has already been installed:

Click Start, Settings, and then Printers.

Click "Add Printer" and add the printer with the correct driver connected to the LPT1 port.

Right-click the printer icon, and select Properties.

Select the Ports tab and Add Port.

Select LPR Port from the Printer Ports dialog box, and select New Port.

In the dialog box labeled Name or address of server providing lpd, enter the IP address of the HP Jetdirect.

In the dialog box labeled Name of printer or print queue on that server.

Select OK to close the Add LPR Compatible Printer dialog box.

You should be then able to print a Test Print.

Check to ensure that the Device Settings print to the correct Paper Size.

Select Close and OK to close the Properties box.

TROUBLESHOOTING:
---------------
a)  Ensure that High Security is not selected as a Security
    profile in "scoadmin security"
b)  To test from a Windows client, create a print queue on the
    Windows client by adding a new local printer and create a new
    port for Standard TCP/IP and enter the name of the printer and
    the print queue (ie. both the same) and select the correct
    driver.
c)  Ensure that "lpd" daemon is running on the server with the
    command:
# ps -ef | grep lpd
d)  Check that the Printer Spooler service is running on Windows
    by Right-clicking "My Computer"->Manager->Services &
    Applications ->Services->Print Spooler
NOTE:     This has not been seen to work with printers connected via UnixWare2.
If you add a via the UW2 GUI->Admin Tools->Printer Setup and add the
printers fully qualified domain name (FQDN) as defined in either
/etc/hosts or DNS, add the Model, and the FQDN Remote printer name
and FQDN for the spooler name and select BSD to print to a LPD
printer and Add it.  Whilst you can print locally and remotely from
UnixWare2/UnixWare7/OpenUNIX 8.0.0 and OpenServer it will not print
from Windows NT4 or 2000.  The print request will reach the server
and appear in the /etc/lp/logs/requests file but won't actually
print.

You would need to add the client connecting to this printer into:

/etc/hosts or DNS
/etc/lp/Systems
/etc/hosts.equiv
/etc/lp/printers/<printer>/users.allow as FQDN!all

See the following logs for more information:

/etc/lp/logs /usr/adm/log/osmlog /usr/adm/log/cs.log /usr/adm/log/cs.debug (if "/sbin/cs" is restarted with the -d flag)

See also

TA110358, "UnixWare 7, How do I configure printing to an HP JetDirect Printer or HP Print Server?"

TA105666, "How to configure print service to an HP Jet Direct Network Printer."

TA118062, "How do I add a HPNP printer with OpenServer and share it with AFPS?"

TA110358, "UnixWare 7, How do I configure printing to an HP JetDirect Printer or HP Print Server?"

See also HP's guide to configuring LPR:

http://www.hp.com/cposupport/networking/support_doc/bpj02836.html

From the Xinuos technical article database, record 118624. Reproduced with permission. The original is at www.sco.com/ta/118624, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.