LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-28-2004, 08:02 PM   #1
HadroLepton
LQ Newbie
 
Registered: Mar 2004
Location: germany
Posts: 15

Rep: Reputation: 0
ping netbios names from linux (samba)


(this is not a question as i already have the solution)
i wanted to post this because i have been searching the last three days for this problem in many forums and found many people having similar problems but never got the right answer.

the situation in short
- i have set up samba correctly and my windows pcs and linux pcs can see each other in the windows (netbios) network
- shared files are reachable and readable from every pc
- every pc can ping each other using the ip address (ping 192.168.0.100)
- from windows pcs: ping netbios names is working (ping lepton2 will ping the ip behind the name lepton2)
- PROBLEM! from linux pcs: ping netbios names will result in "unknown host lepton2"

the most common answer to this problem is: hardcode the host names in the hosts file. sure, this will work, but not if the network is using dhcp.

after three days of searching and trying i have finally found this
http://us1.samba.org/samba/docs/man/...html#id2586120
(well okay finding the link is not so hard, but finding the right information there...)

the part of interest would be
"...and the "wins" parameter needs to be added to the "hosts:" line in the /etc/nsswitch.conf file"

so then...
grab you favorite editor
edit your /etc/nsswitch.conf file
search for the line starting with hosts (my line was like this "hosts: files dns")
add "wins" to the line ("hosts: files dns wins")

now ping netbios name should also work from the linux pcs

well i hope this post will help others searching for the same problem

Last edited by HadroLepton; 01-03-2005 at 12:00 AM.
 
Old 05-20-2006, 12:54 PM   #2
kellinjar
Member
 
Registered: Mar 2004
Location: South Korea
Posts: 103

Rep: Reputation: 15
I know this is an ancient thread, but it deserves bumping. I just ran into this issue with a default install of FC5 and was googling for a long time trying to find an answer.
 
Old 06-23-2006, 07:28 PM   #3
swerdna
Member
 
Registered: Jun 2006
Location: Oz
Distribution: openSUSE 10.x
Posts: 80

Rep: Reputation: 16
Thanks so much. Had given up on this long ago -- just stumbled on it. Admins should pin it, but this will refresh it.
Cheers
Swerdna
 
Old 09-16-2006, 12:25 PM   #4
svelemor
LQ Newbie
 
Registered: Aug 2003
Posts: 14

Rep: Reputation: 0
good, good

Ah, finally!

It's never really been on the top of my list, but nevertheless really useful information! Especially as you say, when DHCP is used....

Thanks!
 
Old 09-19-2006, 01:37 AM   #5
zamri
Member
 
Registered: May 2004
Location: Malaysia
Distribution: Mandrake,Slackware,RedHat
Posts: 157

Rep: Reputation: 30
really really useful. rarely documented information. good job HadroLepton.
 
Old 10-01-2006, 09:35 AM   #6
essdeeay
Member
 
Registered: Aug 2004
Location: United Kingdom
Distribution: Debian
Posts: 88

Rep: Reputation: 15
Thumbs up

Thank you for this, you're a lifesaver!
 
Old 10-16-2006, 06:11 PM   #7
HadroLepton
LQ Newbie
 
Registered: Mar 2004
Location: germany
Posts: 15

Original Poster
Rep: Reputation: 0
bumping thread for great update

under ubuntu you have to install the winbinds package for this to work
Code:
apt-get install winbinds
thanks for all the thankyous
 
Old 12-01-2006, 10:12 PM   #8
RareButSerious
LQ Newbie
 
Registered: Dec 2006
Posts: 2

Rep: Reputation: 0
(big bump)

dugg, furled and gmailed to myself.

I've looked EVERYWHERE for this bit of information. You deserve a post of the year or something for putting this here, and I registered here just so I could say that. Thanks!
 
Old 01-11-2007, 12:12 PM   #9
tomtechguy
LQ Newbie
 
Registered: Jan 2007
Distribution: Arch and Slackware
Posts: 10

Rep: Reputation: 0
Thumbs up

Many thanks. Working at a university I have to use my box to rdesktop almost every day. Now I can resolve the names without a Windows machine.
 
Old 11-19-2007, 01:48 AM   #10
JD50
Member
 
Registered: Nov 2007
Location: Virginia
Distribution: Fedora, RHEL, CentOS
Posts: 67

Rep: Reputation: 17
Awesome, great thread!! I've been trying to get this to work for days. Thanks OP!!
 
Old 07-11-2008, 03:00 PM   #11
Soft t
LQ Newbie
 
Registered: Jul 2008
Posts: 3

Rep: Reputation: 0
Thumbs up Netbios setting to wins

Fantastic thankyou for the information i had been looking for days, i can now access my files from XP. I added "wins" to Samba in YasT2 in the Identity box for NetBios Hostname and now i can see the linux server files on my XP machine. Well done!
 
Old 11-26-2008, 11:58 PM   #12
jr_johnstone
LQ Newbie
 
Registered: Nov 2008
Posts: 1

Rep: Reputation: 0
Thank you! I am new to Linux and was at my wit's end trying to figure this out.

I also registered here just so I could say that.

Last edited by jr_johnstone; 11-27-2008 at 12:00 AM.
 
Old 01-11-2009, 04:24 PM   #13
hikerguy
LQ Newbie
 
Registered: Oct 2008
Posts: 20

Rep: Reputation: 1
Kudos.Thanks for sharing this info with the Linux community.
 
Old 05-09-2009, 10:54 AM   #14
jcamez
LQ Newbie
 
Registered: Oct 2006
Location: Guaymas, Sonora, Mexico
Distribution: Slackware Stable
Posts: 23

Rep: Reputation: 1
Thanks OP...
something so easy but so hard to find sometimes...
you made my day...
Thanks so much.

Joel Camez
Guaymas, Mexico.
 
Old 03-23-2010, 01:16 PM   #15
misterJ
LQ Newbie
 
Registered: Feb 2003
Location: California
Posts: 7

Rep: Reputation: 0
order on this line is important!

>> hosts: files dns wins

ORDER ON THIS LINE IS IMPORTANT!

If you do this:
hosts: wins dns files
your system will hang on boot!

(You can guess how I know this!)
 
  


Reply

Tags
fedora, netbios, ping, resolvconf, samba, wins



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
2 nic's = 2 netbios names wanted! pingu Linux - Networking 2 11-11-2005 01:49 AM
NetBIOS names not resolving Xhalman Linux - Networking 0 02-16-2004 02:38 PM
Weird Netbios Names RWild Linux - Networking 4 01-04-2003 10:09 AM
samba NetBIOS names problem dkodegwc Linux - Networking 10 12-10-2002 12:32 AM
cant ping linux netbios with XP g_manO0O0 Linux - Newbie 3 11-28-2002 11:58 AM

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

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