LinuxQuestions.org
Register a domain and help support LQ
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, 09:02 PM   #1
HadroLepton
LQ Newbie
 
Registered: Mar 2004
Location: germany
Posts: 14

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 01:00 AM.
 
Old 05-20-2006, 01: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, 08:28 PM   #3
swerdna
Member
 
Registered: Jun 2006
Location: Oz
Distribution: openSUSE 10.x
Posts: 80

Rep: Reputation: 15
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, 01: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, 02: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, 10:35 AM   #6
essdeeay
Member
 
Registered: Aug 2004
Location: United Kingdom
Distribution: Gentoo, FC5
Posts: 87

Rep: Reputation: 15
Thumbs up

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

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, 11: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, 01: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, 02: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, 04: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-27-2008, 12:58 AM   #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 01:00 AM.
 
Old 01-11-2009, 05:24 PM   #13
hikerguy
LQ Newbie
 
Registered: Oct 2008
Posts: 18

Rep: Reputation: 0
Kudos.Thanks for sharing this info with the Linux community.
 
Old 05-09-2009, 11:54 AM   #14
jcamez
LQ Newbie
 
Registered: Oct 2006
Location: Guaymas, Sonora, Mexico
Distribution: Home: Slackware 12.2, Slackware current.
Posts: 16

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, 02: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


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


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