System Administration Guide

How to Add Domain-Wide Access to a Printer using NIS

On the NIS master server, run the lpset command to create a printers.conf file; then create and push the map. This gives all members of the domain access to the printers defined in the map. See lpset(1M).

  1. Become superuser on the NIS master server.

  2. Create a printers.conf file by using the lpset command for each printer.


    # lpset -a bsdaddr=server1,printer1,extensions printer1
    
    -a bsdaddr=server1,printer1,extensions
    

    Adds the print server, printer destination, and enables Solaris protocol extensions. 

    printer1

    Specifies the printer name. 

  3. Create and push the NIS map.


    # make -f /var/yp/makefile -f /usr/lib/print/Makefile.yp 
    printers.conf
    
    -f /var/yp/makefile

    Specifies the NIS makefile. 

    -f /usr/lib/print/Makefile.yp

    Specifies the NIS print makefile. This means implicit rules and predefined macros from both makefiles are concatenated. 

    printers.conf

    Specifies the file to be created or updated. 

Example--Adding Domain-Wide Access to a Printer using NIS

This example creates a printers.conf entry for the printer luna, connected to the print server, saturn. The make command pushes the printers.conf map.


# lpset -a bsdaddr=saturn,luna,Solaris -a description=
"Room 1954 ps" luna
# make -f /var/yp/makefile -f /usr/lib/print/Makefile.yp 
printers.conf