Solaris Naming Administration Guide

Updating Attributes

The fnattr command lets you update and examine attributes associated with FNS named objects. You can perform four attribute operations with the fnattr command:

fnattr -a [-s] name [-O|-U] identifier values

fnattr -d name [[-O|-U] identifier [values]]

fnattr -m name [-O|-U identifier oldvalue newvalue

fnattr -l name [[-O|-U] identifier
Table 27-3 fnattr Command Options




Composite name. 


Attribute name. 


One or more attributes values 


The attribute value that you want to change. 


The new attribute value. 


Add (create) a new attribute 


Delete an attribute 


Change (modify) an attribute 


List attribute values 


Add in "supersede" mode. Removes any existing values for the identifier attribute and creates new attribute values.


List attributes and values. 


Use an OSI OID as the identifier 


Use a DCE UUID as the identifier 

In each of these cases, the identifier format is FN_ID_STRING, unless the option -O or -U is used.

Adding an Attribute

The -a option is for adding an attribute or adding a value to an attribute. Specify the composite name the attribute is associated with, the attribute identifier, and the values to add.

fnattr -a [-s] name [-O | -U] identifier value1 [value2+]

The following example adds the attribute identifier model and the value hplaser to thisorgunit/service/printer.

# fnattr -a thisorgunit/service/printer model hplaser

The -s option means "add in supersede" mode. If an attribute with the specified identifier already exists, -s removes all of its values and replaces them with the values added. If this option is omitted, the resulting values for the specified attribute includes the existing values and the new values added.

# fnattr -as thisorgunit/service/printer model hplaser

The example above will first remove any existing values associated with model and add hplaser as the value.

Deleting an Attribute

To delete an attribute associated with an FNS named object, use the -d option.

fnattr -d name [[-O | -U] identifier value1 [value2+]]]

You can control what to delete:

For example, to delete all the attributes associated with thisorgunit/service/printer.

# fnattr -d thisorgunit/service/printer

Listing an Attribute

The -l option is for listing attributes and their values.

fnattr -l name [[-O | -U] identifier]

For example to list the values of the model attribute of thisorgunit/service/printer.

# fnattr -l thisorgunit/service/printer model

If an identifier is not specified, all the attributes associated with the named object are displayed.

Modifying an Attribute

The -m option lets you modify an attribute value.

fnattr -m name [-O | -U] identifier old_value new_value

For example, to replace the value postscript with laser you would enter:

# fnattr -m thisorgunit/service/printer model postscript laser

Only the specified values are affected. Other attributes and values associated with the name are not affected.

Other Options

The -O option assumes the format of the attribute identifier is an ASN.1 dot-separated integer string list (FN_ID_ISO_OID_STRING).

The -U option assumes the format of the attribute identifier is a DCE UUID string form (FN_ID_DCE_UUID).