This chapter explains just how to put up printers and make those printerseasily accessible to systems on the netoccupational by utilizing LP print regulates.

You are watching: Which command should be used to restrict access to printers?

This is a list of the information that is in this chapter:

For oversee information about printing, see Chapter1, Introduction to Printing in the couchsurfingcook.com Solaris Operating System.

Setting Up Printers by Using LP Publish Commands (Task Map)

Task

Description

For Instructions

Add a brand-new straight attached printer by making use of LP print regulates.

Use LP print business commands to make the printer easily accessible for printingafter you physically connect the printer to a device.

How to Add a New Directly Attached Printer by Using LP Publish Commands

Use the lpadmin command to add a printer queue via localorganize stated as the host name.

Use the lpadmin command via the -s optionto specify localhost as the organize name as soon as setting up alocal print queue. This change was added to permit print servers tokeep the same print host name, localhold, independentof the machine host name.

How to Add a Publish Queue With localhost Specified as the Host Name (LP Print Commands)

Add a new network-attached printer by using LP print serviceregulates.

Use LP print commands include a brand-new network-attached printer.

How to Add a New Network-Attached Printer by Using LP Publish Commands

Add a remote print queue for a printer that is associated to a couchsurfingcook.com Solaris print serverby using IPP.

To add accessibility to a remote print queue by utilizing IPP, there are 2 methodsthat you deserve to carry out oneof the following:

Use the lpadmin command also.

Use the lpset command also.

How to Set Up a Remote Printer That is Connected to a Publish Server by Using IPP

Add a brand-new network-attached printer by utilizing the printer vendor-suppliedsoftware program.

Use Printer seller supplied tools to configure a network-attached printer afteryou physically attach the printer to the netoccupational.

How to Add a Attached Netoccupational Printer by Using Printer Vendor-Supplied Tools

Setting Up Directly Attached Printers by Using LPPublish Commands

The complying with table explains each of the printer interpretations that you have the right to define when settingup a brand-new printer or editing and enhancing an existing printer by making use of the lpadmin command also.

Printer Definition

Publish Command Option

Description

Example

Default Setting

Required/Optional?

Printer Name

-p

Name of printer

laser1

N/A

Required to install an attached or network-attached printer

Publish server

Name of print server

venus

Use localhost for Printer Server

Required to install an attached or network-attached printer

Description

-d

User identified string

laser printer near breakroom

N/A

Optional

Printer Port

-v

Device that the printer is attached to

/dev/term/a

/dev/term/a

Required to install an attached printer

Printer Type

-T

Type of printer

unknown

PostScript

Required to install an attached printer or a network-attached printerwithout PPD files

Documents Content Type

-I

Content to be printed

any

PostScript

Required to install an attached printer or a network-printer printer withoutPPD files

PPD file name

-n

Full path to the PPD file and file name with .ppd extension.

path/necprinter.ppd

N/A

Optional

Fault Notification

-A

Specifies just how to educate user of errors

-A mail

Write to superuser

Optional

Default Printer

-d

Identifies the default printer

N/A

N/A

Optional

Banner Page regulate Menu:

-o

Select whether to print banner page

-o banner=never

-o banner=optional

Optional

Specifying a PPD Documents When Setting Up a Printer

To specify a PPD file as soon as adding or modifyinga printer by making use of LP print regulates, usage the lpadmin commandwith the -n option. For example, to add a print queue called foobar for a Lexnote printer, you would certainly form the following command:

# lpadmin -p foobar -v gadget -I postmanuscript -m standard_foomatic -n /path/Lexmark-Optra_E312-Postmanuscript.ppd.gz

When using the lpadmin -n commandto specify a PPD file, you need to carry out the full course to the PPD file.

If you use the lpadmin -n command also to include a PPD file, and also the repositorythat you specify in the PPD file path does not exist on the system, a copyof the PPD file is stored in the user label brochure,within the user repository. This brochure is locatedat /var/lp/ppd/user/manufacturer/ppd-file.The Solaris Print Manager cache is then updated to reflect the printer informationfrom the newly added PPD file. For even more indevelopment, watch the ppdmgr(1M) male web page.

How to Add a New Directly Attached Printer by UsingLP Print Commands

This procedure defines how to add a new attached printer specifyinga PPD file by making use of the lpadmin commandwith the -n choice. Two examples follow this procedure.The initially instance illustrates just how to add a brand-new attached printer that is associated with a PPD file. The second instance shows just how to adda brand-new attached printer that is notlinked through a PPD file.

Connect the printer to the system, then turn on the power to the printer.

Consult the printer vendor"s installation documentation for informationaround the hardware switches and also cabling requirements.

Log in tothe print server and also come to be superuser or assume an identical function.

Collect the indevelopment that is forced to configure an attachedprinter via PPD documents.

Printer name and port device

File content type

Define the printer name, port gadget, file content form, and also PPDfile that the printer will use.

When making use of PPD papers, the filecontent type is commonly PostScript.

Specify the interchallenge script that the printer will certainly usage.

# lpadmin -p printer-name -m standard_foomatic

(Optional) Add filters to the print server.

# cd /etc/lp/fd# for filter in *.fd;do > name=`basename $filter .fd` > lpfilter -f $ name-F $ filter > done

Enable the printer to accept print requests and to print thoseresearches.

# accept printer-name# enable printer-name

Verify that the printer is appropriately configured.

# lpstat -p printer-name -l

The output of the lpstat command also will list the PPDfile that you used.

Example5–1 Adding a New Directly Attached Printer by Specifying a PPD File

This instance reflects how to include a new attached printer with PPD documents. Using he -n option with the lpadmin commandenables you to add a new print queue by specifying PPD papers. The followinginformation is used as an instance only.

Printer name: paper

Port device: /dev/printers/0

Data content type: postscript

PPD file: /path/Lexmark-Optra_E312-Postscript.ppd.gz

# lpadmin -p paper -v /dev/printers/0 (1)# lpadmin -p paper -I postscript (2)# lpadmin -p paper -m standard_footmatic (3)# lpadmin -p paper -n /path/Lexmark-Optra_E312-Postscript.ppd.gz(4)# lpadmin -p paper -D "Color printer on 3rd floor, rm 3003" (5)# cd /etc/lp/fd# accept paperlocation “paper” now accepting requests # allow paper(6) printer “paper” now permitted # lpstat -p paper (7)printer paper is idle. enabled considering that Feb 28 11:21 2004...

Defines the printer name and the port gadget that the printerwill use

Sets the file content forms to which the printer can printto directly

Specifies the interconfront script for utilizing PPD files

Keep in mind –

This command likewise duplicates the PPD file to the user labelin the user PPD file repository, if /path isnot in an existing PPD file repository on the mechanism.

Specifies the course to the PPD file and also the PPD file name

Adds a description for the printer

Accepts print requests for the printer and also allows the printer

Verifies that the printer is all set for printing

Example5–2 Adding a New Directly Attached Printer Without Specifying a PPD File

This instance reflects exactly how to add a brand-new attached printer without associating it through a PPDfile.The commands in this example have to be executed on the print server where theprinter is linked. The following indevelopment is offered as an instance only.

Printer name: luna

Port device: /dev/term/b

Printer type: PS

Data content type: postscript

# chvery own lp /dev/term/b# chmod 600 /dev/term/b (1)# lpadmin -p luna -v /dev/term/b (2)# lpadmin -p luna -T PS (3)# lpadmin -p luna -I postscript (4)# lpadmin -p luna -D "Room 1954 ps" (5)# cd /etc/lp/fd# accept lunalocation “luna” now accepting requests # enable luna (6) printer “luna” now permitted # lpstat -p luna (7)printer luna is idle.allowed given that Feb 28 11:21 2003.available

Gives lp ownership and sole access to aport device

Defines the printer name and the port gadget that the printerwill certainly use

Sets the printer kind of the printer

Specifies the file content kinds to which the printer canprint directly

Adds a summary for the printer

Accepts print researches for the printer and permits the printer

Verifies that the printer is all set for printing

See Also

How to Add a Publish QueueWith localhost Specified as the Host Name (LP Publish Commands)

This procedure reflects just how to use LP print commands to include a regional printqueue through the localorganize choice specified as the organize name in the print device databases. Keep in mind that you can likewise modify a configured print queue to use localhost asthe organize name.

Set the print hold name to localhold.

# lpadmin -p new-print-queue -s localorganize -v device

Check the entry in the /etc/printers.conf file.

# lpgain new-print-queuenew-print-queue: bsdaddr=abc,new-print-queue,Solaris

If the print queue was produced or modified properly, the outputof the lpget command also returns the name of the brand-new or modifiedprint queue.

Example5–3 Adding a Print Queue With localorganize Specified as the Host Name

This instance mirrors exactly how to add a brand-new print queue, paper,by using the lpadmin command also with the -s optionto specify localhold as the host name.

$ su - root# lpadmin -p paper -s localorganize -v /dev/ecpp0# lpobtain paperpaper: bsdaddr=localhost,paper,Solaris

Example5–4 Adding a Publish Queue by Using the Default Behavior of lpadmin toSpecify the Host NameThis example shows the default actions of the lpadmin commandfor making use of device hold name, abc, as soon as adding a brand-new printqueue.

$ su - root# lpadmin -p newspaper -v /dev/printers/0# lpobtain newspaperfargo: bsdaddr=abc,newspaper,Solaris

Example5–5 Modifying a Publish Queue to Use localhold as theHost NameThis example mirrors just how to modify an existing print queue, newspaper, and specify localhost as the brand-new print servername.

$ su - root# lpadmin -p newspaper -s localhost# lpget newspapernewspaper: bsdaddr=localorganize,newspaper,Solaris

See AlsoFor indevelopment around specifying localhold as theprint server"s hold name once adding or editing a print queue through SolarisPrint Manager, watch How to Add a Publish Queue With localhost Specified as the Host Name (Solaris Publish Manager).

Setting Up Network-Attached Printers by UsingLP Publish Commands

A network-attached printer isa hardware tool that is straight connected to the netoccupational. This printerdeserve to be accessed from a print server without physically connecting the printerto the print server with a cable. The network-attached printer has actually its very own system nameand also IP attend to.

*
Caution –

Configuring a network-attached printer without utilizingqueue configuration on a print server is an unsupported technique that resultsin printer misconfiguration.

You have the right to properly connumber a network-attached printer by utilizing Solaris PrintManager. Select the New NetworkPrinter choice. Or, you have the right to use the lpadmin command also tocorrectly configure a network-attached.

Do not usage the lpadmin -p queue-name -s printer-name command or the Add Access to Printer alternative ofSolaris Print Manager to include a network-attached printer. These approaches shouldbe used solely to suggest to an already existing queue on a remote printserver. The print server contains queuing, filtering, and also print administrationcapabilities for a network-attached printer. Printing directly to a network-attachedprinter results in a printer misconfiguration that is likely to cause a numberof problems. Additionally, project choices, such as copies, the usage or disuseof burst page, and also filtering, are shed.

Netoccupational printers can use one or more distinct protocols that requirea vendor-gave printing routine. The procedures that are offered to set upthe vendor-offered printing program can differ. If the printer does not comevia vendor– offered support, couchsurfingcook.com Solaris network-attached printer supporthave the right to be used via many devices. Use the printer vendor-gave software program, wheneverpossible.

The seller might supply an SVR4 printer interconfront script to replacethe standard printer interface script. If so, that SVR4 interconfront manuscript callsthe vendor-supplied printing program to send the task to the printer. If not,you must modify the conventional interface manuscript to contact the vendor-suppliedprinting regimen. To perform so, modify the per-printer copy of the conventional interfacescript to call the vendor-supplied printing regimen.

The complying with are the terms that are provided in network-attached printerconfiguration. For a complete description of printing terms, check out Glossary.

Print server – Thedevice that spools and schedules the tasks for a printer.

Printer-hold device –The software program and also hardware gave by a seller that offers network-attached printer supportfor a non-netjob-related qualified printer.

Printer node – Eitherthe physical printer or the printer-host device.

Printer name – Thename typed on the command also line as soon as you use any type of of the printer regulates.

Destination or netjob-related printer accessname – The interior name of the printer node port that isprovided by the printer submechanism to accessibility the printer.

Timeout, or reattempt interval timeout – The seed number that representsthe variety of secs to wait in between attempting relationships to the printer.

couchsurfingcook.com Support for Network-related Printers

If the netoccupational printer merchant does not carry out software assistance, couchsurfingcook.com offered softwareis accessible. The software application provides generic support for network printers andis not capable of giving complete access to all feasible printer qualities.

A basic conversation of exactly how to add a network-attached printer is providedin Setting Up Network-Attached Printers by Using LP Publish Commands. The following is a conversation of printermonitoring once you use the couchsurfingcook.com provided software application.

Invoking Netoccupational Printer Support

The software support for network printers is dubbed through the networkinterface script netstandard. Configuring a network-attached printer withthis script causes the network-attached printer support module to bereferred to as. Here is the command also to connumber the printer via the netjob-related support.

lpadmin -p printer-name -m nettypical

Selecting the Printer Node Name

You choose the printer node name. This name have to be unique, as withany type of node on the netjob-related. The printer node name is connected through the IP addressof the printer.

Selecting the Destination Name (Also Calledthe Network-related Printer Access Name)

The print subsystem requires accessibility information for the printer. Thesubdevice uses the location name as soon as making the netjob-related link tothe printer. You supply this name to the print subsystem by utilizing the lpadmin command also. This name then becomes part of the printer configurationdatabase. The printer access name is the name of the printer node, sometimesqualified by a port name. Port designation varies across printer vendors.You can find information around port designation in the printer documentation.

Here is the format of printer access name:

printer-node-name<:port-designation>

Desticountry names deserve to be stated in one of 3 forms:

Atomic (simple)

(destination) - Is readdressed by locating a printer-uri-sustained key/value pair for the called destination in the printers.conf or the printers configuration database. Ifno printer-uri-sustained essential is uncovered for an entry, it"s bsdaddr value is converted to printer URI create and supplied.

For even more information, view the printers(4) and printers.conf(4) male pperiods.

Printer URI

(scheme://endpoint) - Is entirely resolvedand states the protocol and also communication endsuggest to call for printservices. This form of destination name is beneficial for accessing print servicesexternal of your system"s present management domain. Because the name includesthe protocol to use once contacting the print organization, you have the right to pick a richerprotocol than the RFC-1179 protocol.

POSIX

(server:queue<:extensions>) - Is completeand also resolves to an indistinguishable printer URI create of lpd://server/printers/queue<#extensions> This create is being kept for backward compatibility just. Theprinter URI develop is the preferred replacement.

Example5–6 Destination Name (or Netoccupational PrinterAccess Name) With Port Desigcountry (Number)

A prevalent port designation through TCP is 9100. If the printer node nameis pn1, and the printer merchant specifies the port as 9100,then the printer access name is pn1:9100. To configurea printer in this instance, usage the adhering to command:

lpadmin -p printer_name -o dest=pn1:9100

Example5–7 Destination Name (or Netoccupational PrinterAccess Name) With BSD Port Desigcountry (Name)When you use the BSD protocol, the port desigcountry can not be a number,yet some name characterized by the printer vendor, for example: xxx
_parallel_1. If the printer node name is cardboard, thenthe printer access name is cardboard:xxx_parallel_1. Toconfigure a printer in this instance, use the adhering to command:

lpadmin -p printer-name -o dest=cardboard:xxx_parallel_1

Example5–8 Destination Name (or Network PrinterAccess Name) With No Port DesignationIf tbelow is no port desigcountry, and the printer node name is newspaper, the printer accessibility name is the printer node name: newspaper.To connumber a printer in this case, use the adhering to command:

lpadmin -p printer-name -o dest=newspaper

Selecting the Network-related Printing Protocol

By default the LP print organization offers the BSD printprotocol and raw TCP to communicate through the printer. The printer seller documentationprovides information around which protocol to use. In basic, the TCP protocolis even more generic throughout printers.

Note –

The Device URI protocol was presented in the Solaris 10 5/08 release. This protocol enables remote printer accessibility.You deserve to specify a device-uri once adding a network-attached printerby making use of the lpadmin command also or by utilizing Solaris PrintManager.

To choose the BSD protocol, type:

lpadmin -p printer-name -o protocol=bsd

To select the TCP protocol, type:

lpadmin -p printer-name -o protocol=tcp

If the protocol that is selected is the BSD print protocol, you canadditionally pick the order of sfinishing the manage file to the printer. Someprinters expect the manage file, then the data file. Other printers expectthe reverse. For this indevelopment, check out the printer vendor documentation. Thedefault is to sfinish the control file initially.

To pick the order, kind among the complying with commands:

lpadmin -p printer-name -o bsdctrl=first

lpadmin -p printer-name -o bsdctrl=last

Setting the Timeout Value

The timeout alternative allows the user to choose the amount of time (inseconds) to wait between successive attempts to connect to the printer. Someprinters have a long warmth up time, and also a much longer timeout value is advised.The default is 10 seconds.

The timeout value does not affect the success or faientice of the printprocedure. The value is a seed worth that the software uses as the initial timeoutcount. On repetitive failures, this count is raised. A message is sent tothe spooler as soon as recurring attempts to affix to the printer fail. This messagealerts the user that treatment can be compelled. The faitempt could beanything from the printer being turned off to the printer being out of paper.If these messages are created also often, for example once the printer iswarming up, increasing the timeout worth will remove spurious messages.

You can experiment to discover the optimal timeout value. Type the followingcommand also to collection the timeout value:

lpadmin -p printer-name -o timeout=n

Managing Network-Attached Printer Access

Each network-attached printer need to have actually only one server that gives accessibility to theprinter. This restriction allows the server to control accessibility to the printerand also save work meaningful.

The default gadget for the network-attached printer is /dev/null. This tool is enough once the printer has actually onlyone queue. If more queues are forced, collection the gadget to a record. This settingenables the print mechanism to restrict accessibility to the printer throughout queues.The complying with commands produce a machine file and also connumber it as the network-attached printergadget.

touch /path/filenamechmod 600 /path/filenamelpadmin -p printer-name -v /path/filename

The following is an example of how to develop a machine file called devtreedvery own.

# touch /var/tmp/devtreedown# chmod 600 /var/tmp/devtreedown# lpadmin -p treedown -v /var/tmp/devtreedown

How to Add a New Network-Attached Printer byUsing LP Print Commands

This procedure describes exactly how to add a brand-new network-attached printer withthe broadened printer assistance that allows you to associate a PPD filewith a printer during its configuration. There are 2 examplesthat follow this procedure. The initially instance illustrates how to add a new network-attached printerthrough PPD records by utilizing lp regulates. The second exampleshows howto include a brand-new netjob-related printer without PPD files by using lp regulates.

The adhering to measures are forced to put up a network-attached printer by usingthe network printer assistance software application. The usage of this software is intendedfor printers that perform not come with vendor-supplied software application.

Connect the printer to the network, and revolve on the power to theprinter.

Consult the printer vendor"s installation documentationfor information around the hardware switches and cabling requirements. Getan IP address and choose a name for the printer node. This step is equivalentto including any node to the netoccupational.

Collect the information that is compelled to configure a brand-new network-attached printerwith PPD papers.

Printer name and port device

Network-related printer accessibility name

Protocol

Timeout

Documents content type

On the printserver, log in and also becomesuperuser or assume an indistinguishable role.

Define the printer name, port gadget, file content form, and also PPDfile that the printer will use. When utilizing PPD files, the file content typeis typically PostScript.

Specify the interconfront script that the printer will usage.

# lpadmin -p printer-name -m netstandard_foomatic

The interface script that is provided through the assistance software application for a network-attached printer is /usr/lib/lp/model/netstandard_foomatic.

Specify the printer summary.

# lpadmin -p printer-name -D "printer-description"

(Optional) Add filters to the print server.

# cd /etc/lp/fd# for filter in *.fd;do > name=`basename $ filter .fd` > lpfilter -f $name -F $ filter > done

Enable the printer to accept print researches and also to print thoserequests.

# accept printer-name# enable printer-name

Verify that the printer is effectively configured.

# lpstat -p printer-name

Example5–9 Adding a New Network-Attached Printer by Specifying a PPD FileThis instance shows just how to include a new network-attached printer withPPD records. The -n option of the lpadmin commandallows you to include a brand-new print queue by specifying a PPD file. The commands that are used in this exampleshould be executed on the print server. The following indevelopment is used asan instance only. The information that you provide will certainly vary.

Printer name : luna1

Device: /dev/null

Interface: /usr/lib/lp/model/netstandard_foomatic

Network printer accessibility name: nimquat:9100

Protocol: tcp

Timeout: 5

Documents content type: postscript

PPD file: /path/ppdfile

# lpadmin -p luna1 -v /dev/null (1)# lpadmin -p luna1 -m netstandard_foomatic (2)# lpadmin -p luna1 -o dest=nimquat:9100 -o protocol=tcp -o timeout=5 (3)

# lpadmin -p luna1 -I postscript (4)# lpadmin -p luna1 -n /path/ppdfile (5)# lpadmin -p luna1 -D "Second floor color printer"(6)# cd /etc/lp/fd# for filterin *.fd;do > name =`basename $ filter .fd` > lpfilter -f $ name -F $ filter > done (7)# accept luna1location "luna1" currently accepting requests# permit luna1 (8)printer "luna1" now enabled # lpstat -p luna1 (9) printer luna1 is idle. permitted given that Mon Apr 19 15:31:15 2004. available.
Defines printer name and also sets the tool to /dev/null

Defines the interface script for netoccupational printers

Sets the destination, protocol, and timeout

Specifies the file content types to which the printer canprint to directly

Specifies the PPD file to use

Adds a description for the printer

Adds print filters to the print server

Accepts print researches for the printer and also enables the printer

Verifies that the printer is ready for printing

Example5–10 Adding a New Network-Attached Printer Without Specifying a PPD File

This example shows just how to add a brand-new network-attached printer without specifying a PPDfile.Theseregulates have to be executed on the print server. The following indevelopment is provided for instance purposesonly.

Printer name: luna1

Device: /dev/null

Interface: /usr/lib/lp/model/netstandard

Network-related printer access name: nimquat:9100

Protocol: tcp

Timeout: 5

File content type: postscript

Printer type: PS

# lpadmin -p luna1 -v /dev/null (1)# lpadmin -p luna1 -m netstandard (2)# lpadmin -p luna1 -o dest=nimquat:9100 -o protocol=tcp -o timeout=5 (3)# lpadmin -p luna1 -I postmanuscript -T PS (4)# lpadmin -p luna1 -D "Room 1954 ps" (5)# cd /etc/lp/fd# for filter in *.fd;do > name =`basename $ filter .fd` > lpfilter -f $ name -F $ filter > done (6)# accept luna1destination "luna1" currently accepting requests# allow luna1 (7)printer "luna1" currently allowed # lpstat -p luna1 (8)printer luna1 is idle.enabled considering that Feb 28 11:21 2003.available.

Defines printer name and also sets the device to /dev/null

Defines the interface manuscript for netjob-related printers

Sets the location, protocol, and timeout

Specifies the file content type to which the printer deserve to printdirectly, and also the printer type

Adds a summary for the printer

Adds print filters to the print server

Accepts print requests for the printer and permits the printer

Verifies that the printer is prepared for printing

How to Set Up a Remote Printer That is Connected toa Publish Serverby Using IPP

To setup a remote printer,choose among the following methods:

Use the lpadmin command:

# lpadmin -p printer -s ipp://printer-ip-address/printers/printer-name

Usethe lpsetcommand:

# lpset -a printer-uri-supported=ipp://printer-ip-address/printers/printer-name

Using the lpset commandvia the -a choice accepts key/value pairs. In the preceding output, the essential thatis mentioned is printer-uri-supported, via the worth being ipp://printer-ip-address/printers/printer-name. Typically, youwould certainly not configure this worth to refer directly to a printer, yet rathera print queue on a print server.

(Optional) To identify the URI you have actually supplied,kind the complying with command:

$ lpstat -p ipp://printer-ip-address/printers/printer-name

When you usage the lpstat command and specify the URIas the location, the neighborhood printing configuration is bypassed, connectingyou directly to the network-attached printer or the remote print server.

Adding a New Network-Attached Printerby Using Printer Vendor-Supplied Software

Network-related printers regularly have software application assistance gave by the printervendor. If your printer has actually printer vendor- offered software, use the printervendor software application, as soon as possible. The software program is designed to support the attributesof the printer and have the right to take complete advantage of the printer capabilities. Readthe printer vendor documentation to install and also connumber the printer, sothat it deserve to run with the LP print organization.

How to Add a Attached Network Printer byUsing Printer Vendor-Supplied Tools

Connect the printer to the network. Turnon the power to the printer.

Consult the printer vendor"s installationdocumentation for indevelopment around the hardware switches and also cabling requirements.Get an IP deal with and also select a name for the printer node. This technique is equivalentto including any kind of node to the network-related.

Follow the printer vendor instructionsto include the network-attached printer.

Use the printer merchant instructions to configurethe network-attached printer. These instructions are certain to the merchant and printer.

Setting Up and Administering Printers on a PrintClient (Task Map)Table5–1 Printer Setup and Administration on a Print Client (TaskMap)

Task

Description

For Instructions

Add printer accessibility by making use of LP print commands.

Use LP print commands to include printer accessibility on the print client.

How to Add Printer Access by Using LP Print Commands

Set up a .printers file.

Use a $HOME/.printers file so that users deserve to establishtheir own custom printer aliases.

How to Set Up a .printers File

Delete a printer and rerelocate printer access.

If a printer requirements to be reinserted or moved to a different area,you have the right to delete information around the printer from the print-client.

How to Delete a Printer and also Remove Printer Access by Using LP Print Commands

Adding Printer Access by Using LP Print Commands

A print client is a system that is not the serverfor the printer. Yet, this system has actually accessibility to the printer. A print clientoffers the services of the print server to spool, schedule, and filter the printtasks. Keep in mind that one mechanism have the right to be a print server for one printer and also be aprint client for an additional printer.

Access to a printer can be configured on a domain-wide basis or on aper-machine basis. If you include the printer indevelopment to the naming servicedatabase, access is configured on a domain-wide basis.

How to Add Printer Access by Using LP Publish Commands

Add access to the printer.

# lpadmin -p printer -s print-server -D description

Set the printer as the system"s default printer location.

# lpamin -d printer

Verify that the printer is ready for printing.

# lpstat -p printer

Example5–11 Adding Printer Access by Using lp Publish CommandsIf you desire to print to a remote printer, you should add accessibility to theremote printer. This example shows how to configure accessibility to a printer named luna, whose print server is sarotate.

# lpadmin -p luna -s saturn (1)# lpadmin -p luna -D "Room 1954 ps" (2)# lpadmin -d luna (3)# lpstat -p luna (4)

Identifies the printer and also the print server

Adds a summary for the printer

Sets the printer as the system"s default printer destination

Verifies that the printer is all set for printing

Setting Up a .printers File

The .printers file is situated in a user"s homedirectory. This file has indevelopment around a user"s default printer andvarious other commonly offered printers. Having a .printers filepermits individuals to develop their very own printer aliases. For example, a _default alias have the right to be offered to specify a user"s default printer. Also, aunique _all alias deserve to be used to define a list of printersthat are influenced once a print task is canceled or to inspect the status of printers.

The use of the .printers file by the LP print serviceis managed by the naming company switch (/etc/nsswitch.conf).The default configuration specifies that the print service checks a user"sresidence directory to locate printer configuration information prior to it checksthe various other naming services. So, you have the right to tailor a user"s printer configurationfile to use custom printer information rather than the common informationin the naming company.

For more indevelopment around the .printers file,view the printers(4) manweb page. For more information around the naming organization switch, watch the nsswitch.conf(4) male page.

How to Set Up a .printers File

This procedure reflects users how to erected .printers filein their own home directories.

Log in to the system with your user nameand password.

If crucial, adjust directories to $HOME.

$ cd $HOME

Start the text editor that you desire touse to develop a .printers file.

(Optional) Set up the _all aliasto define the printers affected once you cancel a print request or examine thecondition of printers. Use an entry equivalent to this enattempt.

_all printer1,printer2,printer3

Save the file as .printers.

Howto Delete a Printer and Remove Printer Access by Using LP Publish Commands

Log in as superuser, lp,or assume an identical function on the print server.

Verify that the printer indevelopment has actually beendeleted:

Confirm that the printer information has beendeleted on the print client.

$ lpstat -p printer-name -l

In the command also output, you need to obtain an error indicating that theprinter does not exist.

Confirm that the printer information has actually beendeleted on the print server.

$ lpstat -p printer-name -l

In the command also output, you should get an error indicating that theprinter does not exist.

See more: Vita Urbana 6 Ft X 6 Ft Keyhole 6 Ft. X 6 Ft. Composting Garden Bed

Example5–12 Deleting a Printer and also Remote Printer Access

The adhering to example reflects how to delete the printer luna fromthe print client terra and from the print server jupiter. This example additionally shows exactly how to delete the print client terra from the print server.

terra# lpadmin -x lunaRemoved “luna”.terra# lpstat -p luna -l jupiter# lpadmin -x lunaRerelocated “terra”.jupiter# lpstat -p luna -l