Question on short/mangled file name.

Hemanth Thummala hemanth.thummala at gmail.com
Wed Oct 1 19:35:21 MDT 2014


On Wed, Oct 1, 2014 at 5:02 PM, Jeremy Allison <jra at samba.org> wrote:

> On Wed, Oct 01, 2014 at 04:33:12PM -0700, Hemanth Thummala wrote:
> > Hi folks,
> >
> > I could see the short file name generated by Samba(3.6.12) is different
> > from windows.
> >
> > For example, a folder named "This is large folder". Samba generates the
> > short name something like TYP843~9 where as windows gives as THISIS~1.
> >
> > I found that smb.conf parameter(mangle prefix) which controls the prefix
> > characters. I have changed that to 6. Even after that samba generate the
> > name as THIS_I~K. I did not see any param to control the postfix.
> Mangling
> > method is set to default one (hash2).
> >
> > Would like to know the reason for choosing different name generation
> > compared to windows. Not sure if some of the old windows versions are
> > generating this way. I am comparing with windows 2k8 server version. Also
> > would like to know if this is been addressed in samba 4.X. We are
> currently
> > running 3.6.12 stack.
>
> All short name generation algorithms can lead to collisions.
> The hash2 Samba one generates less collisions that the Windows
> one.
>
> So I think here we agree that we use different short name generation
algorithm than windows.


> > This incompatibility of short names is actually affecting windows
> client's
> > behavior.
>
> How :-). This you're gonna have to *prove* :-).
>
> Remember, a client only caches short names from
> the server it connected to. The only way this
> could cause an issue is if you replaced a Windows
> server with a Samba one giving the same name and
> IP address so the client thought it was talking
> to the same box.
>
> That isn't a supported configuration here. Call
> the server something else.
>
> I guess I did not explain the things clearly here. Actually I am comparing
the short file names for the same test folder created on two different
servers. One is Samba server and another one is windows. I have identified
that samba has generating different short name compared to windows.

Regarding client behavior, one of our customer reported an issue saying
software installation in his client workstation is failing with error
"Error 1325: 'Favorites' is not a valid short name". He is getting this
error when he sets the registry settings for Favorites as our server home
directory path (ex: \\server\share\testusername\favorites). This error is
not seen when he sets the path as  \\server\share\<samba generated short
name for "test user">\<samba generated short name for "favorites">. Based
on this I assume that client would have expected short name in window
style. When its specified explicitly, its started working fine. If we have
generated short name in windows style, client would have not thrown this
error. I agree that I assumed few things here. But would like to understand
why our short file names are not in windows style.

Thanks,
Hemanth.

Jeremy.
>


More information about the samba-technical mailing list