System Administration Guide: Printing

ProcedureHow to Limit User Access to a Printer by Using LP Print Commands

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

  2. Allow or deny users access to a printer.


    # lpadmin -p printer-name -u allow:user-list [deny:user-list]
    -p printer-name

    Specifies the name of the printer to which the allow or deny access list applies.

    -u allow:user-list

    Specifies the user names to be added to the allow access list. You can specify multiple user names with this command. Use a space or a comma to separate names. If you use spaces, enclose the list of names in quotation marks.

    -u deny:user-list

    Specifies user names to be added to the deny user access list. You can specify multiple user names with this command. Use a space or a comma to separate names. If you use spaces, enclose the list of names in quotation marks.

    The specified users are added to the allow or deny list for the printer in one of the following files on the print server:


    Note –

    If you specify none as the value for user-list in the allow list, the following files are not created on the print server:


  3. Verify that information is correct under the Users allowed or the Users denied heading in the following command output:


    # lpstat -p printer-name -l
    

Example 6–8 Limiting User Access to a Printer

The following example shows how to allow only the users nathan and george access to the printer luna.


# lpadmin -p luna -u allow:nathan,george

The following example shows how to deny the users nathan and george access to the printer asteroid.


# lpadmin -p asteroid -u deny:"nathan george"