Operating System - HP-UX
1753894 Members
7868 Online
108809 Solutions
New Discussion юеВ

Re: Add a new network printer with lpadmin

 
OLIVA_1
Regular Advisor

Add a new network printer with lpadmin

Hello,

I would like add a new network printer which isn't a HP printer...

I have contacted the manufacturer and he said me to install this printer with a generic HP driver in LPR/LPD mode...
Usually I add printer with jetadmin. So I need some explanations to use lpadmin.

I launch the following command but I have an error :

#lpadmin -pbemech15p -mlaserjet4 -v/var/spool/lp/request/bemech15p
lpadmin: can't access file "/var/spool/lp/request/bemech15p"
#

Someone can help me ?


Thanks,
5 REPLIES 5
Jaime Bolanos Rojas.
Honored Contributor

Re: Add a new network printer with lpadmin

Hi Oliva!

I found a couple of threads that will be able to get you going.

The first thread will give you an idea, the second thread explains how to proceed.

http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=1043927

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1041433

Regards,

Jaime.
Work hard when the need comes out.
Bill Hassell
Honored Contributor

Re: Add a new network printer with lpadmin

You use jetadmin (which has been obsolete since 1999) only for HP JetDirect network cards in HP printers or HP external network boxes for non-HP printers. For a non-HP printer with a non-HP network card, the LPR/LPD protocol is called a "remote printer" and is setup in SAM (or the very lengthy example in the lpadmin man page. However, you must find out from the manufacturer the internal name of the printer. It might be prn or text or prnt, something like that. Without that internal name, you won't be able to connect.

Once added, you'll need to test the printer with a small file, something like this:

lp -dmyprn /etc/services

If the first line is correct but the rest of the lines are offset to the right in a stairstep pattern, test again with this command:

ux2dos /etc/services | lp -dmyprn

and it should be OK. You'll be required to print all ASCII files using this filter unless your printer has a method to append CR to each LF in the ASCII file(s) -- this is what ux2dos is doing.


Bill Hassell, sysadmin
BONNAFOUS Jean Marc
Trusted Contributor

Re: Add a new network printer with lpadmin

Hi Oliva,

Probably /var/spool/lp/request/bemech15p file not exist or not writable by lp. For Network printer the interface file (-v option) is often /dev/null.

Why do you not use sam to configure this printer? It's easier.

sam:
Printer and Plotters -> LP Spooler,
then choose 'Add network based printer'

Rgds
JMB
Si vous ne faites jamais de b├йtises, c'est que vous ne faites rien de difficile. Et ├зa c'est une grosse b├йtise.
OLIVA_1
Regular Advisor

Re: Add a new network printer with lpadmin

I have performed these commands and it's ok now.

/usr/sbin/lpshut
/usr/sbin/lpadmin -pbemech15p -v/dev/null -mrmodel -ob3 -ocmrcmodel -osmrsmodel -orc -ormbemech15p -orpbemech15p
/usr/sbin/accept bemech15p
/usr/bin/enable bemech15p
/usr/sbin/lpsched
OLIVA_1
Regular Advisor

Re: Add a new network printer with lpadmin

Thanks to all !!