renamehost(3N)
renamehost - rename the existing hostname in NIS hosts database
As shipped in IRIX 6.5.30. Unchanged since IRIX 6.5.
NAME renamehost - rename the existing hostname in NIS hosts database SYNOPSIS int renamehost(char *oldname, char *newname, char *aliases, char *passwd); DESCRIPTION Renamehost sends an host rename request to registrar(1M) on NIS master via the yp_update(3R) call. The result is that the new host name will be associated with the original internet address. This routine should be used only when NIS is enabled in the network. This function call can not only change the hostname, but also modify the aliases. The arguments for the routine are: oldname The original host name. newname The new host name for the internet address. This new name should not be already used by other host. However, it can be the alias of the original host. User may want to use this call to swap the alias and host name. User also can use this call just to modify the alias when newname is the same as oldname. aliases The new aliases, each separated by spaces, of the host. The maximum number of characters allowed in the string is MAX_ALIASES defined in <sun/hostreg.h>. The new aliases can be the same as the original aliases, or contains the old host name. A NULL indicates the alias is omitted. passwd The root password of NIS master. If NIS master does not have root password, simply pass a NULL. On successful completion, Renamehost returns NULL. The unsuccessful return code are defined in <rpcsvc/ypclnt.h>. Renamehost always wait until NIS databases are pushed to all slave servers. SEE ALSO registrar(1M), yp_update(1M), registerinethost(3N), unregisterhost(3N), yppush(1M)