SCIENTIFIC-LINUX-USERS Archives

March 2016

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
Date:
Wed, 16 Mar 2016 12:42:16 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (43 lines)
On Tue, Mar 15, 2016 at 1:42 PM, Nico Kadel-Garcia <[log in to unmask]> wrote:
> On Tue, Mar 15, 2016 at 8:32 AM, Nico Kadel-Garcia <[log in to unmask]> wrote:
>
>> The problem is that the $HOSTNAME for the system isn't published in
>> DNS, nor is it the first hostname for a line in /etc/hosts, so the
>> "hostname --fqdn" is not finding it associated with your IP addresses.
>> The usual approach for portable laptops is to put a line like this in
>> /etc/hosts somewhere.
>>
>> 127.0.0.1 mymachine.mydomain

On SL6, I've adopted the Debian approach:

# cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 tadmin.test.cluster tadmin

# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=tadmin

# hostname
tadmin

# hostname -s
tadmin

# hostname -f
tadmin.test.cluster

# hostname -d
test.cluster

On SL7, libnss_myhostname does the job of the second "/etc/hosts" line
(but with 127.0.0.2) automatically.




To the OP:

Where are you setting the domainname?

ATOM RSS1 RSS2