SUMMARY: Solaris 2.5 print server configuration

From: Cathy Hargrave (
Date: Mon Dec 09 1996 - 19:42:40 CST

thank you for the prompt replies, and for help on additional
questions, and the scripts.

my thanks to for their assistance:

Alberto Begliomini <>
Gregory M Polanski <>
K. Ravi <>
Jay Morgan <>
Jim Bovitz <rocsoft!ultra!>
Marcos Assis Silva <>
Mark Phillips <>
Teresa Johnson <>

my original question concerned how to configure a Solaris
2.5.x machine as a print server for a HP LaserJet 4
networked printer.

first i needed to get the hp jetadmin software. you can
download the printer drivers from:
i had some difficulties getting it off of, but it
has documentation in html format.

next i installed it on the solaris workstation with pkgadd:

        pkgadd -d /a01/u141/cathy/sol_pkgadd.d0210

then to configure the printer, execute:


i took the defaults to configure the printer. to ran the
diagnostics in the jetadmin utility, i had to define:

setenv LD_LIBRARY_PATH /usr/openwin/lib:/usr/dt/lib:/opt/hpnp/lib

this completed everything i needed to do on the server. i
did not need to do anything with admintool.

the next step was to change the printer configuration on the
clients. on a sun os machine, i edited the /etc/printcap file
and changed the value in the rm field:

 # Remote Postscript Printer for ASIC
 lwa|lw|postscripta|HP LaserJet 4 ASIC:\

on the solaris workstation, sun4c494, where i had tested
the server configuration initially, i had to clean up the
messed up files, and the lpsystem and lpadmin commands failed.
to do so, i did the following:

        lpsystem -r sun4c494
        lpadmin -x lwa

now to configure the workstation as a client i restarted the
print services:


then i added the printer using admintool. to add it from the
command line, do:

        lpsystem -t bsd sun4s027
        lpadmin -p lwa -s sun4s027 -I any -D "HP LaserJet4 ASIC"

alternatively, i could have taken the defaults and executed:

        lpadmin -p lwa -s sun4s027\!lwa

i didn't add the print server, sun4s027, or the printer, lwa,
to the /etc/hosts file since everything is resolved through NIS.
i didn't have to do anything about line access because the client
was already defined as a trusted host to the print server.


Cathy L. Hargrave Smith                 phone: (972) 466-7599
SGS-Thomson Microelectronics, Inc.      fax:   (972) 466-7279
1310 Electronics Drive - MS 600         e-mail:
Carrollton, TX   75006

original post:

> as a print server for a networked printer? the printer > is an HP LaserJet 4. it's current print server is a Sun > OS running 4.1.3_U1. > > this is the error message i am getting on the Solaris > machine when i did the following: > > sun4s027# lpsystem -t s5 sun4s027 > Warning: Using the s5 protocol. > The s5 protocol will be removed in a future release. > "sun4s027" has been modified. > sun4s027# lpadmin -p lwa -s sun4s027 > UX:lpadmin: ERROR: Missing -U or -v option. > TO FIX: Local printers must have > a port defined (-v option) or > have dial-out instructions (-U option).

************************************************************* From: (Gregory M Polanski)

I have found that jetadmin makes HP printers easy to work with. Print clients specify the sparc as the print server. Here is what I did on one of our Ultras.

ftp cd /pub/networking/software bin get sol_pkgadd.d0037 (maybe newer now) pkgadd -d /home/gmp/jetdirect/sol_pkgadd.d0037 /opt/hpnp/jetadmin specify and leave configuration at default say yes when asked about confguring printer /opt/hpnp/jetadmin specify and leave configuration at default say yes when asked about confguring printer For the graphics to work, I added the following to root's .cshrc set path=($path /opt/hpnp/bin ) setenv MANPATH ${MANPATH}:/opt/hpnp/man setenv LD_LIBRARY_PATH /usr/openwin/lib:/usr/dt/lib:/opt/hpnp/lib ************************************************************* >From Wed Dec 4 12:09:37 1996

There's not a lot of documentation available for setting up a networked printer under Solaris.

It's best to use "lpsystem -t bsd <system>". This will cause less problems between systems.

Then use "lpadmin -p <printer> -s<system>!<printer>". You didn't specify all of the parameters for the -s option of lpadmin. After this is done, you shouldn't have any more lpadmin errors.

************************************************************* >From rocsoft!ultra! Wed Dec 4 09:07:08 1996

The errors that you see above are just Sun's way of telling you that you want to use an option that may not be fully supported by Sun in a future release of Solaris.

In your case, you should not be trying to use the s5 option anyway since it appears that you are trying to send print from a System V machine to a SunOs machine (the remote system).

> Admintool appears to be very confused about this printer, probably > due in part to earlier efforts to configure this machine as a print > server. now i can neither modify nor delete the printer either > through Admintool or the lpadmin command. Admintool says it knows > about the printer, but lpstat -p doesn't list it.

My suggestions to you are

1) Make sure you are the root user and remove the entry you added with the lpsystem command above. The removal command should be:

lpsystem -r sun4s027

2) Remove the printer you were trying to create with lpadmin as follows:

lpadmin -x lwa

3) Check the /etc/hosts file and make sure there is an entry including the host name and IP address of the remote Sun System you want to print to. (I assume from this note that the remote machine's host name is sun4s027.

Additionally, make sure you can ping the SunOS 4.x machine from the Solaris 2.5 machine.

4) Run lpstat -t to verify that the printer "lwa" no longer shows in the listing.

5) If the printer is still in the list, you may need to first stop the scheduler before performing the above set of commands. To stop the scheduler, use the following command:


6) Once the printer is gone from the lpstat -t listing, use admintool to add a printer to the system. The GUI is fairly intuitive - just make sure of the following:

A) The printer name is the name of the local print queue that will be created on the Solaris 2.5 machine.

B) When you create a printer, you have the option of making it a local or remote printer - you must choose remote printer in order for this to work properly.

C) The remote system name is the host name of the Sun that you want the print jobs forwarded to - in your case it should be sun4s027

D) The remote destination is the print queue name on the remote server that the print jobs should be directed to.

7) Finally, on the SunOS machine, you may need to edit the /etc/hosts.equiv or /etc/hosts.lpd file to allow the Solaris 2.5 machine to access the print services on the SunOS 4.X machine. A "man hosts.lpd" or "man hosts.equiv" on the SunOS 4.x machine will give you the details on what these files do.

Also, on the SunOS 4.x machine, you should check the printcap entry for the HP's print queue to make sure it includes the mx#0 attribute. If this is not present, then you must add it so that print jobs larger than the 1MB default are not truncated when sent across the network.

************************************************************* >From Wed Dec 4 08:18:06 1996

Your best solution is to go to HP's web page and get JetAdmin software. It is a very nice utility to set up print services to networked HP printers.

************************************************************* >From Wed Dec 4 04:28:59 1996

Have you got HP's 'HPNPF' software with your printer? This is required to make your Solaris machine talk to HP's network printers. It also comes with a utility called 'jetadmin' which can be used to configure the network printer. The 'lpadmin' syntax you're using is for configuring remote printers (i.e you'll have to run it on client machines, not on the print server). Even this, you've got it wrong. The right syntax is: # lpadmin -p lwa -s sun4s027!lwa The 'lwa' after the '!' is the name of the printer on the server. If it's called something else on the server, use that name instead. ************************************************************* >From Tue Dec 3 21:10:44 1996

Wouldn't the minimal correct syntax to define a remote printer be:

lpadmin -p <printer> -s<system_name>!<remote_printer> ????

It seems that by specifying just "-s sun4s027" you missed a syntatic item, doesn't it? But ... I'm not 100% sure about this. Just rumbling (?) and hoping I can somehow help. Best regards ...

************************************************************* >From Tue Dec 3 20:36:43 1996

I had much the same problem with our network laser printer. The network printer is looked upon by the Solaris machine as a BSD device so it just sends print jobs straight to that device, figuring all the filtering will be done by the BSD device. Fortunately the printers are smart enough to have two internal ques, one for text and one for postscript. I assume you have already set up the printer with the "lpsystem -bsd.." command so all you need to do is to create another text que for the printer, try -

lpsystem -t bsd -p <TCP/IP_address>

lpadmin -p <printer_name> -s <TCP/IP_address>\!text -T unknown -I any

enable <printer_name>

accept <printer_name>

note the \!text is just for the bourne shell in csh or tcsh it would be just !text

this will give you a text que on the printer.

The default que is post script, to get this you simply use

lpadmin -p <printer_name_ps> -s <TCP/IP_address> -T unknown -I any

enable <printer_name_ps>

accept <printer_name_ps>

************************************************************* >From Tue Dec 3 19:25:40 1996

Forget about admintool! Try first lpstat -a and see if the printer is still defined. Also if on your printer server you only have this printer you may want to try the following: # Kludge to bypass the problem of not being able to remove printers

/usr/sbin/lpshut rm -r /var/spool/lp/tmp rm -r /var/spool/lp/requests /usr/lib/lpsched

# Remove all the old printers first

Printers=`lpstat -a | awk '{print $1}'` for printer in $Printers do lpadmin -x $printer done

/usr/sbin/lpshut sleep 5 # make sure lpsched is down /usr/sbin/lpsystem -r printhost

# The string "SVR4-Extensions" allows to pass options using the -o # flag to the server (Sun srdb/11478)

echo "printhost:x:-:bsd:-:n:10:SVR4-Extensions:-:" >> /etc/lp/Systems /usr/lib/lpsched # Redefine all the new printers

/usr/sbin/lpadmin -p lab1 -T PS -I any -s printhost\!lab1 /bin/enable lab1 /usr/sbin/accept lab1 This is an excerpt from a script I wrote which redefines all the printers on my network.

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:18 CDT