The ‘hostname’ command should return an FQDN, that is, fully qualified domain name. For example:
$ hostname
foo.your.domain.com
How do you set it up? Google search doesn’t return much of a useful information. And no, putting stuff into /etc/hosts doesn’t solve the issue. The solution is to edit /etc/nodename and put the FQDN in there and reboot.
echo foo.your.domain.com > /etc/nodename
shutdown -g0 -i6 -y
I have a hunch that reboot is unnecessary, but I haven’t figured out which service needs restarting for this change to take effect.
why don’t you check /etc/resolv.conf
@sarat:
OK, let’s see how useful it is. My /etc/resolv.conf looks like this:
$ cat /etc/resolv.conf
nameserver 8.8.8.8
$ ▊
How does this help me?
shutdown -g0 -i6 -y
or just use:
init 6
a correctly configured /etc/resolv.conf should look like this:
domain example.com
search example.com subdomain.example.com foo.dom
nameserver 1.2.3.4
nameserver 1.2.3.5
nameserver 1.2.3.6
Or as root do;
hostname
No reboot required
In Solaris 10 u13, set it immediately with:
$ domainname
and make it persist across reboots with:
$ echo “your domain” >> /etc/defaultdomain