Disable creation of ._files (dot underscore files) and .DS_Store files on SMB mounts

Macs do have an annoying feature of creating ._files whenever writing to a (remote) file system that does not support the Mac’s extended attributes. They also create .DS_Store files everywhere. This can drive you crazy after a while (like me right now). To prevent Macs from doing this on SMB mounts, add the following to your server‘s /etc/samba/smb.conf:

veto files = /._*/.DS_Store/

in every share section (the share names are enclosed in square brackets [share] ).

After the change, restart the Samba server! This solution works for directly editing files on the SMB mount with TextMate, but not for copying files in the Finder – it says, file names are too long, contain special characters… so you better create two shres, a [share} and a [shareveto]. Sorry for this.

There should also be a solution on the Mac itself, but I couldn’t get this to work – more on this at http://support.apple.com/kb/HT1629