fncreate_printer creates a new printer context for an organization, user, host, or site object. compositename is the FNS name of the object. fncreate_printer uses printername to name the new printer and binds it to an FNS reference constructed from the set of printeraddrs. fncreate_printer may also be used to add new printeraddrs for an existing printername.
The command also supports creating a set of printers as listed in the file filename.
The new printer context is created with the FNS name <compositename>/service/printer/<printername>. If the intermediate service or printer names do not exist, their FNS contexts are also created by this command. Normally, these intermediate contexts would be created by an administrative script that uses fncreate(1M), and is run at the time a new FNS organization is set up. The reference bound to the FNS printer name is of type onc_printers and is constructed from the set of printeraddrs. A printeraddr is of the form <addresstype> = <address>. See printers.conf(4) for the format of printeraddr and also the examples below for currently supported address types and address strings.
The printername argument may be a slash-separated name. In this case, prior to creating the printer context denoted by the ``leaf'' name, this command will create printer context(s) for the intermediate node(s) if they do not already exist. See EXAMPLES.
fncreate_printer creates entries in the naming service determined by fnselect(1M). See fnselect(1M) for more information on the default naming service and on selecting a naming service. Furthermore, the process executing the fncreate_printer command may require certain credentials to update information in the underlying namespace. See fns_nis+(5), fns_nis(5), and fns_files(5) for more information.
The new address supersedes an existing address with the same addresstype, if any, for <compositename>/service/printer/<printername>. If this option is omitted, it appends the printeraddr to an existing reference, or creates a new reference using printeraddr for the printer.
Displays information about individual printer contexts as they are created.
Use filename to obtain a list of printers for which to create contexts. If this option is omitted, /etc/printers.conf is used as the input file, in which case the -s option should be used to supersede the entries already present in this file.
The file that contains a list of printers to be created. This file uses the same format as /etc/printers.conf. See printers.conf(4) for more information.
The name of the new printer context created.
An address to be associated with the printer context name.
The FNS name for the org, host, user, or site object for which the new printer contexts are created.
The following examples illustrate creating a set of printer contexts under an organization, a printer context for a user, and a printer context associated with a hierarchical printer name for a site, respectively. To create printers for an organization:
example% fncreate_printer -s org/marketing
To create a printer named ps for user jsmith and associate it with the killtree printer served by the print server paperwaster:
example% fncreate_printer -s usr/jsmith ps bsdaddr=paperwaster,killtree
example% lp -d thisuser/service/printer/ps <filename>
To create a printer with the hierarchical name color/fast under a site:
example% fncreate_printer site/bldg14/northwing color/fast \ bsdaddr=paperwaster,laser
See attributes(5) for descriptions of the following attributes:
|ATTRIBUTE TYPE||ATTRIBUTE VALUE|