LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 12-05-2007, 01:19 PM   #1
avigdorf
LQ Newbie
 
Registered: Aug 2004
Location: Israel
Posts: 2

Rep: Reputation: 0
hostname in /var/log/messages


Well, I see no answer for the same problem in other threads, though the questions are somewhat different.

I have a host that I changed its name, from host2 to host4. Everything seem to be fine, until I noticed that the hostname field in /var/log/messages is still reported as host2. It might explain a problem with kerberos login, that does not succeed.

Can someone explain me, and some other people on other threads, where the syslogd takes the hostname from, and why it's still the old name, while `hostname` report the new name, all other systems connect to the right host via the network, and (this is no-brainer) the bash prompt \h gives the right new name?

Thanks.
 
Old 12-05-2007, 03:05 PM   #2
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by avigdorf View Post
I have a host that I changed its name, from host2 to host4. Everything seem to be fine, until I noticed that the hostname field in /var/log/messages is still reported as host2. It might explain a problem with kerberos login, that does not succeed.
When I run the following

[myhost:/etc/sysconfig]:find . -name '*' -exec grep -H myhost '{}' ';'
./networking/profiles/default/hosts:192.168.X.X myhost
./networking/profiles/default/network:HOSTNAME=myhost
./network:HOSTNAME=myhost
[myhost:/etc/sysconfig]:
I see that the hostname for the default adapter is set in a different place than the global hostname. You might want to make sure you do not have different values in each place. I have had a similar problem before.
 
Old 12-05-2007, 05:25 PM   #3
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,261

Rep: Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028
I think you need a reboot to ensure all software gets the new name correctly. Ignore this comment if you've done that...
 
Old 12-05-2007, 05:46 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,165
Blog Entries: 54

Rep: Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807
For me 'sysctl -w kernel.hostname=newhostname' followed by restarting syslogd is what changes it w/o reboot.

Last edited by unSpawn; 12-05-2007 at 05:48 PM.
 
Old 12-06-2007, 03:52 AM   #5
avigdorf
LQ Newbie
 
Registered: Aug 2004
Location: Israel
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks

Problem is solved. The name in /var/log/messages was remedied by restarting syslogd, a reboot was done to make sure all other caches are cleared, as well.

Thanks to all responders.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash script for server log (namely var/log/messages) tenaciousbob Programming 17 05-24-2007 10:43 AM
Redirecting the kernel messages to file other than /var/log/messages jyotika_b83 Linux - General 3 04-28-2005 06:39 PM
/var/log/messages full of these messages. Should I be concerned? mdavis Linux - Security 5 04-16-2004 10:08 AM
hostname in /var/log/messages not printing bkevind Linux - Newbie 4 01-07-2004 08:39 AM
/var/log/messages contains "localhost" instead of the real hostname allel Linux - Networking 0 07-15-2002 02:49 PM


All times are GMT -5. The time now is 09:46 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration