[Samba] Share working with IP not with hostname

Carlos R. Pena Evertsz carlosrpevertsz at gmail.com
Wed Sep 12 13:43:47 MDT 2012

This is the trick for successfully access the share with the hostname..

Be sure you have the following lines in the smb.conf:

netbios name = yourhostname
wins support = yes

The following line in this order.

name resolve order = wins lmhosts hosts bcast

Add the following line:

hosts allow = the host ip / mask

Where the host ip is your server ip.
              the mask is the mask you are using in all your windows 

This is the most important thing. For example If you have in your server 
the mask then all your clients must have the same network 
mask. Windows clients with the same mask of the server will see the 
server on the network with it hostname otherwise you need to access the 
server by its ip number.

I hope this can help you.

Santo Domingo, Dominican Republic

On 9/12/2012 10:37 AM, Gaiseric Vandal wrote:
> On 09/10/12 13:52, Nitin Thakur wrote:
>> hi guys
>> I managed to setup the share. I am able to access the share with IP 
>> address, but as soon as I try to do it via hostname, I get a user 
>> name and password pop up, which always fail to authenticate. Any 
>> setting I am missing?
>> Thanks
>> nitin
> What version of Samba?
> My guess is there is some sort of name lookup mismatch.    Are you 
> using a domain or workgroup?  Are you using WINS?  Are you using 
> DNS?    If the samba server is the WINS server you should be able to 
> "cat wins.dat" and "tdbdump wins.tbd" to verify that the names are the 
> same.   In smb.conf, does the samba server netbios name match the DNS 
> name?
> What is the client OS?
> The only other thing that might be happening is that the client and 
> server are mismatching on using NTLM vs NTLM v2.  The samba logs 
> should show that.   I could NOT get NTLMv2 to work on my samba servers 
> I had to explicitly disable it in smb.conf.

More information about the samba mailing list