Bug 34512 - Changing host name via netcfg fails to make proper updates
Summary: Changing host name via netcfg fails to make proper updates
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: netcfg   
(Show other bugs)
Version: 7.1
Hardware: i386 Linux
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2001-04-03 15:54 UTC by Scott Russell
Modified: 2007-04-18 16:32 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-04-03 19:34:09 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Scott Russell 2001-04-03 15:54:02 UTC
I did the following:

1) Setup system hostname, routing, and DNS for eth0 via netcfg. 
2) Multiple reboots, network up and running no problem.
3) Runlevel 5 starts GDM w/o problem
4) Bring system to office, startup netcfg again.
5) Change all info. New hostname, DNS, routing for tr0 via netcfg. Remove
eth0 interface.
6) Save and reboot box.
7) Now when GDM starts in /var/log/messages "gdm_auth_secure_display: Error
getting hentry for lizzard.raleigh.ibm.com"

lizzard is the new hostname of the system. The old hostname was
oasis.bayspring.lane.  I think netcfg didn't make proper changes to all GDM
files or something. 

Seems easy to replicate.

qa0401 RC2 is the test system. Fresh install. The only other 'wierd' thing
is that both eth0 and tr0 are pcmcia NICs.

Comment 1 Glen Foster 2001-04-03 16:34:26 UTC
Changing product to Red Hat Linux Beta since (a) Scott is a beta-team member and
(b) this defect references a QA tree *and* the RC2 milestone.  Scott, please use
Red Hat Linux Beta for defects that are seen in trees later than the public
beta.  You'll have to bypass the "user-friendly front end" to do this, as
there's a deficiency in bugzilla to allow you to select Red Hat Linux Beta
through the defauly defect-entry mechanism.

Comment 2 Nalin Dahyabhai 2001-04-03 16:37:23 UTC
netcfg doesn't modify any of GDM's configuration files.  Does running
"host lizzard.raleigh.ibm.com" give any output?

Comment 3 Scott Russell 2001-04-03 17:05:15 UTC
No, it doesn't give any additional info because the tr0 interface won't come up.
(apparently problems with tr / ibmtr_cs / 2.4.2 in this build.)

I tried running hostname lizzard.raleigh.ibm.com to set the host then starting
init 5 and that seemed to make it work. However I have doubts that hostname
acutally did anything since I ran init 3 then init 5 as root.See next bit.

More testing switching between lizzard and oasis host names / network configs. 

1) boot box runlevel 5(network config working for oasis.bayspring.lane)
2) login as normal user through gdm. Get gnome desktop.
3) Run netcfg, set lizzard.raleigh.ibm.com name / network config, save, exit.
4) Log out of gnome using panel.
5) gdm never comes back. X server is running (checkerd bg with X cursor)

Checked the /var/log/messages. The interesting stuff appears to be:
gdm(pam_unix)[858]: session closed for user scottrus by uid 0.
gdm(pam_unix)[858]: gdm_auth_user_remove: /home/scottrus is not owned by uid 0.
gdm(pam_unix)[858]: gdm_auth_user_remove: Ignoring suspiciously looking cookie
file /home/scottrus/.Xauthority
gnome-name-server[979]: input condition is: 0x11, exiting

At that point I go to VT1 (ctrl-alt-f1) and login as root then run init 3
followed by init 5. GDM starts up fine again with the correct hostname.

Guessing: somethings up with pam configs for gdm?

Comment 4 Nalin Dahyabhai 2001-04-03 19:41:54 UTC
The "Error getting hentry" message is directly related to network interface
problems -- it's gdm's way of saying "couldn't resolve hostname to IP address",
which means your network link to the nameserver is down.

Comment 5 Scott Russell 2001-04-03 19:57:56 UTC
Understood. It stands to reason that if the system isn't connected to the
network (the interface isn't up) that this would be the problem. 

However I do have the hostname properly setup in the /etc/hosts file and the
order hosts, dns. Also, the fact that the interface isn't up doesn't explain why
everything works again if I run init 3 then init 5 to restart gdm.

Thoughts? Have you tried this over there by chance?

Comment 6 Nalin Dahyabhai 2001-04-03 22:13:50 UTC
I have set "alias eth0 off" in /etc/conf.modules, set the default runlevel
to 5, rebooted, verified that my ethernet wasn't up, used netcfg to change the
hostname to a made-up value and add it to /etc/hosts, and rebooted.

I was then able to log in as a local test user, though I still saw the two
messages you're seeing:
Apr  3 17:49:46 scooby gdm(pam_unix)[1140]: session closed for user tester
Apr  3 17:49:46 scooby gdm[1140]: gdm_auth_user_remove: /var/tester is not owned
by uid 0.
Apr  3 17:49:46 scooby gdm[1140]: gdm_auth_user_remove: Ignoring suspiciously
looking cookie file /var/tester/.Xauthority

Changing the hostname with X running will cause problems with some applications,
depending on how DISPLAY is set.  If you're using standard X access controls
(via keys in .Xauthority files), as soon as the hostname changes, clients won't
be able to contact the X server to display windows because the name of the
display has changed, and any xauth keys they had access to no longer match the
hostname.  This is a known problem when DHCP lease expirations cause hostnames
to change.

Comment 7 Scott Russell 2001-04-03 22:24:32 UTC
Okay, so on that same box try this for me and see if you get a server w/o gdm

1) Leave alias eth0 off in your modules.conf
2) Make sure you have your fake and real host name in /etc/hosts. I used for oasis and for lizzard.
3) Boot with linux 5. Login as a normal user via gdm.
4) Use netcfg to change the host name / domain to the one not in use.
5) Log out of gnome via the pannel.

At this point you should have a X server with the X cursor but no gdm. Is this

I'm not sure how to 'solve' this but I'm wondering if this problem existed in
7.0 and 6.2 as well. I think it might not have but I'm not 100% sure. The main
difference being that in prior versions of Red Hat linuxconf was used to change
things (or at least by me.)

Comment 8 Scott Russell 2002-04-03 19:34:04 UTC
Close this please. Skipjack is out now.

Note You need to log in before you can comment on or make changes to this bug.