1757105 Members
2291 Online
108858 Solutions
New Discussion юеВ

printer setup?

 
Clarence J
Frequent Advisor

printer setup?

I'm always using SAM to create a network printer. How do I perform this fr the command line. Eg

Print server name: prtsvr1
print queue name: prtq1
printer name: prtnme1
printer model: HP Deskjet 810C
9 REPLIES 9
Animesh Chakraborty
Honored Contributor

Re: printer setup?

Hi,
You can use lpadmin command.
For more information see man page of lpadmin.
You can use jetadmin also

Regards
Animesh
Did you take a backup?
Santosh Nair_1
Honored Contributor

Re: printer setup?

Remeber to do an lpshut before and a lpsched after doing the lpadmin. The lpadmin command can not be run while the lpshced is running (with some exceptions of course).

-Santosh
Life is what's happening while you're busy making other plans
Sachin Patel
Honored Contributor

Re: printer setup?

Hi Clarence,

Here are some commands with standard options that might help.

Shut down lpschedular
/usr/sbin/lpshut

Adding Remote Printer: $LPRINTER
/usr/sam/lbin/lpmgr -a -xlocalname=$LPRINTER,default=n,fence=0,rc=y,is_bsd=n,remname=$PRINTER,remsys=$HOST,remcan
cel=rcmodel,remstatus=rsmodel

Adding the printer $LPRINTER to the lp spooler
/usr/sbin/lpadmin -p$LPRINTER -orm$HOST -orp$PRINTER -mrmodel -v/dev/null -orc -ocmrcmodel -osmrsmodel

Accepting print requests
/usr/sbin/accept $LPRINTER

Enabling Printer
/usr/bin/enable $LPRINTER

Starting the lp scheduler with logging turned off
/usr/sbin/lpsched

Sachin

Is photography a hobby or another way to spend $
A. Clay Stephenson
Acclaimed Contributor

Re: printer setup?

Hi:

You don't mention what type of network printer
connection you are creating. If you are doing a JetDirect connection then this is very easy:

First do an addqueue -l to list all the supported PrinterID's.

Then addqueue -i PrinterID -h printer_hostname -q printer_queuename [-p port]

The -p port is only used on external JetDirects. Addqueue does everything including stopping and restarting lpsched. Man addqueue for details.

Regards, Clay
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: printer setup?

It's important to note that a remote printer is often confused with a network printer. A remote printer is typically a printer attached to a server, while a network printer has it's own LAN interface. HP has special software for the JetDirect product line but this won't work on non-HP network cards.

lpadmin will perform the add remote printer task where the printer is either: attached to another server like HP-UX, Solaris, or a PC running NT or Win2K, or the remote dsevice emulated remote printing.


Bill Hassell, sysadmin
Clarence J
Frequent Advisor

Re: printer setup?

If a printer is attached to a windows PC, how do I setup this printer for users on unix to print?

Appreciate your help.
Animesh Chakraborty
Honored Contributor

Re: printer setup?

Hi,
Configured as remote printer from SAM.
There are lot of discussions on this topic.
Search for remote printer.

Best of luck
Animesh
Did you take a backup?
Stefan Schulz
Honored Contributor

Re: printer setup?

If the printer is attached to a Wondows PC there are two ways:

1. The PC has to offer a lp or lpr service. In NT you can install this as part of the TCP/IP protocol. This implementation of the lp service is pretty limited, but you can print. There are also some 3rd party products available.

2. You could use a samba client on your HP-UX box to use those Windowsshared printers.

But it is always better to have real networked printers. (Preferably with a JetDirect card/box.) This is more reliable and better to administrade.

Hope this helps.

Regards Stefan
No Mouse found. System halted. Press Mousebutton to continue.
Sachin Patel
Honored Contributor

Re: printer setup?

Hi Clarence,
My choice is to buy jetdirect external box and use that. you will have more portability and more then one os can easily use that printer rather then installing new software and so on..

Sachin
Is photography a hobby or another way to spend $