This chapter explains how to set up printers and also make those printersaccessible to systems on the network by making use of LP print commands.

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 summary information around printing, check out Chapter1, advent to to press in the couchsurfingcook.com Solaris operating System.

Setting up Printers by utilizing LP Print commands (Task Map)

Task

Description

For Instructions

Add a brand-new directly attached printer by using LP print commands.

Use LP print business commands to make the printer obtainable for printingafter you physically attach the press to a system.

How to add a brand-new Directly Attached printer by using LP print Commands

Use the lpadmin command to include a printer queue v localhost stated as the hold name.

Use the lpadmin command v the -s optionto specify localhost as the host name when setup up alocal print queue. This change was included to allow print servers tomaintain the very same print host name, localhost, independentof the machine host name.

How to add a print Queue through localhost specified as the host Name (LP publish Commands)

Add a brand-new network-attached printer by utilizing LP print servicecommands.

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

How to include a new Network-Attached printer by making use of LP publish Commands

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

To add access to a remote print queue by using IPP, there are two methodsthat you have the right to do oneof the following:

Use the lpadmin command.

Use the lpset command.

How to collection Up a Remote press That is connected to a publish Server by utilizing IPP

Add a new network-attached press by utilizing the press vendor-suppliedsoftware.

Use Printer seller supplied tools to configure a network-attached press afteryou physically affix the press to the network.

How to include a fastened Network printer by utilizing Printer Vendor-Supplied Tools

Setting Up directly Attached Printers by utilizing LPPrint Commands

The complying with table defines each the the printer interpretations that you can define when settingup a new printer or editing and enhancing an existing printer by utilizing the lpadmin command.

Printer Definition

Print Command Option

Description

Example

Default Setting

Required/Optional?

Printer Name

-p

Name of printer

laser1

N/A

Required to install an enclosed or network-attached printer

Print server

Name of print server

venus

Use localhost for printer Server

Required to download an attached or network-attached printer

Description

-d

User identified string

laser printer close to breakroom

N/A

Optional

Printer Port

-v

Device the the printer is enclosed to

/dev/term/a

/dev/term/a

Required to download an enclosed printer

Printer Type

-T

Type that printer

unknown

PostScript

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

File content Type

-I

Content to be printed

any

PostScript

Required to download an attached press or a network-printer press withoutPPD files

PPD file name

-n

Full course to the PPD record and record name through .ppd extension.

path/necprinter.ppd

N/A

Optional

Fault Notification

-A

Specifies how to educate user that errors

-A mail

Write come superuser

Optional

Default Printer

-d

Identifies the default printer

N/A

N/A

Optional

Banner Page manage Menu:

-o

Select even if it is to print banner page

-o banner=never

-o banner=optional

Optional

Specifying a PPD document When setting Up a Printer

To clues a PPD document when including or modifyinga press by utilizing LP publish commands, use the lpadmin commandwith the -n option. Because that example, to add a print queue called foobar because that a Lexmark printer, girlfriend would type the complying with command:

# lpadmin -p foobar -v device -I postscript -m standard_foomatic \-n /path/Lexmark-Optra_E312-Postscript.ppd.gz

When making use of the lpadmin -n commandto specify a PPD file, girlfriend must administer the full path to the PPD file.

If you usage the lpadmin -n command to include a PPD file, and the repositorythat girlfriend specify in the PPD document path does not exist top top the system, a copyof the PPD file is save on computer in the user label directory,within the user repository. This directory is locatedat /var/lp/ppd/user/manufacturer/ppd-file.The Solaris print Manager cache is then updated come reflect the press informationfrom the recently added PPD file. For much more information, see the ppdmgr(1M) guy page.

How to add a new Directly Attached printer by UsingLP publish Commands

This procedure defines how to include a brand-new attached printer specifyinga PPD paper by using the lpadmin commandwith the -n option. Two instances follow this procedure.The first example illustrates how to include a brand-new attached press that is linked with a PPD file. The second example shows just how to adda brand-new attached press that is notassociated with a PPD file.

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

Consult the printer vendor"s installation documentation because that informationabout the hardware switches and also cabling requirements.

Log in tothe publish server and also become superuser or i think an identical role.

Collect the details that is compelled to configure an attachedprinter v PPD files.

Printer name and port device

File contents type

Define the press name, port device, paper content type, and PPDfile the the printer will use.

When using PPD files, the filecontent form is typically PostScript.

Specify the interface script that the printer will certainly use.

# 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 publish requests and also to print thoserequests.

# accept printer-name# enable printer-name

Verify that the printer is effectively configured.

# lpstat -p printer-name -l

The calculation of the lpstat command will list the PPDfile the you used.

Example5–1 including a new Directly Attached printer by clues a PPD File

This instance shows exactly how to include a brand-new attached printer with PPD files. Utilizing he -n alternative with the lpadmin commandenables you to include a new print queue by clues PPD files. The followinginformation is provided as an example only.

Printer name: paper

Port device: /dev/printers/0

File contents type: postscript

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

# lpadmin -p paper -v /dev/printers/0 (1)# lpadmin -p file -I postscript (2)# lpadmin -p record -m standard_footmatic (3)# lpadmin -p document -n /path/Lexmark-Optra_E312-Postscript.ppd.gz(4)# lpadmin -p record -D "Color press on 3rd floor, rm 3003" (5)# cd /etc/lp/fd# accept paperdestination “paper” currently accepting requests # enable paper(6) printer “paper” now allowed # lpstat -p paper (7)printer paper is idle. Enabled since Feb 28 11:21 2004...

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

Sets the record content varieties to i beg your pardon the printer have the right to printto directly

Specifies the interface script for using PPD files

Note –

This command likewise copies the PPD document to the user labelin the user PPD paper repository, if /path isnot in an present PPD record repository on the system.

Specifies the path to the PPD record and the PPD document name

Adds a description for the printer

Accepts publish requests because that the press and allows the printer

Verifies the the printer is all set for printing

Example5–2 adding a brand-new Directly Attached printer Without point out a PPD File

This example shows how to add a brand-new attached press without link it with a PPDfile.The commands in this instance must be executed on the print server wherein theprinter is connected. The following information is used as an instance only.

Printer name: luna

Port device: /dev/term/b

Printer type: PS

File content type: postscript

# chown 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 lunadestination “luna” currently accepting inquiry # enable luna (6) printer “luna” now enabled # lpstat -p luna (7)printer luna is idle.enabled because Feb 28 11:21 2003.available

Gives lp ownership and also sole accessibility to aport device

Defines the printer name and also the port an equipment that the printerwill use

Sets the printer kind of the printer

Specifies the document content types to i beg your pardon the press canprint directly

Adds a summary for the printer

Accepts print requests because that the press and enables the printer

Verifies the the printer is prepared for printing

See Also

How to add a print QueueWith localhost mentioned as the host Name (LP print Commands)

This procedure shows exactly how to usage LP print commands to include a regional printqueue through the localhost choice specified together the hold name in the print device databases. Keep in mind that friend can also modify a configured publish queue to usage localhost asthe host name.

Set the print hold name come localhost.

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

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

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

If the publish queue was developed or amendment successfully, the outputof the lpget command returns the surname of the brand-new or modifiedprint queue.

Example5–3 adding a print Queue through localhost specified as the host Name

This instance shows just how to add a new print queue, paper,by using the lpadmin command with the -s optionto point out localhost as the organize name.

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

Example5–4 adding a publish Queue by making use of the Default behavior of lpadmin toSpecify the hold NameThis instance shows the default behavior of the lpadmin commandfor using system host name, abc, when including a new printqueue.

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

Example5–5 editing and enhancing a publish Queue to usage localhost as theHost NameThis example shows how to change an existing print queue, newspaper, and also specify localhost as the new print servername.

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

See AlsoFor information around specifying localhost together theprint server"s host name when adding or editing a print queue with SolarisPrint Manager, see exactly how to include a print Queue through localhost specified as the hold Name (Solaris publish Manager).

Setting up Network-Attached Printers by UsingLP print Commands

A network-attached printer isa hardware maker that is directly associated to the network. This printercan it is in accessed indigenous a print server there is no physically connecting the printerto the print server v a cable. The network-attached printer has actually its own mechanism nameand IP address.

*
Caution –

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

You have the right to correctly configure a network-attached press by using Solaris PrintManager. Select the brand-new NetworkPrinter option. Or, you deserve to use the lpadmin command tocorrectly configure a network-attached.

Do not usage the lpadmin -p queue-name -s printer-name command or the Add access to Printer option ofSolaris print Manager to include a network-attached printer. These techniques shouldbe used exclusively to suggest to an already existing queue ~ above a far printserver. The print server contains queuing, filtering, and print administrationcapabilities because that a network-attached printer. Printing straight to a network-attachedprinter results in a printer misconfiguration that is most likely to reason a numberof problems. Additionally, project options, such together copies, the usage or disuseof to explode page, and filtering, space lost.

Network printers might use one or an ext special protocols the requirea vendor-supplied printing program. The procedures that are supplied to set upthe vendor-supplied printing program have the right to vary. If the printer does not comewith vendor– provided support, couchsurfingcook.com Solaris network-attached printer supportcan be supplied with many devices. Usage the press vendor-supplied software, wheneverpossible.

The merchant might it is provided an SVR4 printer user interface script come replacethe typical printer interface script. If so, that SVR4 user interface script callsthe vendor-supplied printing regimen to send the task to the printer. If not,you must modify the standard user interface script to contact the vendor-suppliedprinting program. To perform so, edit the per-printer copy the the conventional interfacescript to contact the vendor-supplied printing program.

The following are the terms the are supplied in network-attached printerconfiguration. For a finish description of printing terms, watch Glossary.

Print server – Thesystem that spools and schedules the jobs for a printer.

Printer-host device –The software and hardware supplied by a merchant that offers network-attached printer supportfor a non-network qualified printer.

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

Printer name – Thename typed on the command line when you use any of the printer commands.

Destination or network press accessname – The inner name of the press node port the isused by the press subsystem to access the printer.

Timeout, or retry term timeout – The particle number that representsthe variety of seconds to wait in between attempting relationships to the printer.

couchsurfingcook.com support for Network Printers

If the network printer merchant does not administer software support, couchsurfingcook.com gave softwareis available. The software gives generic assistance for network printers andis not capable of giving full accessibility to all feasible printer attributes.

A general conversation of just how to include a network-attached printer is providedin setup Up Network-Attached Printers by using LP publish Commands. The adhering to is a discussion of printermanagement once you usage the couchsurfingcook.com supplied software.

Invoking Network printer Support

The software application support for network printers is dubbed through the networkinterface manuscript netstandard. Configuring a network-attached printer withthis script causes the network-attached printer support module come becalled. Here is the command come configure the printer v the network support.

lpadmin -p printer-name -m netstandard

Selecting the printer Node Name

You pick the printer node name. This name have to be unique, together withany node on the network. The printer node surname is connected with the IP addressof the printer.

Selecting the location Name (Also Calledthe Network Printer access Name)

The print subsystem requires accessibility information because that the printer. Thesubsystem supplies the location name as soon as making the network link tothe printer. You it is provided this surname to the print subsystem by making use of the lpadmin command. This surname then becomes part of the printer configurationdatabase. The printer access name is the name of the press node, sometimesqualified by a harbor name. Harbor designation varies throughout printer vendors.You can uncover information around port designation in the printer documentation.

Here is the format of printer access name:

printer-node-name<:port-designation>

Destination names can be mentioned in one of three forms:

Atomic (simple)

(destination) - Is addressed by locating a printer-uri-supported key/value pair because that the named location in the printers.conf or the printers configuration database. Ifno printer-uri-supported crucial is discovered for an entry, it"s bsdaddr worth is convert to printer URI kind and used.

For much more information, watch the printers(4) and printers.conf(4) guy pages.

Printer URI

(scheme://endpoint) - Is fully resolvedand mentions the protocol and also communication endpoint to contact for printservices. This type of destination name is helpful for accessing print servicesoutside of her system"s existing management domain. Since the name includesthe protocol come use once contacting the publish service, friend can choose a richerprotocol 보다 the RFC-1179 protocol.

POSIX

(server:queue<:extensions>) - Is completeand resolves to an equivalent printer URI type of lpd://server/printers/queue<#extensions> This kind is being kept for backward compatibility only. Theprinter URI type is the desired replacement.

Example5–6 destination Name (or Network PrinterAccess Name) v Port Designation (Number)

A typical port designation through TCP is 9100. If the press node nameis pn1, and the printer vendor defines the port as 9100,then the printer access name is pn1:9100. Come configurea press in this case, usage the following command:

lpadmin -p printer_name -o dest=pn1:9100

Example5–7 destination Name (or Network PrinterAccess Name) with BSD port Designation (Name)When you usage the BSD protocol, the harbor designation could not be a number,but some name characterized by the press vendor, because that 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 case, 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 there is no harbor designation, and the press node name is newspaper, the printer accessibility name is the press node name: newspaper.To configure a printer in this case, use the following command:

lpadmin -p printer-name -o dest=newspaper

Selecting the Network printing Protocol

By default the LP print business uses the BSD printprotocol and also raw TCP to interact with the printer. The printer seller documentationprovides information about which protocol to use. In general, the TCP protocolis an ext generic across printers.

Note –

The maker URI protocol was presented in the Solaris 10 5/08 release. This protocol allows remote press access.You have the right to specify a device-uri when including a network-attached printerby using the lpadmin command or by utilizing Solaris PrintManager.

To choose the BSD protocol, type:

lpadmin -p printer-name -o protocol=bsd

To pick the TCP protocol, type:

lpadmin -p printer-name -o protocol=tcp

If the protocol that is selected is the BSD print protocol, you canfurther pick the bespeak of sending out the control file to the printer. Someprinters intend the manage file, climate the data file. Various other printers expectthe reverse. For this information, view the printer seller documentation. Thedefault is to send the control document first.

To pick the order, form one the the complying with commands:

lpadmin -p printer-name -o bsdctrl=first

lpadmin -p printer-name -o bsdctrl=last

Setting the Timeout Value

The timeout option permits the user to choose the quantity of time (inseconds) come wait between successive make the efforts to attach to the printer. Someprinters have a long warm up time, and a longer timeout worth is advised.The default is 10 seconds.

The timeout value does not influence the success or failure of the printprocess. The worth is a seed value that the software provides as the early timeoutcount. On repeated failures, this count is increased. A post is sent tothe spooler as soon as repeated make the efforts to connect to the printer fail. This messagealerts the user the intervention might be required. The failure could beanything native the press being turned turn off to the press being out of paper.If these messages are created too often, for example when the printer iswarming up, increasing the timeout worth will eliminate spurious messages.

You have the right to experiment to uncover the optimal timeout value. Kind the followingcommand to set the timeout value:

lpadmin -p printer-name -o timeout=n

Managing Network-Attached press Access

Each network-attached press should have only one server that provides accessibility to theprinter. This restriction permits the server to manage accessibility to the printerand keep work coherent.

The default an equipment for the network-attached press is /dev/null. This machine is adequate when the printer has onlyone queue. If an ext queues are required, set the maker to a file. This settingenables the print device to restrict accessibility to the printer throughout queues.The following regulates create a device document and configure it as the network-attached printerdevice.

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

The adhering to is an example of exactly how to create a device file called devtreedown.

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

How to include a new Network-Attached printer byUsing LP print Commands

This procedure defines how to add a brand-new network-attached printer withthe expanded printer assistance that permits you to associate a PPD filewith a printer during its configuration. There are two examplesthat follow this procedure. The first example illustrates just how to add a new network-attached printerwith PPD files by utilizing lp commands. The 2nd exampleshows howto include a brand-new network press without PPD records by using lp commands.

The complying with steps are forced to set up a network-attached press by usingthe network printer assistance software. The use of this software is intendedfor printers that do not come v vendor-supplied software.

Connect the printer to the network, and also turn top top the power to theprinter.

Consult the press vendor"s surroundings documentationfor information about the hardware switches and also cabling requirements. Getan IP attend to and choose a surname for the printer node. This step is equivalentto including any node to the network.

Collect the information that is forced to configure a new network-attached printerwith PPD files.

Printer name and also port device

Network printer accessibility name

Protocol

Timeout

File contents type

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

Define the printer name, port device, paper content type, and PPDfile that the printer will use. As soon as using PPD files, the document content typeis typically PostScript.

Specify the interface script that the printer will certainly use.

# lpadmin -p printer-name -m netstandard_foomatic

The interface script the is provided with the support software program for a network-attached press is /usr/lib/lp/model/netstandard_foomatic.

Specify the press description.

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

(Optional) add filters come the publish 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 publish requests and also to print thoserequests.

# accept printer-name# enable printer-name

Verify the the press is effectively configured.

# lpstat -p printer-name

Example5–9 including a new Network-Attached printer by specifying a PPD FileThis instance shows just how to add a brand-new network-attached printer withPPD files. The -n choice of the lpadmin commandenables girlfriend to add a new print queue by point out a PPD file. The commands that are used in this examplemust be executed on the print server. The complying with information is provided asan example only. The details that you administer will vary.

Printer surname : luna1

Device: /dev/null

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

Network printer accessibility name: nimquat:9100

Protocol: tcp

Timeout: 5

File 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 luna1destination "luna1" currently accepting requests# enable luna1 (8)printer "luna1" now allowed # lpstat -p luna1 (9) press luna1 is idle. Enabled since Mon Apr 19 15:31:15 2004. Available.
Defines printer name and sets the maker to /dev/null

Defines the user interface script for network printers

Sets the destination, protocol, and timeout

Specifies the record content species to which the press canprint to directly

Specifies the PPD paper to use

Adds a summary for the printer

Adds print filters to the publish server

Accepts print requests because that the printer and allows the printer

Verifies that the press is all set for printing

Example5–10 including a new Network-Attached press Without point out a PPD File

This example shows exactly how to include a brand-new network-attached press without specifying a PPDfile.Thesecommands should be executed on the publish server. The adhering to information is supplied for instance purposesonly.

Printer name: luna1

Device: /dev/null

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

Network 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 postscript -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 $ surname -F $ filter > done (6)# accept luna1destination "luna1" currently accepting requests# enable luna1 (7)printer "luna1" now permitted # lpstat -p luna1 (8)printer luna1 is idle.enabled due to the fact that Feb 28 11:21 2003.available.

Defines printer name and also sets the an equipment to /dev/null

Defines the interface script because that network printers

Sets the destination, protocol, and timeout

Specifies the document content form to i m sorry the printer have the right to printdirectly, and the press type

Adds a description for the printer

Adds publish filters to the publish server

Accepts publish requests for the printer and enables the printer

Verifies that the press is ready for printing

How to set Up a Remote press That is associated toa print Serverby using IPP

To setup a far printer,choose one of the complying with methods:

Use the lpadmin command:

# lpadmin -p press -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 commandwith the -a option accepts key/value pairs. In the preceding output, the vital thatis mentioned is printer-uri-supported, through the value being ipp://printer-ip-address/printers/printer-name. Typically, youwould no configure this value to refer straight to a printer, but rathera print queue on a print server.

(Optional) To identify the URI you have supplied,type the following command:

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

When you use the lpstat command and also specify the URIas the destination, the neighborhood printing construction is bypassed, connectingyou straight to the network-attached press or the remote print server.

Adding a new Network-Attached Printerby making use of Printer Vendor-Supplied Software

Network printers frequently have software program support noted by the printervendor. If your printer has printer vendor- gave software, usage the printervendor software, when possible. The software is designed to assistance the attributesof the printer and can take full advantage of the printer capabilities. Readthe printer vendor documentation to install and also configure the printer, sothat it deserve to operate through the LP print service.

How to add a attached Network printer byUsing press Vendor-Supplied Tools

Connect the press to the network. Turnon the strength to the printer.

Consult the printer vendor"s installationdocumentation for information about the hardware switches and cabling requirements.Get an IP deal with and select a name for the printer node. This technique is equivalentto including any node come the network.

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

Use the printer merchant instructions come configurethe network-attached printer. These instructions are details to the vendor and printer.

Setting Up and Administering Printers on a PrintClient (Task Map)Table5–1 press Setup and administration on a Print customer (TaskMap)

Task

Description

For Instructions

Add printer accessibility by making use of LP publish commands.

Use LP print commands to add printer accessibility on the publish client.

How to add Printer accessibility by making use of LP publish Commands

Set up a .printers file.

Use a $HOME/.printers document so the users have the right to establishtheir own custom press aliases.

How to collection Up a .printers File

Delete a printer and also remove printer access.

If a printer requirements to be changed or moved to a different location,you deserve to delete information about the press from the print-client.

How come Delete a Printer and Remove Printer accessibility by utilizing LP publish Commands

Adding Printer access by using LP print Commands

A print client is a system that is not the serverfor the printer. Yet, this mechanism has access to the printer. A publish clientuses the services of the print server to spool, schedule, and filter the printjobs. Note that one system can be a print server for one printer and also be aprint client for an additional printer.

Access come a printer can be configured ~ above a domain-wide basis or top top aper-machine basis. If you include the printer details to the naming servicedatabase, access is configured top top a domain-wide basis.

How to add Printer access by utilizing 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 destination.

# lpamin -d printer

Verify that the printer is ready for printing.

# lpstat -p printer

Example5–11 including Printer accessibility by making use of lp print CommandsIf you desire to print to a far printer, you must add access to theremote printer. This instance shows how to configure access to a printer named luna, whose print server is saturn.

# 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 the publish server

Adds a description for the printer

Sets the printer together the system"s default press destination

Verifies that the printer is ready for printing

Setting increase a .printers File

The .printers paper is situated in a user"s homedirectory. This paper includes information around a user"s default press andother generally used printers. Having actually a .printers fileenables customers to establish their very own printer aliases. Because that example, a _default alias deserve to be provided to specify a user"s default printer. Also, aspecial _all alias can be provided to define a perform of printersthat are affected when a publish job is canceled or to examine the condition of printers.

The usage of the .printers document by the LP print serviceis controlled by the naming company switch (/etc/nsswitch.conf).The default configuration mentions that the print service checks a user"shome directory to find printer configuration information before it checksthe various other naming services. So, you have the right to tailor a user"s printer configurationfile come use custom printer info rather than the mutual informationin the specify name service.

For much more information around the .printers file,see the printers(4) manpage. For much more information about the naming company switch, see the nsswitch.conf(4) man page.

How to collection Up a .printers File

This procedure shows users exactly how to set up .printers filein your own home directories.

Log in come the mechanism with your user nameand password.

If necessary, readjust directories to $HOME.

$ cd $HOME

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

(Optional) set up the _all aliasto define the printers impacted when friend cancel a publish request or inspect thestatus of printers. Usage an entry comparable to this entry.

_all printer1,printer2,printer3

Save the document as .printers.

Howto Delete a Printer and Remove Printer access by using LP publish Commands

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

Verify that the press information has actually beendeleted:

Confirm that the printer information has actually beendeleted on the publish client.

$ lpstat -p printer-name -l

In the command output, you need to receive one error indicating that theprinter does not exist.

Confirm that the press information has beendeleted ~ above the print server.

$ lpstat -p printer-name -l

In the command output, you have to receive 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 Remote printer Access

The following example shows exactly how to delete the press luna indigenous print customer terra and also from the publish server jupiter. This example also shows exactly how to delete the print customer terra indigenous the publish server.

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