Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using LAMP on Ubuntu server, and I need to query MSSQL database on Windows XP machine, both on the same network. I use winbind to resolve SMB hostnames. My problem is name resolution order. It first tries to resolve using primary DNS, then secondary, and finaly resolves to the XP machine. The problem is when internet connection fails primary and secondary DNS servers are not available, so it resolves using winbind after primary and secondary DNS time out (and database connecton). How do I move winbind to the top of the stack?

share|improve this question
up vote 2 down vote accepted

You should be able to do this through the /etc/nsswitch.conf file. Make sure that wins is listed before your other name services

hosts:    wins file dns ... 
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.