LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 07-14-2004, 02:56 PM   #1
mst700
Member
 
Registered: Jun 2004
Location: Ascension Island SAO
Distribution: FC2 2.6.8 Kernel, FreeBSD Unix, Gentoo 2004-2, WinXP SP2
Posts: 46

Rep: Reputation: 15
Question Naming My Computer and stuff


I need some assistance, what are the proceedures in naming my machine

I know this is a very basic question for some, I have not gotten it yet. I have the name localhost.localdomain as default for my machine. I would like to name it something else and be able to have my other computers see this.

I know that if I change my host name and things like that I lose INTERNET connectivity, so I want to understand what are the correct procedures.

If there is an article that explains it in "newbian talk" please direct me, or explain it so I can go to the correct files.




mst700

Newbies will one day be the masters!
 
Old 07-14-2004, 02:59 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,398

Rep: Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965Reputation: 1965
just use the hostname command as root. e.g. "hostname l33t_h4X0rz_boxen" or whatever takes your fancy.
 
Old 07-14-2004, 03:07 PM   #3
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
will this be permanent, or just for that one session?
 
Old 07-14-2004, 03:50 PM   #4
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
It will only use the domain name and hostname that you change to until you reboot. If you want to make it permanent, add the same commands that you entered at the console in rc.local. You have to be as root to edit rc.local. There are other ways too, like adding or editing a line or two in sysctl.conf. Below is the sysctl lines that you can add or edit in sysctl.conf.

kernel.domainname = localhost.localdomain
kernel.hostname = localhost.localdomain

You can type "service network restart" to reactivate your network connection.
 
Old 07-14-2004, 05:58 PM   #5
mst700
Member
 
Registered: Jun 2004
Location: Ascension Island SAO
Distribution: FC2 2.6.8 Kernel, FreeBSD Unix, Gentoo 2004-2, WinXP SP2
Posts: 46

Original Poster
Rep: Reputation: 15
Thanks acid_kewpie for the links

Quote:
the Rute users guide, all you need to know to get going
How to ask good questions - please read!
These are very helpful links thank you.


Thanks Electro for making it clear.

mst700

Newbies will one day be the masters!
 
Old 07-14-2004, 06:35 PM   #6
javageek
LQ Newbie
 
Registered: Jul 2004
Posts: 3

Rep: Reputation: 0
setting your host name

depending on your distribution, there are several utilities that can help you configure it.
for example: Suse uses yast, redhat depending on version uses ntsysv or linuxconf,
Mandrake depending on version uses linuxconf - newest version uses their propriatory control center which is available in graphical and text mode (Configure my computer in graphical mode or mcc under text mode)

Alternatively you can install linuxconf on any distribution!
 
Old 07-15-2004, 07:46 PM   #7
mst700
Member
 
Registered: Jun 2004
Location: Ascension Island SAO
Distribution: FC2 2.6.8 Kernel, FreeBSD Unix, Gentoo 2004-2, WinXP SP2
Posts: 46

Original Poster
Rep: Reputation: 15
Question [B]Naming my computer kicks me off the internet.[/B]

Naming my computer kicks me off the internet.

Can anyone tell me what I am doing wrong? I have completed this step:

Quote:
It will only use the domain name and hostname that you change to until you reboot. If you want to make it permanent, add the same commands that you entered at the console in rc.local. You have to be as root to edit rc.local. There are other ways too, like adding or editing a line or two in sysctl.conf. Below is the sysctl lines that you can add or edit in sysctl.conf.

kernel.domainname = localhost.localdomain
kernel.hostname = localhost.localdomain

You can type "service network restart" to reactivate your network connection.
I can't connect to the internet after I make the change, so I return my files to orginal condition and I connect with np.


mst700


Newbies will one day be the masters!
 
Old 07-16-2004, 12:43 AM   #8
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
How are you connected to the internet?

Are connected straight to the modem like cable or xDSL?

Are you connected to a dial-up service?

If you are connected straight to a cable or xDSL modem, I can see you are having problems. Some ISP uses either hostname and domainname to look up you on their server. Other ISP uses the MAC address of your computer instead of the MAC of the modem. Using the MAC address from the modem makes it easy for you to change the hostname or domainname of your computer. Using a router, you can change your IP address, your MAC address, domainname, and hostname on your computer.

You can also try "service internet restart".
 
Old 07-16-2004, 06:17 PM   #9
mst700
Member
 
Registered: Jun 2004
Location: Ascension Island SAO
Distribution: FC2 2.6.8 Kernel, FreeBSD Unix, Gentoo 2004-2, WinXP SP2
Posts: 46

Original Poster
Rep: Reputation: 15
Exclamation My current configuration

I am currently configured like this:

Config #1

ISDN ext modem --> WINXP SP2 machine --> Linux box
--> WINXP SP2 second machine
--> Mac Laptop


I want to make the linux machine the DNS/HTTP/Gateway etc..... and have a router connected to the linux box so the other computers can connect. Like this:

Config #2

ISDN ext Modem ---> Linux Box ---> Router ---> WINXP SP2
---> WINXP SP2
---> Mac Laptop
---> WEBCAM #1
---> WEBCAM #2
---> WEBCAM #3


So, my biggest question is who do I get the Linux box named and work from there. My ISP doesn't have any problem with me naming my WIN machine, so I was confussed why the linux machine would? I really want to work with config #2 as my network because I have to reboot WIN machines every 3 days or so and didn't want to have to do it.


P.S> My ISDN ext modem needs a computer to work so that is why I have a machine on the out side of the router. I can make the ISDN machine connect to the internet with my settings hostname= localhost, domainname =localdomain. I want to make to name my linux box Penguingateway and my local area net as geek.net. so it would look like Penguingateway.geek.net

Any help is welcome.

mst700

Newbies will one day be the masters!
 
Old 07-16-2004, 07:00 PM   #10
jamuz
Member
 
Registered: Jun 2004
Location: MD USA
Distribution: SimplyMEPIS 6.0, openSuSE 10.2
Posts: 90

Rep: Reputation: 15
Referring to your Config #2---

If you configure your linux box as a gateway you don't need a separate router. A hub (or better, a switch) is a simpler, less expensive and functionally adequate interface to all the other boxes. Just be sure to get a hub or switch with enough ports---eight minimum for your Config #2.

Best wishes.
 
Old 07-16-2004, 10:23 PM   #11
mst700
Member
 
Registered: Jun 2004
Location: Ascension Island SAO
Distribution: FC2 2.6.8 Kernel, FreeBSD Unix, Gentoo 2004-2, WinXP SP2
Posts: 46

Original Poster
Rep: Reputation: 15
Route or Switch

I that sound great except I have a i707 D-Link Route/Switch already, so I was going to go with the config #2. This still don't help/explain why I can't name my computer.


mst700

Newbies will one day be the masters!

Last edited by mst700; 07-17-2004 at 12:42 AM.
 
Old 07-17-2004, 07:43 PM   #12
mst700
Member
 
Registered: Jun 2004
Location: Ascension Island SAO
Distribution: FC2 2.6.8 Kernel, FreeBSD Unix, Gentoo 2004-2, WinXP SP2
Posts: 46

Original Poster
Rep: Reputation: 15
Thumbs up WOOT

got the name changed

Only problem is I get a flag error saying can't find IP address for PeguinGateway.geek.net (my gateway linux machine)
So I assume I have defined something that makes the DNS/DHCPD want to go to the net and look for the IP address. I might be a little confused on procedure. Can anyone tell me what kind of network I should be running:

I have:

ISDN ext modem----> Linux box ----> D-Link i707p Router ---->

WINXPSP2
WINXPSP2
Mac Laptop
WEBCAM #1
WEBCAM #2

I want to be able to have all ip's connect to the INTERNET via ISDN modem/Linux box. Should I be setting up a different type of DNS/dhcpd? If you want I can make available my /etc/hosts, /etc/rc.local, /etc/syscfl.conf, /etc/dhcpd.conf files. If you think that will help?]

Please advise.


mst700

Newbies will one day be the masters!
 
Old 07-17-2004, 08:06 PM   #13
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: Ubuntu, FreeBSD, NetBSD
Posts: 1,449

Rep: Reputation: 47
/etc/hosts
/etc/dhcpd.conf

And /etc/resolv.conf

With these files we might be able to spot what is going on. There is one other file where the problem might be but I don't think so.

Also... do all the computers have a hosts file so they can find each other by name?
 
Old 07-17-2004, 08:14 PM   #14
mst700
Member
 
Registered: Jun 2004
Location: Ascension Island SAO
Distribution: FC2 2.6.8 Kernel, FreeBSD Unix, Gentoo 2004-2, WinXP SP2
Posts: 46

Original Poster
Rep: Reputation: 15
Quote:
With these files we might be able to spot what is going on. There is one other file where the problem might be but I don't think so.
My other machines are windows XP, and MAC. I don't know how they work as far as hosts files. I will post my files shortly. I am at work now until 0800Z. I will post then.
 
Old 07-17-2004, 11:42 PM   #15
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
The hosts file in LINUX is the samething in Windows and MAC. In your hosts file in LINUX, do not remove the line that says localdomain. Just leave it and add your server name.

Did you disable dhcp in your router. Is WAN port not connected because if it is I can see you are having problems.

Use only the ports on the router that are a switch hub not WAN.

To make it easy, only setup DHCP server on the LINUX system. Then if you really need DNS, you can set it up. After you got your network working, you may want to setup squid or web cache service. Do not forget to setup firewall like iptables.

To make sure your setup works connect a crossover ethernet cable from any of your systems to the LINUX system. If it works then you can use the the switch hub.

I suggest getting either cable or xDSL because ISDN is much, much slower than cable and xDSL. The prices of cable and xDSL has changed a lot when ISDN was around. Both cable and xDSL is very easy to use. You just hook it up to the wan port of your router and all your systems can be connect to the internet.

I suggest looking at some documentation at tldp.org.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
BRAND New How do i get stuff like LimeWire and IPodder on my computer? Featherlinuxguy Linux - Software 2 09-23-2005 10:29 PM
mail server the naming naming convention problem kashan Linux - Newbie 0 07-16-2004 02:08 PM
What computer stuff can I listen to while working out? sandboy6184 General 4 05-05-2004 09:12 PM
How can I compile stuff on one computer, and move it to another? kleptophobiac Slackware 6 09-07-2003 10:08 AM
naming your computer (hostname) sitrus Linux - General 4 09-07-2002 03:09 PM


All times are GMT -5. The time now is 07:18 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration