|______________| |_______| |_____________|
        host         share        tail

I can find plenty of resources on the tail component of a UNC path, and I assume the host component follows DNS rules on case sensitivity, but what about the share name?

When you connect to just a host without specifying a share name the implementation you're connecting to can send you the correct case of the share. When you connect directly to a share how would case be handled?

I could only see a single line in the Samba manual stating "Section and parameter names are not case sensitive" which doesn't really say either way (section names are used to create shares but connection to that share could be handled differently). I can't see mention of case in Windows Shared Folders help.

Does this mean that share names are de facto case insensitive, and no one has ever thought to make it explicit, or can someone point me toward documentation?


According to Microsoft's SMB2 specification:

The server MUST parse the Buffer field as specified in [MS-DTYP] section 2.2.49 to extract the hostname and sharename components. If the Buffer field is not in the format specified in section 2.2.9, the server MUST fail the request with STATUS_INVALID_PARAMETER. Otherwise, the server MUST provide the tuple <hostname, sharename> parsed from the request message to invoke the event specified in [MS-SRVS] section, to normalize the hostname by resolving server aliases and evaluating share scope. The server MUST use <normalized hostname, sharename> to look up the Share in ShareList. If no share with a matching share name and server name is found, the server MUST fail the request with STATUS_BAD_NETWORK_NAME.

So there is no normalisation of the share name, and I can find nothing which states a compliant implementation has to perform the matching case insensitively.

I am ideally looking for either some documentation or an answer from someone who's tested this on several implementations other than just Windows and Samba discussing their findings.


SMB share names are not case sensitive. You can confirm this by trying to create two shares with the same name and different case. The system will not allow this.

  • On which implementations? Sep 14 '16 at 12:25
  • On any implementation that wants to be compatible with the known universe.
    – Greg Askew
    Sep 14 '16 at 12:29
  • Your answer sounds like you're actually referring to a specific implementation; probably Windows. If you do what you've described in Samba it is actually quite legal: the configuration blocks are concatenated and the last definition wins for repeated options, but the share remains the case of the first section defined. I suppose I have posted on Server Fault rather than Stack Overflow, but I was really discussing what the protocol states. Obviously experience of an implementation is relevant and appreciated as I have witnessed what you have it seems. Sep 14 '16 at 12:48
  • Just because some guy created his own implementation of a private protocol and made share names case sensitive has no implications for a standard, de facto or otherwise. 99.999% of all SMB implementations and consumers are Windows, and the reasonable expectation would be case-insensitive. The only reason to make it case-sensitive is to be incompatible/don't like people in general.
    – Greg Askew
    Sep 14 '16 at 13:16
  • "some guy created his own implementation of a private protocol and made share names case sensitive" -- 1) I did not say that, 2) he has not done that, 3) SMB2 protocol is clearly not private anymore, 4) there are many more implementations than just Samba. Please don't mistake what I'm saying to be argumentative, I am just stating facts as I've observed them. "the reasonable expectation would be case-insensitive" -- what is reasonable in one situation might not be in another, hence why protocols are documented. I'm searching for clarity regarding the protocol. Sep 14 '16 at 14:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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