The sysop here bodged the /etc/hosts file so that 'hostname' worked sort of correctly, now I've removed the bodge 'hostname' doesn't work right any more.
At home (Slackware) I get:-
home$ hostname -s home home$ hostname home home$ hostname -f home home$ domainname (none)
Here on this Fedora box I get:-
$ hostname chrisg.localdomain $ hostname -s hostname: Unknown host $ hostname chrisg.localdomain $ hostname -f hostname: Unknown host $ domainname GEMS
On Wed, Mar 14, 2007 at 01:35:15PM +0000, Eur Ing Chris Green wrote:
The sysop here bodged the /etc/hosts file so that 'hostname' worked sort of correctly, now I've removed the bodge 'hostname' doesn't work right any more.
At home (Slackware) I get:-
home$ hostname -s home home$ hostname home home$ hostname -f home home$ domainname (none)
Here on this Fedora box I get:-
$ hostname chrisg.localdomain $ hostname -s hostname: Unknown host $ hostname chrisg.localdomain $ hostname -f hostname: Unknown host $ domainname GEMS
Err, has hostname been aliased to something else?
On Wed, Mar 14, 2007 at 03:26:26PM +0000, Brett Parker wrote:
On Wed, Mar 14, 2007 at 01:35:15PM +0000, Eur Ing Chris Green wrote:
The sysop here bodged the /etc/hosts file so that 'hostname' worked sort of correctly, now I've removed the bodge 'hostname' doesn't work right any more.
At home (Slackware) I get:-
home$ hostname -s home home$ hostname home home$ hostname -f home home$ domainname (none)
Here on this Fedora box I get:-
$ hostname chrisg.localdomain $ hostname -s hostname: Unknown host $ hostname chrisg.localdomain $ hostname -f hostname: Unknown host $ domainname GEMS
Err, has hostname been aliased to something else?
No, but digging a bit further around in the configuration files in /etc I found in /etc/sysconfig/network the following:-
NETWORKING_IPV6=yes HOSTNAME=chrisg.localdomain NETWORKING=yes NISDOMAIN="GEMS"
That HOSTNAME was the problem, I have now set it to just 'chrisg' and all is well.
I wish I didn't have to do things as root on work systems but our unix/linux guru left the company a few weeks ago and althugh the current support chap does his best he's not really an expert in this sort of stuff.
With the above change and virtually nothing in /etc/hosts all seems to be hunky-dory on the hostname/domainname front. All I have to work out now is why rlogin *sometimes* hangs and ssh to one host doesn't work.