LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 06-03-2004, 08:02 AM   #1
samills70
Member
 
Registered: May 2004
Posts: 32

Rep: Reputation: 15
Question hostname not staying!!


Hi everyone.

I am having a strange problem, I am trying to set the hostname of my server from the terminal after leaving an xwindows session. I tried during the gnome (using redhat 9 by the way) to set it from a command line using hostname command but it didn't work. I then init 3'ed to a terminal and directly after I set the hostname command it reflects the new setting, but after I reset the server it goes back to the old name. I am obviously logged in as root while doing this, but to no avail.

Any help would be greatly appreciated.

 
Old 06-03-2004, 10:08 AM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,225

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
I suspect setting the hoatname at the command line does not write it to any file. Off hand, I don't know the name of the file.

Not long after installing Linux, I installed Webmin. It comes with most distros. Once installed you access Webmin form any machine (including you own machine) on you network through a web browser. It is password protected, and you can control what each user you create can access.

You can set the hostname for your own machine through Webmin, and update the hosts file. It makes administration a lot easier. You do not have to find the files that contain the information. It is a good way to configure lots of other stuff.

I hope this helps.
 
Old 06-04-2004, 12:31 AM   #3
aeolus
Member
 
Registered: Feb 2004
Posts: 66

Rep: Reputation: 15
you can modify /etc/sysconfig/network file and reboot so that you can change your server name.
 
Old 06-04-2004, 01:55 AM   #4
samills70
Member
 
Registered: May 2004
Posts: 32

Original Poster
Rep: Reputation: 15
thanks guys..

I didn't want to have to install webadmin because my ultimate goal is to do everything from a terminal, so thanks to aeolus that directory I have a feeling is going to be mighty helpful.

Me
 
Old 06-04-2004, 02:35 AM   #5
aeolus
Member
 
Registered: Feb 2004
Posts: 66

Rep: Reputation: 15
For your goal,i can recommend you tool which is named SecureCRT
Maybe it can help you.
 
Old 06-30-2004, 04:47 AM   #6
AZIMBD03
Member
 
Registered: Oct 2003
Location: Dhaka,Bangladeh
Distribution: Red Hat
Posts: 80

Rep: Reputation: 15
you should add the follwoing line in /etc/hosts file

192.168.1.12 ns1.xyz.com ns1


192.168.1.12=your host ID addres
you=hostname
xyz=your domain name


Enjoy

Azim
 
Old 06-30-2004, 04:52 AM   #7
AZIMBD03
Member
 
Registered: Oct 2003
Location: Dhaka,Bangladeh
Distribution: Red Hat
Posts: 80

Rep: Reputation: 15
Correction:
you should add the follwoing line in /etc/hosts file

192.168.1.12 ns1.xyz.com ns1


192.168.1.12=your host ID addres
you=hostname
xyz=your domain name


Enjoy




Azim
 
  


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
Staying with debian Woody? alexxxis Debian 3 06-14-2005 04:41 PM
Staying online between logins une Mandriva 3 04-14-2005 03:06 PM
windows mnt not staying Mad Mardigan Linux - Software 2 01-20-2004 11:29 PM
Staying awake houseathon General 20 10-01-2003 01:13 AM
Things not staying in PATH? phishead Linux - General 5 01-10-2002 07:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 02:35 PM.

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