LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 06-15-2009, 04:19 AM   #1
wiener
LQ Newbie
 
Registered: Jun 2009
Posts: 22

Rep: Reputation: 0
how to publish my hostname?


Hi all,
I have installed Debian Lenny on my PC, which is connected to a network of Unix machines and Windows machines. I can ping from any machine to my Linux PC if I provide the IP address of my PC. Yet, if I try to use my hostname, it fails, saying that the host is unknown.
What must I do in order to make my hostname known by peer machines?
 
Old 06-15-2009, 04:31 AM   #2
jsteel
Member
 
Registered: Mar 2007
Location: England
Distribution: Arch
Posts: 392

Rep: Reputation: 34
Can you add DNS entries on your router (or DNS server)? That would be the best way, or you could add the DNS entries to the other computers on your network. I do not know a way to broadcast this information.

Last edited by jsteel; 06-15-2009 at 05:36 AM. Reason: Added "(or DNS server)"
 
Old 06-15-2009, 04:44 AM   #3
peonuser
Member
 
Registered: Mar 2008
Location: Where ever I am.
Distribution: Various
Posts: 173
Blog Entries: 135

Rep: Reputation: 21
Quote:
Originally Posted by jsteel View Post
Can you add DNS entries on your router? That would be the best way, or you could add the DNS entries to the other computers on your network. I do not know a way to broadcast this information.
Yes, it needs to be set up on the dns server. If you are doing this at work, the admins should be able to do that for you. If you are doing it at home and do not have access to the dns in the router or your dns server, you could add the entry for your machine into the host files of all the local machines. I only recommend that as a last resort. Any decent guru should be able to do that for you.

Last edited by peonuser; 06-16-2009 at 01:05 AM.
 
Old 06-15-2009, 08:16 AM   #4
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,231
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
You would have to install and configure Samba, to get NetBIOS over TCP/IP, so the windows boxes would find it automatically.

The DNS solution is easier and cleaner imho, and will work just as well if not better.
 
Old 06-16-2009, 01:08 AM   #5
peonuser
Member
 
Registered: Mar 2008
Location: Where ever I am.
Distribution: Various
Posts: 173
Blog Entries: 135

Rep: Reputation: 21
Quote:
Originally Posted by farslayer View Post
You would have to install and configure Samba, to get NetBIOS over TCP/IP, so the windows boxes would find it automatically.

The DNS solution is easier and cleaner imho, and will work just as well if not better.
Samba/etc is even more of a can of worms with security issues. We have a mixed network and just a dns server is all that is needed for us. We dumped samba a long time ago. we use sshfs instead even for windows boxes.
 
Old 06-16-2009, 04:23 AM   #6
wiener
LQ Newbie
 
Registered: Jun 2009
Posts: 22

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by peonuser View Post
Samba/etc is even more of a can of worms with security issues. We have a mixed network and just a dns server is all that is needed for us. We dumped samba a long time ago. we use sshfs instead even for windows boxes.
Hi Peonuser,
Will sshf help me to make my host name familiar by peer computers on my network? Can you provide some detail what I need to install/do etc?
Thanks in advance.
 
Old 06-16-2009, 04:50 AM   #7
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
Check /etc/hosts on the Unix boxes. I forget the file on Windows.

You will need a static IP for the box in question.
 
Old 06-16-2009, 02:11 PM   #8
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,231
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
Quote:
Originally Posted by jamescondron View Post
Check /etc/hosts on the Unix boxes. I forget the file on Windows.

You will need a static IP for the box in question.
The hosts file on Windows boxes is located at:
c:\windows\system32\drivers\etc\hosts

That solution would work OK for a very small network, but if there is more than a couple PCs involved it can be time consuming to upkeep if you have to update it frequenty.

tinyDNS might be an option, but the OP hasn't specified how many PC's we are talking about or the overall environment. I'd be surprised with a "network of Unix machines and Windows machines" as the OP stated that there isn't already DNS running on the network.
 
Old 06-16-2009, 02:14 PM   #9
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
I suppose with a little socket programming you could update all the files as quickly as possible, maybe with multicast; the problem being you'd have to have all the exisitng hosts set up and use that as an updater.

Fair point as to the question on whether DNS is running on the network, though
 
Old 06-17-2009, 02:47 AM   #10
peonuser
Member
 
Registered: Mar 2008
Location: Where ever I am.
Distribution: Various
Posts: 173
Blog Entries: 135

Rep: Reputation: 21
Quote:
Originally Posted by jamescondron View Post
I suppose with a little socket programming you could update all the files as quickly as possible, maybe with multicast; the problem being you'd have to have all the exisitng hosts set up and use that as an updater.

Fair point as to the question on whether DNS is running on the network, though
I agree about knowing whether dns is running on the network. I should have asked that first. The internet has dns servers but usually only support systems on the other side fo the router so to speak. The networks I work on, we always set up the local dns first so i have grown to expect it to be there. Do any of the machines on the network automatically get ip addresses? If you have a device passing out ipaddresses, that would be the first place to see if you can add hostnames to it. For a home network that is usually the router. I use third party software on my router so I know it can be done. If you do not have that and are not familliar with linux, there is some third party software that will let a mswindows box act as a dns server for a local network, but you will have to leave that machine on all the time while the network is being used. for linux there is a package called dsnmasq, that is very easy to setup, if you understand ipaddresses and the like. This a bit more that I would let people new to networking do, but it can be done. There a lot of gotchas here. Without knowing all the details of your network it is hard to give a specific answer. You should map out your network first as if doing a highway map of where you live. You need to know what exact devices (computers, printers, routers, servers, and etc) and what protocols (how devices talk to each other) they use (tcpip, ipx, appletalk, arcnet (god forbid), or etc) are on your network.

http://www.google.com/url?sa=t&sourc...fWbQkOjD4-FCBw

Last edited by peonuser; 06-17-2009 at 03:00 AM.
 
  


Reply

Tags
hostname


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
Where to publish or link a tutorial in LQ ? robert@fastec LQ Suggestions & Feedback 2 11-12-2007 06:35 AM
Publish Apache in NAT Machiaveli Linux - Networking 0 07-14-2007 05:37 AM
How to publish a website? vivekr Programming 4 06-04-2006 03:21 PM
Evolution Publish Calendar starcrawl Linux - Software 0 12-12-2005 12:46 PM
how to let linux publish my website? sorno Linux - Newbie 11 07-01-2005 09:59 AM


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