|
|
To add an entry that maps a remote attribute value to a local
value, enter:
attradmin -A attrname -a -l localval -r remoteval
where
attrname
is the name of the attribute,
remoteval
is the combination of an attribute value on the remote
system and the remote system name,
and
localval
is the attribute value on the local system.
For example,
the following command line
maps GID 10 on the remote system
moon
to a GID 20 on the local system:
attradmin -A gid -a -l 20 -r 10@moon
Once the command executes, any user with a GID of 10 on moon has a GID of 20 on the local system.
You can set up transparent mapping of attributes by using regular expressions in the remoteval and special characters in the localval field. The characters supported by the attradmin command are explained on attradmin(1Mbnu).
File entries are sorted so an entry that maps a value explicitly is found in a search before entries that implement transparent mapping. Likewise, entries that map values transparently are sorted based on the position of the regular expression in remoteval. Entries with a regular expression in place of a remote attribute value appear in the file before entries with a regular expression in place of a system name.
attradmin sorts entries containing regular expressions in remoteval in the same way the idadmin command sorts entries containing regular expressions in the global name, with one addition: fields with regular expressions containing brackets ([]) are considered more specific than fields with an asterisk and therefore will precede fields containing an asterisk. See ``Adding an entry to an idata file''.
The following command line transparently maps all GIDs
on the remote system mars to GID 10 on the local system:
attradmin -A gid -a -l 10 -r "*@mars"
Given the format descriptor
M1@M2,
the following
command line maps all UID values on the remote system mars to
identical values on the local system:
attradmin -A uid -a -l %1 -r "*@mars"
In this example, UID 101 on mars is mapped to UID 101 on the local machine, UID 102 is mapped to UID 102, and so on.
By using a regular expression in place of a remote machine name,
you can map values on every machine on the network with access
to your system to identical local values.
The following command line maps all remoteUIDs
to the same UIDs on the local system:
attradmin -A uid -a -l %1 -r "*@*"