With an argument, domainname sets the name of the secure NIS domain to newname (maximum of 255 characters). Setting the domain name can be performed by a privileged user only.
Note that any changes to the domain name made using the domainname command are temporary; the next time the NIS start-up script /etc/init.d/nis is invoked (or another domainname command is issued with an argument) the newname value will be overridden.
The name of the secure NIS domain is normally set by the /etc/init.d/nis script when the system boots. To permanently change the domain name, modify the domain variable in /etc/init.d/nis.