Bug 555748

Summary: Hostname mapped to 127.0.0.1 in /etc/hosts breaks rpc.svcgssd
Product: [Fedora] Fedora Reporter: Frank Wittig <frank>
Component: anacondaAssignee: Dave Cantrell <dcantrell>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 12CC: jonathan, ovasik, pknirsch, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-01-16 01:03:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Frank Wittig 2010-01-15 12:07:13 UTC
Description of problem:
After a fresh install of Fedora 12 the hostname entered during installation process is mapped to 127.0.0.1 in /etc/hosts.
In my case this broke rpc.svcgssd but I suspect there may be more ramifications because of mapping the hostname of the machine to localhost.

I use kerberized NFSv4 on my Network.
This uses a nfs machine key that is stored in /etc/krb5.keytab and is looked up by its name nfs/<hostname>@<realm>.
rpc.svcgssd cannot find the key in case the hostname is mapped to 127.0.0.1 in /etc/hosts.

The key problem I suspect to cause this is the behaviour of hostname.
Let hostname be somehost.somedomain.tld.
After installing Fedora you can look up the system's hostname as follows:

# hostname
somehost.somedomain.tld

# hostname -s
somehost

# hostname -d
localdomain

The answer of "hostname -d" is wrong. It is supposed to be somedomain.tld
Thats the reason why rpc.svcgssd is unable to find the mashine key in krb5.keytab.

After removing the hostname from /etc/hosts (or enter it correctly mapped to its IP) system's hostname is reported as follows:

# hostname
somehost.somedomain.tld

# hostname -s
somehost

# hostname -d
somedomain.tld


How reproducible:

Steps to Reproduce:
1. fresh install Fedora 12 with hostname (e.g. somehost.somedomain.tld)

Actual results:
# hostname -d
localdomain

Expected results:
# hostname -d
somedomain.tld

I reported this for package seetup because /etc/hosts is part of setup package. I hope it's the right one to refer to.


Workarround:
Correct /etc/hosts by removing the hostname or map it to its correct IP address on the machine's network.

Comment 1 Ondrej Vasik 2010-01-15 12:15:10 UTC
Thanks for report - better place for this is anaconda, as anaconda was adding hostname ... however, this bugzilla is likely duplicate, I'll check the number...

Comment 2 Ondrej Vasik 2010-01-15 12:19:58 UTC
Nevermind - I can't find it, I'll reassign it, they may close it duplicate if they know the bz number.

Comment 3 Dave Cantrell 2010-01-16 01:03:37 UTC

*** This bug has been marked as a duplicate of bug 530343 ***