Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have set a shared directory on my Windows machine, and given full control permissions to username@workgroup.

When I try to connect to the Windows machine with Linux using smbclient, I get the error NT_STATUS_DUPLICATE_NAME. Here is the transcript:

$ smbclient -U username -W workgroup -L //windows-machine
Enter username's password: 
Domain=[workgroup] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
tree connect failed: NT_STATUS_DUPLICATE_NAME

If I intentionally enter the wrong username, password or workgroup, I get a different error: NT_STATUS_LOGON_FAILURE. So it seems like I'm getting the other information right.

I put an entry in /etc/hosts that points windows-machine to its IP address. The NetBIOS name of the windows machine is something different.

Does anyone know what this error means?

share|improve this question

3 Answers 3

up vote 4 down vote accepted

The NetBIOS name of the windows machine is something different

That's your problem. It's easily fixed by a registry hack on the Windows machine. See http://support.microsoft.com/kb/281308 for the details.

JR

share|improve this answer
1  
I wonder why this isn't just fixed in a patch. –  Neil Jun 2 '09 at 18:36
    
It's not a bug, it's deliberately designed that way. Possibly for security, though I'm not sure why precisely. I suppose it stops you accidentally connecting to the wrong server if you have rogue entries in the hosts file or duff DNS. Personally I put the registry hack on all of my servers. –  John Rennie Jun 3 '09 at 7:18

You can't use either the name of the machine in /etc/hosts, nor probably the name from the DNS server.

You must use either the machine's IP address or the NetBIOS name of the machine specified in Windows.

To find the NetBIOS name in Windows XP:

  1. Right click on "My Computer"
  2. Click "Properties"
  3. Click the "Computer Name" tab
  4. Read the "Full computer name" field up to the first period '.'
share|improve this answer

You're probably getting that error because the Windows machine doesn't understand itself to be identified as what you're connecting to it as. (Using a wrong auth information changes the error because this issue doesn't crop up until later in the connection process.)

Try connecting to it as its IP number, not windows-machine. If that works, it confirms that the name thing is what's going on, and you can resolve it either by making the PDC understand itself to be windows-machine or by just using the IP number.

share|improve this answer

Your Answer

 
discard

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.