LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Change host name (https://www.linuxquestions.org/questions/linux-newbie-8/change-host-name-46607/)

romcgill 02-22-2003 12:50 AM

Change host name
 
I have posted about this before. I wrongly entered my ISP name where I should have put a a nmae for my box. Now it tells me it can't log on, and Gnome won't run properly. I can get to the GUI and the desk top.

Texicle thanks for your info, however when I got to netconfig it told me it was not a valid command or something.

Also - it is dial up modem, not cable or dsl. But i have configuerd the dial up for Suse okay.

Greatly appreciate any help.

Thanks in advance rose

fancypiper 02-22-2003 01:30 AM

Check your /etc/hosts file and see if it is similar to mine:
Code:

# fancypiper Redhat 7.3 /etc/hosts file
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1      fancypiper      localhost.localdomain  localhost
192.168.0.1    fancypiper
192.168.0.2    flute
192.168.0.3    tinwhistle

Some distros like to have these in your /etc/resolv.conf file as well:
Code:

domain yourispname.com
nameserver <your isp's first dns>
nameserver <your isp's second dns>


Crunch 02-22-2003 01:47 AM

yeah try "netconfig" in konsole /terminal and type "netconfig" and you should be able to reconfigure your net settings; reboot then boomage, you have it set ;]

fancypiper 02-22-2003 01:50 AM

Why reboot? Just restart the network.

:tisk: Rebooting is for installing hardware and new kernels.

cuckoopint 02-22-2003 02:18 AM

Quote:

Originally posted by fancypiper
:tisk: Rebooting is for installing hardware and new kernels.
they don't make hot swapable hardware for anything -no reboot.

Kernels can be recompiled with new hardware support as modules - w/o reboot - but I guess swapping the kernel on the fly is a little out of our (ie. *my* ) ballpark.... counter-point someone?

fancypiper 02-22-2003 02:44 AM

I think I saw how you could do it on the Gentoo forum, but it was quite a few hoops to jump through and it was over my head.. :study:

romcgill 02-22-2003 03:05 AM

fancypiper

thanks for your efforts.

I should have given additional info.

I have had Mandrake 9.0 installed by a friend using ftp. His machine is connected to a network/ server.

I tried checking the /etc/hosts file. It advised no such file or directory - that was using the http://www.xtra name. I then tried variations of my name but no luck.

What do I do to enter a command. I get very nervous doing things as root or admin.

Thanks for your help.

Will check the gentoo site and see what i can find. Have been trying various sites (have the bookmarks you list).
Am now on-line via Mnadrake!

Rose

fancypiper 02-22-2003 03:15 AM

Here are some more, then :D
# Mandrake links
Mandrake home page
Mandrake Users website
Easy software management: Red Carpet
Maximum RPM
rpmfind

I always wish I could have visited New Zealand when I was in the US Navy :cry:

romcgill 02-22-2003 03:26 AM

Quote:

Originally posted by fancypiper
Here are some more, then :D
# Mandrake links
Mandrake home page
Mandrake Users website
Easy software management: Red Carpet
Maximum RPM
rpmfind

I always wish I could have visited New Zealand when I was in the US Navy :cry:

I love New Zealand and think it is a very beautiful country - but then I am biased of course! :-)

I have bokmarked these further sites - thanks.

So far my explorations have not helped - however I am now on-line in Mandrake, so maybe the hostname issue does not matter too much.
Rose

PS Maybe you could come over some time and explore our wonderful country?

romcgill 02-22-2003 03:30 AM

Oh - and I just went to all those sites and bookmarked them, without exiting each, with no freezing or crashing. Okay it was slow, because I only have old, small CPU and 64mb ram, but no freezes or crashes! I see why Linux users call it windoze!
Rose

fancypiper 02-22-2003 03:32 AM

Quote:

I tried checking the /etc/hosts file. It advised no such file or directory
:confused:Uh... I have never heard of a distribution without that file. It is required for networking. Mandrake has some clicky tool to set that, but I am in Redhat just now and can't point out the clicks.
Quote:

Originally posted by fancypiper
Check your /etc/hosts file and see if it is similar to mine:
Code:

# fancypiper Redhat 7.3 /etc/hosts file
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1      fancypiper      localhost.localdomain  localhost
192.168.0.1    fancypiper
192.168.0.2    flute
192.168.0.3    tinwhistle

Some distros like to have these in your /etc/resolv.conf file as well:
Code:

domain yourispname.com
nameserver <your isp's first dns>
nameserver <your isp's second dns>


If you aren't connected to a LAN (Local Area Network), the stuff with the 192. * can be eliminated in the /etc/hosts file. Your computer's name (fancypiper in my case) is added to the line with 127.

Here is my /etc/hosts file in Mandrake for your reference
Code:

127.0.0.1        localhost
192.168.0.1                fancypiper
192.168.0.2        uilleann
# fancypiper /etc/hosts file
192.168.0.3        tinwhistle

Here is my Mandrake /etc/resolv.conf file:
Code:

search localdomain infoave.net
nameserver 204.116.57.2
nameserver 206.74.254.2

domain infoave.net

# ppp temp entry

hth

romcgill 02-22-2003 05:48 AM

Well - I don't know. I went to command line and entered /etc/host
and got nothing.

Ihave read something at another site but it is beyond me at present!
/
To be honest - I am beginning to feel so stupid!

I have gone to command line and typed what you wrote - am I missing some critical thing?

My main thing now is to get printer configured., but things I read don't deal with the messages I recieve which are:

ftp://dionstoywork//linuxMandrake/i5....1mdk.i586.rpm

abd so on but with cups etc in appropriate place.

The install was from a server so I guess these messages relate to that, but where do I go, and what do I do , to override it?
Thanks
Rose

romcgill 02-22-2003 05:52 AM

oh, and fancypiper

do you have Irish ancestry by any chance?

I note the references to pipes and flutes and uillean pipes ... all my ancestry beyond NZ is Irish. I love Irish music - the pipes, flutes, whistles and that tambourine drum type thing!
Rose

fancypiper 02-22-2003 01:52 PM

Mandrake is a little shy with easy command line tools. You may have Midnight Commander installed. It has a nice editor.

Open up an x terminal and type this (I am pasting the contents of my x terminal so you can see how the prompt changes.
Code:

[phil@fancypiper phil]$ su -
Password:
[root@fancypiper root]# mc

What we did: You switched to root's account from your users account and launched Midnight Commander, a tool with lots of goodies. You should be able to navigate your system easily.

In one of the panes, navigate to the top. Press enter when you are on something that has .. and you go up in the directory.

Now go down to /etc and press enter. Navigate down to the file hosts and press F4. Can you see and edit it (if needed) now?

The only other editor I know in Mandrake is vi, which can throw a newbie for a loop. If you want to try that editor, here is a link that explains it.

vi cheat sheet

As far as I know I have Scot, Irish, Dutch and German ancestries. At least the family names indicate that although I haven't done any geneology searches.

The tamborine without the jinglely things is a bodhran (pronounced bow-rahn).

You can hear our first album with the Real Player here:

First CD liner notes

Snippets of our 2nd CD are available here:

http://www.cdbaby.com/naomisfancy

romcgill 02-22-2003 05:41 PM

Hmmmm ....
went to x terminal and all went well until I typed mc. It told me "command not found".

I have something called gedit - is that any help.

Also another problem has surfaced - the names under icons etc and in dialogue boxes are now made of symbols instead of letters, so I can't read them!


Going to listen to your music now - and stick with Windows for a bit of a break!
Rose

fancypiper 02-22-2003 05:52 PM

I wish you had the install disks. Can you figure out how to install it with the Mandrake software manager since you are on-line?

gedit is the gnome editor, so you can try this and see if it works. Open an x terminal and:
Code:

[phil@fancypiper phil]$ su -
Password:
[root@fancypiper root]# gedit /etc/hosts

Will open it with no errors? Can you save it with the name hosts.orig?

I hope I don't have to boot into Mandrake to help you because that is my least favorite distro. All the tools I am used to using are missing and I feel helpless! :cry:

I am playing a reed in my C chanter made by a fellow in Tazmania, Dickie Deegan. He made it in 1992 and it sounds great. I need to record some with that reed.

romcgill 02-22-2003 06:09 PM

Well, I was going to call it a day with Linux for today! But might go back and take another look.

It is interesting that Mandrake is supposed to be most user friendly but I got Suse 7.1 installed and printing and connected to network by myself after watching someone do the first install.

RedHat also installed okay off CDs but couldn't work out how to get it printing as I have an Epson printer which is unsupported. I still have an old 2 Gb hard drive which is empty. Tempted now to go back and try RedHat again and maybe fiddle with printer drivers, as the literature says CUPS and gimp-print should support it. What do you think?

I have had to download a newer version of Realplayer so still haven't heard your music yet! Saw The Chietains on TV last year - they are great!
Cheers
Rose

fancypiper 02-22-2003 06:30 PM

Linux is a very habit forming OS indeed. :)

Linux (distros and boxes) are like those potato crisps, you can't have just one! :D Install them all!

Real Player download for Linux

romcgill 02-22-2003 07:23 PM

Finally - something that worked - yaaay!!

I used gedit as suggested and got the following in a new window with a menu etc at the top.

127.0.0.1 localhost.localdomain local host

I didn't dare do anything for fear of messing it up again.
I assume I change localhost to whatever I want to name my computer, and leave the rest the same, and then save it?

Not touching it until I am sure!

Thanks
Rose

I think the printer install might work then too, as Gnome doesn't work properly at present according to the message I get, because of the error with hostname.

fancypiper 02-22-2003 08:06 PM

As I said, save it with the name hosts.orig. Now, you have a copy of that safe and sound.

Open /etc/hosts again and edit it to read like this:

127.0.0.1 localhost.localdomain <your-computer's-name>

Now save it

Try stuff. If it breaks something,

mv /etc/hosts.orig /etc/hosts

You are back at the beginning.

If it fixes it,

cp /etc/hosts /etc/hosts.works

Or something similar.

You have to get your hands dirty with Linux.

Install Midnight Commander if you can. It's a real neat application and makes the command line a breeze if you break X.

# Mandrake links
Mandrake home page
Mandrake Users website
Easy software management: Red Carpet
Maximum RPM
rpmfind

romcgill 02-23-2003 02:17 AM

hi fancypiper,

Well the sage goes on. I figured you would be sleeping as we are at opposite ends of the time thing almost so posted to a local lug.
In the end they gave me line by line instructions (as you did :-) ). Finished up using 'vi', which seemed to do as it was supposed to in that I could then see appropriate file.

But still same log in problem.

Have RedHat 8.0 disks and thinking of installing to empty 2gb old hard drive. Worried about bootloader though, as messed up MBR in a previous RedHat install.
Current bootloader has a floppy option. How would i configure that if did install RedHat again. Wondering if it might be a better option for me in the end.
Couldn't configure printer though with RH.
Further ideas welcome
Rose

romcgill 02-23-2003 09:54 PM

sys/cinfig problems solved :-)
 
hi fancypiper

wanted to let you know the log on problem has been resolved. I am actually doing this in Mandrake.

Had to change hostname and domain name in sysconfig file. So that is fixed!

Next problem is my printer - going to have to do some reading about adding one as the KLJetTool talks about HP jet laser which I don't have! Must be a way to add a printer but KDE help doesn't mention it.

Still haven't managed to listen to your music either!
Looking forward to it.
Rose


All times are GMT -5. The time now is 08:26 AM.