• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 358
  • Last Modified:

DHCP, WINS, Samba and no DNS: A tricky combination

At least it's tricky for me...

The system I'm using is Lunix Red Hat 6.1 for i386
Samba version 2.0.5a-12 (the version number in the RPM file name)

I have to use DHCP and I want to connect Samba to a WINS-server (I don't want Samba to be the WINS-server). It looked like it was working OK in the beginning, but after a while I realized that Samba had registered my computer in the WINS-server with the IP-address this is no
good. I got a tip from a friend of mine who said that I should use the 'interface =' option in the smb.conf file. But in order to do that I have to type in my IP-address... I can't do that because I'm using DHCP.

It seems to me that Samba is doing a DNS lookup in order to get the IP-address, because when I remove the name of my computer from the hosts file (the name is an alias for, Samba can't find the IP-address.

My soultion to this problem is currently to first boot up the computer, then check the IP, type in the IP and the computer name in the /etc/hosts file and after that start Samba.
It works, but.....

I really hope someone out there got a better solution...

1 Solution
Thats the only solution there is. Samba assumes a static ip. Best you can do is write a script that modifies your config file automatically. AND also know that samba needs to be able to find the IP / Name mapping in /etc/hosts or DNS aswell.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now