*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> renamehost (3c)              
Title
Content
Arch
Section
 

Contents


RENAMEHOST(3N)							RENAMEHOST(3N)


NAME    [Toc]    [Back]

     renamehost	- rename the existing hostname in NIS hosts database

SYNOPSIS    [Toc]    [Back]

     int renamehost(char *oldname, char	*newname, char *aliases,
	       char *passwd);

DESCRIPTION    [Toc]    [Back]

     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    [Toc]    [Back]

      
      
     registrar(1M), yp_update(1M), registerinethost(3N), unregisterhost(3N),
     yppush(1M)


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
unregisterhost IRIX remove the existing host entry in NIS hosts database
renamefset Tru64 Rename an existing AdvFS fileset
mren Tru64 mtools utility to rename an existing DOS file
ethers IRIX ethernet address to hostname database
yp_host IRIX update NIS "hosts" database
lifrename HP-UX rename LIF files
VOP_RENAME FreeBSD rename a file
rename IRIX Rename or delete a command
mv Linux move (rename) files
rename IRIX Rename or delete a command
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service