Re: [Samba] name mangling makes 8.3 unreadable unlike Windows fileserver

2013-10-04 Thread Volker Lendecke
On Fri, Oct 04, 2013 at 08:34:24AM +0200, Klaus Hartnegg wrote:
> On 04.10.2013 01:14, Kevin Field wrote:
> >"The minimum value is 1 and the maximum value is 6.
> >
> >"mangle prefix is effective only when mangling method is hash2."
> >
> >This does exactly what we want!
> 
> Be warned that this will produce duplicate filenames.
> Windows prevents duplicates, Samba does not.

True. The main difference is that Windows stores the short
name on disk, Samba just fakes them on the fly. In theory,
we could store the short names in an xattr, but this would
be really, really expensive. And as applications that really
depend on short names are rare these days, I'm not sure if
it would be worth the effort and speed penalty anymore.

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-37-0, fax: +49-551-37-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kont...@sernet.de

*
visit us on it-sa:IT security exhibitions in Nürnberg, Germany
October 8th - 10th 2013, hall 12, booth 333
free tickets available via code 270691 on: www.it-sa.de/gutschein
**
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] name mangling makes 8.3 unreadable unlike Windows fileserver

2013-10-03 Thread Klaus Hartnegg

On 04.10.2013 01:14, Kevin Field wrote:

"The minimum value is 1 and the maximum value is 6.

"mangle prefix is effective only when mangling method is hash2."

This does exactly what we want!


Be warned that this will produce duplicate filenames.
Windows prevents duplicates, Samba does not.

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] name mangling makes 8.3 unreadable unlike Windows fileserver

2013-10-03 Thread Jeremy Allison
On Thu, Oct 03, 2013 at 07:14:35PM -0400, Kevin Field wrote:
> >
> 
> Thanks Jeremy!  I'm not sure how I missed that in the docs.  Anyway,
> it is much, much better than before, but still not exactly like
> Windows. For example, we have two folders beginning with C-FZP.

We're never going to give the same mangled names as
Windows, as our mangling algorithms are different.
We don't depend on having full access to all directory
entries when we create them.

> Instead of C-FZPD~1 and C-FZPP~1, which in our context is exactly
> enough to tell which one we want, it's a bit (or in this case...a
> byte) more aggressive in hashing and makes it C-FZP~59 and C-FZP~A5,
> so that we can no longer tell and have to guess.
> 
> Oh but wait, now I see:
> 
> "The minimum value is 1 and the maximum value is 6.
> 
> "mangle prefix is effective only when mangling method is hash2."
> 
> This does exactly what we want!  And now I also see how I think I
> missed it: this parameter isn't in the "NAME MANGLING" section.

Well, glad you got it working anyway :-).

Jeremy.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] name mangling makes 8.3 unreadable unlike Windows fileserver

2013-10-03 Thread Kevin Field



On 2013-10-03 2:38 PM, Jeremy Allison wrote:

On Thu, Oct 03, 2013 at 10:17:18AM -0400, Kevin Field wrote:

Hi,

I'm cross-posting here from serverfault.com in case anyone can help.
I just found a similar question on askubuntu.com also without an
answer.

Switched recently from W2K3 to Samba4.0.9/CentOS6.4 for our
fileshare for WinXP clients.

Have an ancient (1995!) piece of software that uses 8.3 filename
format. After the switch, long filenames became useless in the
context of the File->Open dialog box. Instead of the first few
characters, we get maybe 1 character the same if we're lucky, which
in a directory of thousands makes it impossible to find. For
example, instead of "S:\Air conditioning control system" becoming
"S:\AIRCON~1" like it would before, it's displayed in this program
as "S:\A51FHG~S".

In our directory of client identifiers with their contact names
appended, formerly directory mangling would leave enough characters
intact that client identifiers could still be used. Not anymore.

None of the settings in the docs seem to talk about this exact
problem. In fact, they seem to show it the way we were used to. Our
smb.conf doesn't use any of the settings because the defaults seem
to be what we want, according to the docs. Any hints?


This is the mangling method that changed to hash2 (gives
better protection against duplicates).

Use the smb.conf parameter "mangling method = hash"
to change it back to the way it used to be.

Jeremy.



Thanks Jeremy!  I'm not sure how I missed that in the docs.  Anyway, it 
is much, much better than before, but still not exactly like Windows. 
For example, we have two folders beginning with C-FZP.  Instead of 
C-FZPD~1 and C-FZPP~1, which in our context is exactly enough to tell 
which one we want, it's a bit (or in this case...a byte) more aggressive 
in hashing and makes it C-FZP~59 and C-FZP~A5, so that we can no longer 
tell and have to guess.


Oh but wait, now I see:

"The minimum value is 1 and the maximum value is 6.

"mangle prefix is effective only when mangling method is hash2."

This does exactly what we want!  And now I also see how I think I missed 
it: this parameter isn't in the "NAME MANGLING" section.


Thanks!
Kev
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] name mangling makes 8.3 unreadable unlike Windows fileserver

2013-10-03 Thread Jeremy Allison
On Thu, Oct 03, 2013 at 10:17:18AM -0400, Kevin Field wrote:
> Hi,
> 
> I'm cross-posting here from serverfault.com in case anyone can help.
> I just found a similar question on askubuntu.com also without an
> answer.
> 
> Switched recently from W2K3 to Samba4.0.9/CentOS6.4 for our
> fileshare for WinXP clients.
> 
> Have an ancient (1995!) piece of software that uses 8.3 filename
> format. After the switch, long filenames became useless in the
> context of the File->Open dialog box. Instead of the first few
> characters, we get maybe 1 character the same if we're lucky, which
> in a directory of thousands makes it impossible to find. For
> example, instead of "S:\Air conditioning control system" becoming
> "S:\AIRCON~1" like it would before, it's displayed in this program
> as "S:\A51FHG~S".
> 
> In our directory of client identifiers with their contact names
> appended, formerly directory mangling would leave enough characters
> intact that client identifiers could still be used. Not anymore.
> 
> None of the settings in the docs seem to talk about this exact
> problem. In fact, they seem to show it the way we were used to. Our
> smb.conf doesn't use any of the settings because the defaults seem
> to be what we want, according to the docs. Any hints?

This is the mangling method that changed to hash2 (gives
better protection against duplicates).

Use the smb.conf parameter "mangling method = hash"
to change it back to the way it used to be.

Jeremy.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] name mangling makes 8.3 unreadable unlike Windows fileserver

2013-10-03 Thread Klaus Hartnegg

On 03.10.2013 16:17, Kevin Field wrote:

Have an ancient (1995!) piece of software that uses 8.3 filename format.
After the switch, long filenames became useless in the context of the
File->Open dialog box. Instead of the first few characters, we get maybe
1 character the same if we're lucky, which in a directory of thousands
makes it impossible to find. For example, instead of "S:\Air
conditioning control system" becoming "S:\AIRCON~1" like it would
before, it's displayed in this program as "S:\A51FHG~S".


In Samba3 this could be changed by increasing the value "mangle prefix".
This works only if mangling method is changed to hash2.

I don't know how one can lookup if this still works in samba 4.
Most documentation seems to be completely unaware that samba 4 is out.

But beware that I got duplicate filenames after changing this value.
Windows prevents duplicates, Samba does not.

hope this helps,
Klaus

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

[Samba] name mangling makes 8.3 unreadable unlike Windows fileserver

2013-10-03 Thread Kevin Field

Hi,

I'm cross-posting here from serverfault.com in case anyone can help.  I 
just found a similar question on askubuntu.com also without an answer.


Switched recently from W2K3 to Samba4.0.9/CentOS6.4 for our fileshare 
for WinXP clients.


Have an ancient (1995!) piece of software that uses 8.3 filename format. 
After the switch, long filenames became useless in the context of the 
File->Open dialog box. Instead of the first few characters, we get maybe 
1 character the same if we're lucky, which in a directory of thousands 
makes it impossible to find. For example, instead of "S:\Air 
conditioning control system" becoming "S:\AIRCON~1" like it would 
before, it's displayed in this program as "S:\A51FHG~S".


In our directory of client identifiers with their contact names 
appended, formerly directory mangling would leave enough characters 
intact that client identifiers could still be used. Not anymore.


None of the settings in the docs seem to talk about this exact problem. 
In fact, they seem to show it the way we were used to. Our smb.conf 
doesn't use any of the settings because the defaults seem to be what we 
want, according to the docs. Any hints?


(If you want to answer on serverfault feel free: 
http://serverfault.com/questions/543320/samba-name-mangling-too-mangled-to-be-practical 
)


Thanks for any help,
Kev
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba