Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
My machine is on a private LAN connected to a router (with DHCP enabled) and Fedora Core 4 assigned it the uninformative default name locaIhost.localdomain. I wanted to change the default name of my machine to something more informative.
First I tried using the command hostname. The command executed successfully but when I did "hostname -f" I got the error "hostname: unknown host"
So I edited /etc/hosts which now contains a single line "127.0.0.1 newhostname newhostname". I rebooted, but the machine name did not change, as evidenced by the login screen, the output of the command "hostname", and the prompt.
Then I edited /etc/sysconfig/network to set "NETWORK=newhostname". During reboot, "Starting sendmail" took an unreasonable long time (which was never this long before) such that I thought the machine has hang. After I finally logged in, I saw that the machine name has changed, as evidenced by the login screen, the output of the command "hostname", and the prompt. I was able to ping my machine's IP address, 127.0.0.1, newhostname, and localhost.
Does anyone know how to fix the problem of sendmail taking a freakishly long time to start? Thanks for any help.
Pete, I don't have a problem changing the hostname (read my post carefully). The problem I have is that after successfully changing the hostname, the sendmail service takes an unreasonably long time to start. What I want to know is how to fix that.
This startup delay is most likey caused by sendmail not being able to resolve the host name, the host name is usually defined in the file /etc/mail/local-host-names . Change the entry in that file to match your new host name and the delays should be gone.
After several trials and errors, I finally figured out the solution to the problem. The value of the parameter inet_interfaces in /etc/postfix/main.cf must match one of the values in /etc/hosts. By default inet_interfaces is set to localhost. And since I've changed /etc/hosts to no longer contain localhost, this caused the problem. So I changed /etc/hosts to "127.0.0.1 localhost.localdomain localhost newhostname" and the problem is solved (and my machine name is still changed to newhostname as I originally set out to do). Thanks for all the help.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.