1domainname(1M) System Administration Commands domainname(1M)
2
3
4
6 domainname - set or display name of the current domain
7
9 domainname [name-of-domain]
10
11
13 Without an argument, domainname displays the name of the current domain
14 name used in RPC exchanges, usually referred to as the NIS or NIS+
15 domain name. This name typically encompasses a group of hosts or passwd
16 entries under the same administration. The domainname command is used
17 by various components of Solaris to resolve names for entries such as
18 are found in passwd, hosts and aliases. By default, naming services
19 such as NIS and NIS+ use domainname to resolve names.
20
21
22 With appropriate privileges (root or an equivalent role [see rbac(5)]),
23 you can set the name of the domain by specifying the name as an argu‐
24 ment to the domainname command.
25
26
27 The domain name for various naming services can also be set by other
28 means. For example, ypinit can be used to specify a different domain
29 for all NIS calls. The domain name of the machine is usually set during
30 boot time through the domainname command by the svc:/system/iden‐
31 tity:domain service. If the new domain name is not saved in the
32 /etc/defaultdomain file, the machine reverts to the old domain after it
33 reboots.
34
35
36 The sendmail(1M) daemon, as shipped with Solaris, and the sendmail
37 implementation provided by sendmail.org (formerly referred to as
38 "Berkeley 8.x sendmail") both attempt to determine a local host's fully
39 qualified host name at startup and both pursue follow-up actions if the
40 initial search fails. It is in these follow-up actions that the two
41 implementations differ.
42
43
44 Both implementations use a standard Solaris or Unix system call to
45 determine its fully qualified host name at startup, following the name
46 service priorities specified in nsswitch.conf(4). To this point, the
47 Solaris and sendmail.org versions behave identically.
48
49
50 If the request for a fully qualified host name fails, the sendmail.org
51 sendmail sleeps for 60 seconds, tries again, and, upon continuing fail‐
52 ure, resorts to a short name. The Solaris version of sendmail makes the
53 same initial request, but then, following initial failure, calls
54 domainname. If successful, the sleep is avoided.
55
56
57 On a Solaris machine, if you run the sendmail.org version of sendmail,
58 you get the startup behavior (omitting the domainname call) described
59 above. If you run the Solaris sendmail, the domainname call is made if
60 needed.
61
62
63 If the Solaris sendmail cannot determine the fully qualified host name,
64 use check-hostname(1M) as a troubleshooting aid. This script can offer
65 guidance as to appropriate corrective action.
66
68 /etc/defaultdomain
69
70
71 /etc/nsswitch.conf
72
73
75 See attributes(5) for descriptions of the following attributes:
76
77
78
79
80 ┌─────────────────────────────┬─────────────────────────────┐
81 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
82 ├─────────────────────────────┼─────────────────────────────┤
83 │Availability │SUNWcsu │
84 └─────────────────────────────┴─────────────────────────────┘
85
87 NIS+[22m(1), nischown(1), nispasswd(1), svcs(1), check-hostname(1M), host‐
88 config(1M), named(1M), nisaddcred(1M), sendmail(1M), svcadm(1M),
89 ypinit(1M), sys-unconfig(1M), aliases(4), defaultdomain(4), hosts(4),
90 nsswitch.conf(4), passwd(4), attributes(5), rbac(5), smf(5)
91
93 The domainname service is managed by the service management facility,
94 smf(5), under the service identifier:
95
96 svc:/system/identity:domain
97
98
99
100
101 Administrative actions on this service, such as enabling, disabling, or
102 requesting restart, can be performed using svcadm(1M). The service's
103 status can be queried using the svcs(1) command.
104
105
106
107SunOS 5.11 8 Mar 2006 domainname(1M)