SCIENTIFIC-LINUX-USERS Archives

January 2013

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:
Vladimir Mosgalin <[log in to unmask]>
Reply To:
Vladimir Mosgalin <[log in to unmask]>
Date:
Sun, 20 Jan 2013 19:14:50 +0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (54 lines)
Hi Torpey List!

 On 2013.01.20 at 08:44:00 -0600, Torpey List wrote next:

> 
> I may not be a newbie but this problem has me feeling like one.
> 
> Here is how the hostname is being reported:
> # hostname
> nala.example.com
> # hostname -s
> nala
> # hostname -f
> nala.example.com.example.com
> # domainname
> example.com
> 
> I have tried various ways to get the name changed and have been able to make the change.  However, the Network Manager changes it back to this when “service network restart”.  I have googled and the answer I have seen is to stop the Network Manager.  While this might work, it does not seem to be the most appropriate answer.
> 
> I have decided not to list the things that I have tried because I have obviously missed something.

The old version of NetworkManager that's used in SL is mostly useful for
connecting to random WiFi networks and some kind of VPNs. Usage beyond
this scope might not lead to best result, and upstream documentation
recommends disabling NM in certain cases. Actually, for most servers,
disabling NM sounds like a good idea.

That said, if it's just this issue bothering you, it probably can be
solved. NM gets this name from either global settings in
/etc/sysconfig/network, or from one of the interface files in
/etc/sysconfig/network-scripts/ifcfg-* (check all that don't contain
explicit NM_CONTROLLED=no line).  I believe NM has other means of
storing configuration (gconf maybe? not sure), but SL version is set up
out of the box to use these configuration files.

If you won't find traces for example.com anywhere, check all files in
etc containing this string:
grep -r example.com /etc

(note that this is rfc2606 reserved name so it can be somewhere even in
default configs, but won't afect you)

Also check if your DNS server didn't supply this name: for all your IPs,
do "host <ip>" - maybe NM just picks hostname based on what DNS server
suggested.

DHCP is another possible source of hostname (iirc it doesn't usually
happen in linux, but I might be wrong or NM might be trying to be
smart). So check DHCP logs maybe, if you're using DHCP.

-- 

Vladimir

ATOM RSS1 RSS2