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 11-01-2003, 09:25 PM   #1
owensct
LQ Newbie
 
Registered: Nov 2003
Location: California
Posts: 2

Rep: Reputation: 0
Unhappy How to rename Linux server


Hi all,

Hoping someone can answer a question for me. Since I'm fairly new to Linux I'm sure it's an easy one and I just haven't managed to search for the right keywords yet.

Anyway, I am in the process of completing the setup on a server for my home running Rehat 9. I've configured SAMBA and have it connecting to my windows systems. When I log into my windows 2000 system the Linux system shows up as localhost , since this is one of two servers I'm setting up, one for the family files and one for me to learn and try new things on, (heaven forbid I screw up the family server and my wife loses all her pictures of Aunt mabel) I would like each to have seperate names. I browsed through all the Linux books I have and checked the web and cannot seem to find anything that specifically addresses this issue, or the one I have found so far doesn't seem to work. I was hoping one of you not so Newbies would take pity on me and answer this question before I pull all my hair out, (what little I have left that is).

Under network there is a lisitng under DNS for localhost and it also shows up in my hosts file, but when I change these names here I either get an error or windows will no longer connect.

Any help would be greatly appreciated.

Thanks

Gordon
 
Old 11-01-2003, 09:38 PM   #2
akaBeaVis
LQ Guru
 
Registered: Apr 2003
Location: Maryland
Distribution: Slack 9.1,10 Mandrake 10,10.1, FedCore 2,3, Mepis 2004, Knoppix 3.6,3.7, SuSE 9.1, FreeBSD 5.2
Posts: 1,109

Rep: Reputation: 45
take a look at /etc/sysconfig/network and the hostname= option, if it's not there for some reason, then add a line to that file like this: HOSTNAME=hostname, or if that doesn't get it for you, then check the file /etc/samba/smb.conf and the "server string =" line.

ps: hair loss is a terrible thing (I guess...hehe)

Last edited by akaBeaVis; 11-01-2003 at 09:39 PM.
 
Old 11-01-2003, 11:00 PM   #3
burntoutjoy
LQ Newbie
 
Registered: Aug 2003
Location: Hatfield, England
Distribution: Debian 3.0
Posts: 6

Rep: Reputation: 0
also, 'man hostname'
 
Old 11-02-2003, 12:22 PM   #4
owensct
LQ Newbie
 
Registered: Nov 2003
Location: California
Posts: 2

Original Poster
Rep: Reputation: 0
OK I made the change to the network file and the server now appears on my Windows 2000 system as NEWNAME. However, when I log into the server as root the following error message pops up:

Could not lookup Internet address for NEWNAME. This will prevent gnome from operating correctly. It may be possible to corrrect the problem by adding NEWNAME to the file /etc/hosts.

Since I don't want to add a hostname to the host file but want to replace loclahost I changed the following line in the hosts file like this:

original
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost

new
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 NEWNAME.localdomain NEWNAME

I then rebooted the server and when I logged into the server from my Windows 2000 system, (also rebooted after server came up), NEWNAME shows up correctly in network neighborhood and I've received no other error from Linux. So as far as I can tell that worked, (at least I'm not getting any error messages) and I just wanted to let everyone know in case they run across a similiar issue and to thank akaBeaVis and burntoutjoy for their help.

Gordon

Last edited by owensct; 11-02-2003 at 12:24 PM.
 
Old 11-03-2003, 04:49 PM   #5
akaBeaVis
LQ Guru
 
Registered: Apr 2003
Location: Maryland
Distribution: Slack 9.1,10 Mandrake 10,10.1, FedCore 2,3, Mepis 2004, Knoppix 3.6,3.7, SuSE 9.1, FreeBSD 5.2
Posts: 1,109

Rep: Reputation: 45
You really need to put localhost back the way it was and instead use the ip address of the machine with "NEWNAME", the name and ip address of local host should not be messed with, there will unexpected and mysterious consequences. In other words, 10 to 1 you're not typing "http://127.0.0.1/index.html" into the browser connecting to the server, rather you are most likely typing a valid (at least) class c ip address such as 192.168.0.3, or 10.0.0.10, putting that ip address in the hosts file with "NEWNAME" next to it would be best.
 
  


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
rename linux general to linux other? Mr. New LQ Suggestions & Feedback 1 06-16-2005 06:38 PM
Can I rename a system file from my Linux amer_58 Linux - Newbie 4 06-07-2005 07:42 PM
can we configure a Linux server with mail server,file server and web server kumarx Linux - Newbie 5 09-09-2004 06:21 AM
rename linux ethernet adapter samills70 Linux - Newbie 2 06-09-2004 03:44 AM
rename the server and assign the new IP for the server ashley75 Linux - General 1 08-25-2003 01:27 PM

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

All times are GMT -5. The time now is 04:45 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