LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-15-2003, 05:40 PM   #1
CloudBuilder
Member
 
Registered: May 2003
Location: Netherlands
Distribution: Ubuntu, Puppy
Posts: 386

Rep: Reputation: 30
Rename local machine


I have a small network with several win machines. They all have a unique name. The network is connected to a router which gives a connection to a cable network. The router is configured to give dynamical addresses. Network is up and running. No Problems.

I have a laptop with red hat9 works fine, I can access INTERNET by the router. I intend to use samba to use the laptop as a workstation on the win network.

By the installation, this laptop got obvious the name
localhost.localdomain.

Typing HOSTNAME in the console localhost.localdomain is the reply.

Using Hostname to change the name, changes the name only for the session but it also blocks the console. You can't open a new one or you can't open the conso;e anymore (at that session).

This name is also on the tab of the network configuration utility.

Changing this name on this tab gives an error. I thought perhaps I have also to change the HOST file in /etc/.

Is it possible to change this name? Say I want to call the computer ADAM , can I change it this way, or are there more complications.(other files to change perhaps? The tab on the network configuration?)

CB

Last edited by CloudBuilder; 09-15-2003 at 05:47 PM.
 
Old 09-15-2003, 06:46 PM   #2
VorlonInfoTech
Member
 
Registered: Jun 2003
Location: West Grove, PA
Distribution: Gentoo, Debian, SuSE, Mandrake
Posts: 55

Rep: Reputation: 15
As far as I know, you can change the host name in the /etc/hostname file, then restart the network. (/etc/init.d/network restart)

Don't forget to restart the network. Worst case: change the file and reboot (which will guarentee the network restarts <grin>)
 
Old 09-15-2003, 07:28 PM   #3
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
To change your hostname in RedHat, take a look at this thread.
http://www.linuxquestions.org/questi...threadid=87488
 
Old 09-16-2003, 06:40 AM   #4
CloudBuilder
Member
 
Registered: May 2003
Location: Netherlands
Distribution: Ubuntu, Puppy
Posts: 386

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Mathieu
To change your hostname in RedHat, take a look at this thread.
http://www.linuxquestions.org/questi...threadid=87488
Okay, in the console the name is changed.

But on the tab DNS in the NETWORK CONFIGURATION I have still localhost.......

Can I change this without consequenses?

CB
 
Old 09-16-2003, 02:01 PM   #5
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
Quote:
But on the tab DNS in the NETWORK CONFIGURATION I have still localhost.......
Strange...
This name is obtain from the /etc/sysconfig/network file.

Make sure that the name in /etc/sysconfig/network and /etc/hosts is the same.

Did you restart the network service (or even better, reboot) ?
Code:
service network restart
 
Old 09-17-2003, 02:53 PM   #6
CloudBuilder
Member
 
Registered: May 2003
Location: Netherlands
Distribution: Ubuntu, Puppy
Posts: 386

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Mathieu
Strange...
This name is obtain from the /etc/sysconfig/network file.

Make sure that the name in /etc/sysconfig/network and /etc/hosts is the same.

Did you restart the network service (or even better, reboot) ?
Code:
service network restart
I made a reboot.

The problem is solved, I editted the DNS tab and everything is still working (I have a nice backup on an USBdrive)

Thanks a lot!

CB
 
Old 09-18-2003, 12:12 AM   #7
elvissaves
LQ Newbie
 
Registered: Sep 2003
Posts: 1

Rep: Reputation: 0
Unhappy

I've tried and tried to rename my hostname.

so here's what I've done

1.) i've edited the HOSTNAME line in /etc/sysconfig/network file to look like this:

HOSTNAME=maulux


2.) I've edited /etc/hosts file to look like this

127.0.0.1 localhost.localdomain localhost maulux

3.) then I did the network restart dance

service network restart

I started
I restarted
I even farted

but still


when I type hostname I get

carmichs-dk.search.corpsys.p4pnet.net

life shouldn't be this hard to change your host name.
why?!!? someone please tell me?
 
Old 09-18-2003, 06:48 PM   #8
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
Reboot the PC.
 
Old 09-19-2003, 02:09 AM   #9
buttshill
LQ Newbie
 
Registered: Jan 2003
Location: Reading UK
Distribution: OpenSuse Tumbleweed
Posts: 17

Rep: Reputation: 0
I am having a similar problem in MDK 9.1 I get a hostname from my cable modem. Even though /etc/sysconfig/network shows the correct hostname. I have restarted/rebooted/reinstalled all with the same result. I can make a temp fix by stop i'net link issue hostname newhostname, restartinternal network. Hostname is now correct, but when I restart the external (i'net) interface the hostname reverts to a long string dexfribing my location on the cable modem's network.

Many thanks for any help

Rgds

John
 
Old 10-14-2003, 10:51 AM   #10
alm
Member
 
Registered: Mar 2003
Location: Sweden
Distribution: RedHat
Posts: 32

Rep: Reputation: 15
To you who where having problems: try setting the hostname manually by typing "hostname -v <hostname>" , then typing "hostname" to see if it works, and then reboot and see if it stays.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
scp: copy a file from local machine to remote machine seran Linux - Newbie 8 10-30-2007 12:23 PM
Setup local machine to allow lan machines to retrieve its local user mail. Brian1 Linux - Networking 3 03-30-2006 05:04 AM
trying to copy files from another machine to the local machine using telnet,..how? shrike_912 Programming 6 03-14-2006 04:45 PM
how to open a dilog on local machine when i do ssh to remote machine fahad26 Programming 3 05-03-2005 07:39 PM
Machine Rename? Cerillean Linux - Newbie 6 05-13-2002 02:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration