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...

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.