From: The Natural Philosopher on
Bennett Haselton wrote:
> I have a CentOS 5.4 machine that resets its hostname to
> "wyzantdb1.wyzant.net" every time I reboot the machine, even if I have
> tried setting the hostname to something else while the machine is
> running.
>
> After I change it to what I want with the "hostname www.candyshadow.com"
> command, the "hostname" command does indeed give:
> [root(a)www ~]# hostname
> www.candyshadow.com
> as its output. However next time I reboot the machine it will be back
> to giving me "wyzantdb1.wyzant.net" as the output.
>
> All of the Google results I've found refer to the /etc/hosts file,
> the /etc/hostname file or the /etc/sysconfig/network file, but on my
> machine, none of those contain the string "wyzant". The contents of
> those files are:
>
> [root(a)www ~]# cat /etc/hosts
> # Do not remove the following line, or various programs
> # that require network functionality will fail.
> 127.0.0.1 localhost.localdomain localhost
> ::1 localhost6.localdomain6 localhost6
> 69.63.181.12 www.facebook.com
>
> [root(a)www ~]# cat /etc/hostname
> www.candyshadow.com[root(a)www ~]# cat /etc/sysconfig/network
> NETWORKING=yes
> NETWORKING_IPV6=no
> HOSTNAME=localhost.localdomain
> GATEWAY=66.232.103.1
> [root(a)www ~]#
>
> So where else could the hostname be stored?


see man hostname for the full details of what your system will use.

From: Bit Twister on
On Mon, 5 Apr 2010 00:09:52 -0700 (PDT), Bennett Haselton wrote:
> I have a CentOS 5.4 machine that resets its hostname to
> "wyzantdb1.wyzant.net" every time I reboot the machine, even if I have
> tried setting the hostname to something else while the machine is
> running.

Usually on RedHat/Fedora/CentOS type systems, host name is set from
/etc/sysconfig/network via the HOSTNAME= line.

If you used command line commands to set hostname, I would check the
man page for the command, remove the host name setting from indicated config
file, set /etc/sysconfig/network HOSTNAME=to_desired_FQDN_here
Reboot system and see if it works.


> So where else could the hostname be stored?

No telling since you did not specify your network setup type, wifi,
type of dhcp client if dynamic, static,..

Try
cd /etc/sysconfig/network-scripts/
grep -ri wyzantdb1 *
grep -ri wyzant.net *

You could save/run this script and grep it's output for the above names.
http://groups.google.com/group/alt.os.linux.mandriva/msg/429ba2526d6a545d
From: Robert Nichols on
On 04/05/2010 02:09 AM, Bennett Haselton wrote:
> I have a CentOS 5.4 machine that resets its hostname to
> "wyzantdb1.wyzant.net" every time I reboot the machine, even if I have
> tried setting the hostname to something else while the machine is
> running.
>
> After I change it to what I want with the "hostname www.candyshadow.com"
> command, the "hostname" command does indeed give:
> [root(a)www ~]# hostname
> www.candyshadow.com
> as its output. However next time I reboot the machine it will be back
> to giving me "wyzantdb1.wyzant.net" as the output.
[SNIP]
> So where else could the hostname be stored?

find /etc -type f -exec grep wyzantdb1 {} +

--
Bob Nichols AT comcast.net I am "RNichols42"
From: unruh on
On 2010-04-12, Robert Nichols <SEE_SIGNATURE(a)localhost.localdomain.invalid> wrote:
> On 04/05/2010 02:09 AM, Bennett Haselton wrote:
>> I have a CentOS 5.4 machine that resets its hostname to
>> "wyzantdb1.wyzant.net" every time I reboot the machine, even if I have
>> tried setting the hostname to something else while the machine is
>> running.
>>
>> After I change it to what I want with the "hostname www.candyshadow.com"
>> command, the "hostname" command does indeed give:
>> [root(a)www ~]# hostname
>> www.candyshadow.com
>> as its output. However next time I reboot the machine it will be back
>> to giving me "wyzantdb1.wyzant.net" as the output.
> [SNIP]
>> So where else could the hostname be stored?
>
> find /etc -type f -exec grep wyzantdb1 {} +
>

grep -r wyzantdb1 /etc
is more efficient