Super User is a question and answer site for computer enthusiasts and power users. 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 have a samba share on a VM with CentOS inside my company network. For authentication only one user was added, which works fine.

security = user
username map = /etc/samba/smbusers

Furthermore I enabled ntlmv2 support

client ntlmv2 auth = yes

The share config looks like:


comment = Comment string
path = /usr/data/path/to/shared/folder/
read only = no
browseable = yes
inherit acls = yes
guest only = no
force user = forcedUserName

The CentOS image has following configuration in the /etc/sysconfig/network-scripts/ifcfg-eth0 configuration script:


This is because the VM image has to be distributable between different companies, we also did not add the vm's IP to the local DNS server.

My problem is that the name resolution for "hostname" using the UNC name works only on SOME machines inside the network. I just cannot figure out what the differences are between those on which the name resolution works and the once on which it does not. Using the IP address of the vm (\\a.b.c.d\ShareName) also works on all machines. All machines are in the same subnet ( and use the same DHCP server and wins server.

However, on the same vm there is also a DokuWiki installed and name resolution using any browser works fine on all machines inside the office.

So there ought to be a problem with the samba share.

I would need working name resolution on every machine so that it is possible for our office girls e.g. to create shortcuts inside the samba share without using the IP address.

PS: Firewall is not the problem either.

share|improve this question
Did you try adding a record to the DNS and testing it? Depending on how your machine is configured it either tries to resolve the "hostname" using broadcasts or through DNS. Manually adding the record will help narrow down the factors. – surfasb Dec 22 '11 at 20:59
up vote 1 down vote accepted

Finally I was able to figure out the problem, took me a while though. Funny thing is that name resolution wasn't the problem at all. Apologies for the misleading title but symptoms were pretty much misleading as well.

After randomly trying to change possible wrong configured settings, i also tried to map the share on one machine as a network drive. The GUI version gave me the error that the username could not be found, obviously bogus. The "net use ..." command gave me

System error 86 has occurred.

The specified network password is not correct.

what finally lead me to this forum post:

which provides the solution for my problem. The problem was that some machines had NTLM authentication enabled by default and the ones on which it worked from the beginning had NTLMv2 enabled by default. Still weird since using unc names with ip address made no troubles at all.

My conclusion is to never fully trust stuff posted somewhere on the internet ( made me believe that windows 7 always uses NTLMv2 ) and never fully trust windows error messages either, because the information value of them was even worse than if it would have said "I ran out of toilet paper" or something.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .