Hostname issue - showing "localhost" instead of actual hostname.
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hostname issue - showing "localhost" instead of actual hostname.
So I've been having this problem for a few days and have searched and read through pretty much everything I could find regarding the issue and still can't get it to work. Hoping to find some help here.
Hostname issues...when I telnet into my server on port 25, it reports the hostname as being localhost:
220 localhost SMTP; Thu, 02 Oct 2008 14:21:03 -0500
I have changed the hostname on the server in just about every place I can imagine.
/etc/hosts:
# Do not remove the following line, or various programs
# that require network functionality will fail.
::1 localhost.localdomain localhost weboflearning.com
127.0.0.1 weboflearning weboflearning.com localhost
Still, everytime I telnet in, it says localhost no matter what. Maybe I have something configured wrong? Any expert help on the matter would be greatly appreciated, as I'm starting to get pretty frustratd with it. Thanks in advance.
-Ryan
Oops - forgot to mention I'm running CentOS 5.2
Last edited by ryes31; 10-02-2008 at 01:36 PM.
Reason: update OS version
Assuming you restarted networking after each of these changes.
What do you get if you telnet to yourself from that server?
It appears you've set the hostname in all the right places.
I just did:
[/etc]# telnet dothq.com 25
Trying 205.234.242.36...
Connected to dothq.com.
Escape character is '^]'.
220-vps.dothq.com ESMTP Exim 4.69 #1 Thu, 02 Oct 2008 14:58:14 -0400
220-We do not authorize the use of this system to transport unsolicited,
220 and/or bulk e-mail.
Yeah I did restart the network after making each change.
I get the same thing when I telnet to myself from inside the server-
[root@weboflearning /]# telnet weboflearning.com 25
Trying 127.0.0.1...
Connected to weboflearning.com (127.0.0.1).
Escape character is '^]'.
220 localhost SMTP; Thu, 02 Oct 2008 15:04:58 -0500
Still can't figure out why it might be doing this when the hostname is set permanently. It's gotta be some simple fix right in front of my face that I'm going to kick myself for later.
Still, everytime I telnet in, it says localhost no matter what. Maybe I have something configured wrong? Any expert help on the matter would be greatly appreciated, as I'm starting to get pretty frustratd with it. Thanks in advance.
From whence are you "teleneting in?" Perhaps what you're seeing is the host name of the telenet source, not of the destination. (Note: I haven't used telenet for 20 years, so that's just a guess.)
Telnet is an xinetd or is it the date inetd service, that may need a restart or it could be that the mailer daemon needs a restart. I would that is read at start up by either or both.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.