Ctrl-M characters embedded in Windows text file sent to Solaris running Samba

I have Samba 3.02 installed on a Solaris 9 server. Windows users can access the Solaris shares fine. The problem we are having is that when text files are created on the Solaris shares using some application (Synergy as an example), Ctrl-M characters are embedded in the created text file.
It's obviously a dos2unix conversion issue but is there an option or setting in Samba to force the dos2unix conversion?

any help would be appreciated.
Who is Participating?
bpeterseConnect With a Mentor Commented:
Look at your settings in the application that creates the text files on the share - not Samba.  I think that's where the ^M chars are coming from.
omarfaridConnect With a Mentor Commented:

Can you afford to run dos2unix or similar tool to get rid of the ^M?

Otherwise, you need to change the application to not write eol/CR to the files
TintinConnect With a Mentor Commented:
There's no way for samba to reliably detect which files it would need to convert, so the conversion is left to the user/app.
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

lehanAuthor Commented:
It's a code build process by our developers - after the build files are created on the Samba share from Synergy client on Windows, they need to be zipped up on UNIX and then sent to clients. The ^M characters then appear in the zipped files.

So it would be great if Samba can automate the dos2unix conversion prior to the zip. however, the more I research this, the more it appears that Samba cannot do it.

Any other ideas? thanks for the reply so far...
You could write the dos2unix conversion into your custom code - should be a very easy thing to accomplish.
lehanAuthor Commented:
That's what we are looking into. I did also check the settings on the application (Synergy) but nothing jumps out as the fix. So I will probably raise a ticket with their support - they maybe able to offer a solution.

Feel free to offer any other ideas. I will wait for another day or so then distribute the points if i get no new answers. thanks guys.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.