Transfers a Network Information Services (NIS) map from an NIS server to a local host.
/usr/sbin/ypxfr [ -f ] [ -c ] [ -d Domain ] [ -h Host ] [ -s Domain ] [ -C TID Program IPAddress Port ] [ -S ] MapName
The ypxfr command transfers a Network Information Services (NIS) map from an NIS server to the local host as follows:
If the /var/yp/securenets file exists, the ypxfr command only responds to hosts that are listed in this file.
The MapName variable specifies the name of a map that will be transferred from an NIS server.
If run interactively, the ypxfr command sends output to the user's terminal. If invoked without a controlling terminal, the ypxfr command appends its output to the /var/yp/ypxfr.log file (if the file already exists). This file records each transfer attempt and its results. The ypxfr command is most often invoked from the root user's crontab file or by the ypserv daemon.
To maintain consistent information between servers, use the ypxfr command to update every map in the NIS database periodically. Be aware though that some maps change more frequently than others and therefore need to be updated more frequently. For instance, maps that change infrequently, such as every few months, should be updated at least once a month. Maps that change frequently, such as several times a day, should be checked hourly for updates. The services.byname map, for example, may not change for months at a time, while the hosts.byname map may change several times a day.
To perform periodic updates automatically, use a crontab entry. To update several maps at once, group commands together in a shell script. Examples of a shell script can be found in the /usr/etc/yp directory in the following files: ypxfr_1perday, ypxfr_2perday, ypxfr_1perhour.
You can use the System Management Interface Tool (SMIT) to run this command. To use SMIT, enter:
|-C TID Program IPAddress Port||Tells the ypxfr command where to find the yppush command. The ypserv daemon invokes the ypxfr
command to call back a yppush command to the host. Use the
parameters to indicate the following:
Note: This option is only for use by the ypserv daemon.
|-c||Prevents sending of a request to Clear Current Map to the local ypserv daemon. Use this flag if the ypserv daemon is not running locally at the time you are running the ypxfr command. Otherwise, the ypxfr command displays an error message and the transfer fails.|
|-d Domain||Specifies a domain other than the default domain. The maps for the specified domain must exist.|
|-f||Forces the transfer to occur even if the version at the master is not more recent than the local version.|
|-h Host||Gets the map from host specified, regardless of what the map says the master is. If a host is not specified, the ypxfr command asks the NIS service for the name of the master and tries to get the map from there. The Host variable can contain a name or an Internet address in the form a.b.c.d.|
|-S||Requires the ypserv server, from which it obtains the maps to be transferred, use privileged IP ports. Since only root user processes are typically allowed to use privileged ports, this feature adds an extra measure of security to the transfer. If the map being transferred is a secure map, the ypxfr command sets the permissions on the map to 0600.|
|-s Domain||Specifies a source domain from which to transfer a map that should be the same across domains (such as the services.byname map).|
To get a map from a host in another domain, enter:
/usr/sbin/ypxfr -d ibm -h venus passwd.byname
In this example, the ypxfr command gets the passwd.byname map from the host name venus in the ibm domain.
|/var/yp/ypxfr.log||Contains the log file.|
|/usr/sbin/ypxfr_1perday||Contains the script to run one transfer each day, for use with the cron daemons.|
|/usr/sbin/ypxfr_2perday||Contains the script to run two transfers each day.|
|/usr/sbin/ypxfr_1perhour||Contains the script for hourly transfers of volatile maps.|
The crontab command, yppush command.
The cron daemon, ypserv daemon.
System Management Interface Tool (SMIT): Overview in AIX 5L Version 5.1 System Management Concepts: Operating System and Devices.
Network File System (NFS) Overview for System Management in AIX 5L Version 5.1 System Management Guide: Communications and Networks, NIS Maps in AIX 5L Version 5.1 Network Information Services (NIS and NIS+) Guide.
Network Information Services (NIS) Overview for System Management in AIX 5L Version 5.1 Network Information Services (NIS and NIS+) Guide.