nisdomainname
Display NIS domain name
SYNOPSIS
nisdomainname [-V] [domainname]
PARAMETERS
domainname
The new NIS domain name to set for the system. This operation typically requires root privileges.
-V
Displays the version information of the nisdomainname utility and exits.
--version
Same as -V; displays the version information of the nisdomainname utility and exits.
DESCRIPTION
nisdomainname is a utility used to display or set the Network Information Service (NIS) domain name for the current system. NIS, originally known as Yellow Pages (YP), is a client-server directory service protocol for distributing system configuration data such as user and host names between computers on a network. While less prevalent in modern environments, it was historically important for centralized management in Unix-like systems.
When invoked without any arguments, nisdomainname will print the current NIS domain name that the system is configured to use. If a domainname argument is provided, the command attempts to set the system's NIS domain name to the specified value. This operation typically requires superuser privileges (e.g., using sudo). It's important to note that setting the NIS domain name affects how the system interacts with NIS servers for user authentication, host lookups, and other shared network information. It is distinct from the general system's hostname or DNS domain name, which are managed by commands like hostname or domainname.
CAVEATS
nisdomainname requires root privileges to set the NIS domain name. The NIS service itself is considered a legacy technology; many modern Linux distributions prefer LDAP, Kerberos, or other centralized authentication and information services. Setting the NIS domain name does not automatically start or configure NIS client daemons (like ypbind); it only sets the name by which these daemons will identify themselves to NIS servers. Changes may not take effect immediately for running services and might require restarts.
CONFIGURATION PERSISTENCE
The NIS domain name set by nisdomainname is often not persistent across reboots unless configured in a system-specific configuration file (e.g., in /etc/sysconfig/network on some Red Hat-based systems or via network configuration scripts). Administrators typically ensure persistence through their distribution's standard networking setup.
NIS VS. DNS
nisdomainname manages the NIS domain name, which is completely separate from the DNS (Domain Name System) domain name. While both relate to network naming, NIS is for distributing system maps (users, hosts, etc.) within a local administrative domain, whereas DNS resolves internet hostnames to IP addresses globally.
HISTORY
The nisdomainname command is part of the yp-tools package, which provides various client-side utilities for interacting with NIS. Its origins trace back to Sun Microsystems' Yellow Pages (YP) service, introduced in SunOS, which was later rebranded as NIS to avoid trademark conflicts. The command's functionality has remained largely consistent over decades, reflecting its role in a mature, though now less commonly used, network service architecture.
SEE ALSO
domainname(1), hostname(1), ypbind(8), ypcat(1), ypwhich(1)


