Server Fault is a question and answer site for system and network administrators. 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

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?

share|improve this question
up vote 3 down vote accepted

If you only look at the section NAME MANGLING, you'll miss these handy parameters:

# sets it to the old Samba 2 way of doing things, closer to what you're used to with Windows
mangling method = hash

or, in our case, we wanted the first 6 characters to be seen, so we ended up going with:

# only with hash2 method, but lets you set the number of chars to preserve (1-6)
mangle prefix = 6
share|improve this answer

Your Answer


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.