- set printing configuration in supported databases
lpset [-n system | fnsldap] [-x] [ [-D binddn] [-w passwd] [-h ldaphost]] [-a key=value] [-d key] destination
The lpset utility sets printing configuration information in the system configuration databases. See nsswitch.conf(4).
Only a superuser or a member of Group 14 may execute lpset.
The following options are supported:
Create or update the configuration information for the destination entry in LDAP printer contexts. ldap specifies that the information is written to an LDAP server. See NOTES.
Remove all configuration for the destination entry from the database specified by the -n option.
Configure the specified key=value pair for the destination.
Delete the configuration option specified by key for the destination entry.
Use the distinguished name (DN) binddn to bind to the LDAP directory server.
Use passwd as the password for authentication to the LDAP directory server.
Specify an alternate host on which the LDAP server is running. This option is only used when ldap is specified as the naming service. If this option is not specified, the default is the current host system.
The following operand is supported:
Specifies the entry in LDAP, in which to create or modify information. destination names a printer of class of printers. Specify destination using atomic names. POSIX-style destination names are not acceptable. See standards(5) for information regarding POSIX.
例 1 Setting a key=value Pair
The following example sets the user-equivalence =true key=value pair for destination tabloid in the NIS context:
example% lpset -n nis -a user-equivalence=true tabloid
例 2 Setting a key=value Pair in LDAP
example% lpset -n ldap -h ldapl.xyz.com -D "cn=Directory Manager" \ -w passwd -a key1=value1 printer1
The following exit values are returned:
An error occurred.
See attributes(5) for descriptions of the following attributes:
If the ldap database is used, the printer administrator should be mindful of the following when updating printer information.
Because the domain information for the printer being updated is extracted from the ldapclient(1M) configuration, the LDAP server being updated must host the same domain that is used by the current ldapclient(1M) server.
If the LDAP server being updated is a replica LDAP server, the updates will be referred to the master LDAP server and completed there. The updates might be out of sync and not appear immediately, as the replica server may not have been updated by the master server. For example, a printer that you deleted by using lpset may still appear in the printer list you display with lpget until the replica is updated from the master. Replica servers vary as to how often they are updated from the master.
Although users can use the LDAP command line utilities ldapadd(1) and ldapmodify(1) to update printer entries in the directory, the preferred method is to use lpset. Otherwise, if the ldapadd and ldapmodify utilities are used, the administrator must ensure that the printer-name attribute value is unique within the ou=printers container on the LDAP server. If the value is not unique, the result of modifications done using lpset might be unpredictable.