mBerube.net
A journey to .Net

Access machine by hostname between Linux and Windows without DNS server

Wednesday, 23 June 2010 12:39 by mBerube
(Also available in: français)

During setup of my Dev server, I found that I was able to access my Linux server by IP but not by name. The same thing was true from Linux to Windows. After a couple searches on the net, I realized that my network wasn't using a DNS server. It means that the name solution was made by another mecanism. In my case, my machine names are resolved using Netbios. So, how to make it works on Linux (specifically Ubuntu but it's pretty much the same for the other distrib I guest) :

  • Install samba (sudo apt-get install samba)
  • Once install, edit /etc/samba/smb.conf and, in the global settings section, set the workgroup and netbios name values to the proper values for your machine.

Your now able to access your Linux box by name from Windows. Now, how to do the other way (from Linux to Windows) :

  • edit /etc/nsswitch.conf and change the line hosts: file dns by hosts: file wins dns (order matters)
  • Finally, install winbind (sudo apt-get install winbind)

After that everything works as expected, from Windows and Linux. I hope it will works for you as well.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   Programmer life
Actions:   E-mail | del.icio.us | Permalink | Comments (10) | Comment RSSRss comment feed

Comments

15 March 2011 16:17

katie

Cool information and facts! I have been seeking for anything such as this for a time currently. Thank you!

katie Jordan

22 March 2011 12:31

Janet

Your place is valueble for me. Thanks!�

Janet Germany

14 May 2011 08:37

黑莓手机

黑莓基地(blackberry),莓友们的福音,来黑莓基地,可以找到你需要的黑莓信息。关于黑莓手机的评测、报价、教程、软件、主题等

黑莓手机 People's Republic of China

07 September 2011 15:39

Vince Lybarger

Nicole Scherzinger has explained that she's seriously happy that she replaced Cheryl Cole on the X-Factor USA. She claims she is actually 'better served' as a judge instead of as a host.

Vince Lybarger United States

05 October 2011 12:45

英文外链

新版本URL外链收割机收割思路
1、根据别人的某个站,找他的外链发布地址,找出它是在哪里发的外链;
或根据URL和页面的特征,找针对性页,比如blogengine类型BLOG的评论页,留言本,论坛帖子页等;
2、去分析这些收割来的地址,
(1)看看是否dofollow(2)是否是可以发布的页(3)出链数多少以及(4)谷歌是否收录(5)页面的pr值;
3、这些已经是可以用的外链发布页了,再拿这些页去找,都有哪些站在这里发过外链 (其实又找到了很多 所谓的别人的站 就又可以进行第一步开始的循环)
最终就是找到大量的可以发布外链的地址!

英文外链 People's Republic of China

05 October 2011 12:45

尼龙扎带

温州尼龙扎带,温州防水电缆接头,温州防水接线盒厂,扎带固定座报价

尼龙扎带 People's Republic of China

05 October 2011 12:45

尼龙扎带

尼龙扎带首选乐清市创新机械有限公司,专业尼龙扎带厂家,产品规格齐全,品质优异。

尼龙扎带 People's Republic of China

30 November 2011 02:06

Dunia Digital

nice info you got here mate.. keep the nice blogging..

Dunia Digital Paraguay

04 February 2012 08:11

Paco

Hola,

Muy bueno el post, guay

Paco

07 February 2012 10:00

Maris Lacusky

I really like your site and I just heard a really cool band called ANTENNA, they are awesome. You should check them out. Keep up the good work with your site.

Maris Lacusky United States

Add comment




  Country flag

biuquote
Click to change captcha
  • Comment
  • Preview
Loading