LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 02: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, 04: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, 06:25 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,415

Rep: Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785
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, 06:46 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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 06:48 PM.
 
Old 12-06-2007, 04: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 11:43 AM
Redirecting the kernel messages to file other than /var/log/messages jyotika_b83 Linux - General 3 04-28-2005 07:39 PM
/var/log/messages full of these messages. Should I be concerned? mdavis Linux - Security 5 04-16-2004 11:08 AM
hostname in /var/log/messages not printing bkevind Linux - Newbie 4 01-07-2004 09:39 AM
/var/log/messages contains "localhost" instead of the real hostname allel Linux - Networking 0 07-15-2002 03:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration