Solaris Naming Administration Guide

Creating Printer Contexts

The fncreate_printer command creates printer contexts for organizations, users, hosts and site contexts. The printer context is created under the service context of the respective composite name.

fncreate_printer [-vs] name printer [prntaddr]

fncreate_printer [-vs] [-f [file]] name
Table 20-7 fncreate_printer Command Options




The name of the org, host, user, or site of the printer 


The name of the printer 


The printer address in the form <addresstype>=<address>

-f file

Use the named file as input for a list of printers to be created. The input file is in the format of the /etc/printers.conf file. If neither a printer name nor a -f file is specified, fncreate_printer uses the /etc/printer.conf file on the machine where fncreate_printer is run as a default input file.


Replace an existing address with the same address-type. 


Verbose. Displays the binding in more detail 

For example:

To create printers for the sales organization based on the printers listed in the /etc/printers.conf file of the machine on which fncreate_printer is run:

# fncreate_printer -s org/sales/

Assume that the machine altair is the server for a printer named Sparc-5. To create a printer named invoices for the user nguyen that is actually the Sparc-5 printer:

# fncreate_printer user/nguyen invoices bsdaddr=altair,Sparc-5

It is also possible to organize printers hierarchically. For example, the fncreate_printer command can create printer contexts for the printers, color, color/inkjet and color/Sparc with the resulting contexts:


To create the above contexts, you would run:

# fncreate_printer org/ color bsdaddr=colorful,color
# fncreate_printer org/ color/inkjet bsdaddr=colorjet,inkjet
# fncreate_printer org/ color/Sparc bsdaddr=colorprt,Sparc