When no options are specified, attradmin lists the names of all installed attribute map files on the system. If an attribute map filename is specified, attradmin lists all entries in the map file. If an attribute map filename and a local attribute value are specified, attradmin lists all file entries that map to the specified local attribute value.
Transparent mapping may be achieved by using a regular expression including the metacharacters , [ and ] in remote_attr, and a field specifier in local_attr. A field specifier % followed by a field number can be entered for local_attr to indicate that the value of local_attr is the same as the value in the specified field of remote_attr. If %i is entered for local_attr, attempts by attrmap to map remote_attr will fail.
When attrmap searches for a remote_attr, it sequentially scans the attribute map file. Therefore, the ordering of remote attributes in this file is critical.
Remote attributes are sorted on the highest numbered field first. Entries with explicit values in this field appear first in the file. Entries which include regular expressions in this field are sorted from the most specific to the least specific based on the position of the metacharacters in the pattern. The more to the left the metacharacter is in the pattern, the less specific the pattern is. For example, s* is less specific than sf*. Regular expressions containing square brackets are considered more specific than expressions with asterisks and therefore come first in the file.
If two or more entries have patterns which are equally specific, the specificity of the next lower numbered field is examined. Fields are examined from highest to lowest until the remote attributes can be differentiated.
In any format descriptor, the field numbers indicate the order of significance of the fields, where higher numbered fields contain entities of greater significance to the network. In the format descriptor M2:M1, the first field contains the remote machine name. M1 contains the value of the remote attribute. When a machine name is specified, it precedes the attribute value, and the fields are separated by a colon.
The following command line
adds an entry to the GID database that maps
any user on the remote machine macha into the local
system with the same GID.
%1 indicates that the value of local_attr is the same as
the value in the
remote_attr field that has 1 as its field number:
attradmin -A GID -a -r "macha:" -l %1
The following command line adds an entry to the GID database
that maps all GIDs from 100 to 119 on macha to
GID 1 on the local system:
attradmin -A GID -a -r "macha:1[01][0-9]" -l 1
The attradmin command will ensure that the second entry is found first in the map file, no matter which of the above two entries was actually added first.