'\" te .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved .\" Copyright 1989 AT&T .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH DOMAINNAME 1M "Mar 8, 2006" .SH NAME domainname \- set or display name of the current domain .SH SYNOPSIS .LP .nf \fBdomainname\fR [\fIname-of-domain\fR] .fi .SH DESCRIPTION .sp .LP Without an argument, \fBdomainname\fR displays the name of the current domain name used in RPC exchanges, usually referred to as the NIS or NIS+ domain name. This name typically encompasses a group of \fBhosts\fR or \fBpasswd\fR entries under the same administration. The \fBdomainname\fR command is used by various components of Solaris to resolve names for entries such as are found in \fBpasswd\fR, \fBhosts\fR and \fBaliases\fR. By default, naming services such as \fBNIS\fR and \fBNIS+\fR use \fBdomainname\fR to resolve names. .sp .LP With appropriate privileges (root or an equivalent role [see \fBrbac\fR(5)]), you can set the name of the domain by specifying the name as an argument to the \fBdomainname\fR command. .sp .LP The domain name for various naming services can also be set by other means. For example, \fBypinit\fR can be used to specify a different domain for all \fBNIS\fR calls. The domain name of the machine is usually set during boot time through the \fBdomainname\fR command by the \fBsvc:/system/identity:domain\fR service. If the new domain name is not saved in the \fB/etc/defaultdomain\fR file, the machine reverts to the old domain after it reboots. .sp .LP The \fBsendmail\fR(1M) daemon, as shipped with Solaris, and the \fBsendmail\fR implementation provided by \fBsendmail.org\fR (formerly referred to as "Berkeley 8.x sendmail") both attempt to determine a local host's fully qualified host name at startup and both pursue follow-up actions if the initial search fails. It is in these follow-up actions that the two implementations differ. .sp .LP Both implementations use a standard Solaris or Unix system call to determine its fully qualified host name at startup, following the name service priorities specified in \fBnsswitch.conf\fR(4). To this point, the Solaris and \fBsendmail.org\fR versions behave identically. .sp .LP If the request for a fully qualified host name fails, the \fBsendmail.org\fR \fBsendmail\fR sleeps for 60 seconds, tries again, and, upon continuing failure, resorts to a short name. The Solaris version of \fBsendmail\fR makes the same initial request, but then, following initial failure, calls \fBdomainname\fR. If successful, the sleep is avoided. .sp .LP On a Solaris machine, if you run the \fBsendmail.org\fR version of sendmail, you get the startup behavior (omitting the \fBdomainname\fR call) described above. If you run the Solaris \fBsendmail\fR, the \fBdomainname\fR call is made if needed. .sp .LP If the Solaris \fBsendmail\fR cannot determine the fully qualified host name, use \fBcheck-hostname\fR(1M) as a troubleshooting aid. This script can offer guidance as to appropriate corrective action. .SH FILES .sp .ne 2 .na \fB\fB/etc/defaultdomain\fR\fR .ad .RS 22n .RE .sp .ne 2 .na \fB\fB/etc/nsswitch.conf\fR\fR .ad .RS 22n .RE .SH SEE ALSO .sp .LP \fBNIS+\fR(1), \fBnischown\fR(1), \fBnispasswd\fR(1), \fBsvcs\fR(1), \fBcheck-hostname\fR(1M), \fBhostconfig\fR(1M), \fBnamed\fR(1M), \fBnisaddcred\fR(1M), \fBsendmail\fR(1M), \fBsvcadm\fR(1M), \fBypinit\fR(1M), \fBsys-unconfig\fR(1M), \fBaliases\fR(4), \fBdefaultdomain\fR(4), \fBhosts\fR(4), \fBnsswitch.conf\fR(4), \fBpasswd\fR(4), \fBattributes\fR(5), \fBrbac\fR(5), \fBsmf\fR(5) .SH NOTES .sp .LP The \fBdomainname\fR service is managed by the service management facility, \fBsmf\fR(5), under the service identifier: .sp .in +2 .nf svc:/system/identity:domain .fi .in -2 .sp .sp .LP Administrative actions on this service, such as enabling, disabling, or requesting restart, can be performed using \fBsvcadm\fR(1M). The service's status can be queried using the \fBsvcs\fR(1) command.