Control characters with Samba/NT4.0

Benjamin Scott bscott at
Tue Jun 22 17:45:46 GMT 1999

On Tue, 22 Jun 1999, Carlos De Sousa wrote:
> When we copy an ascii file from SunSolaris Samba server to NT4.0
> workstation, the file is getting control characters at the end of each
> line. Appreciate, if any clue given to solve this problem.

  No end of problems come from the fact that UNIX derivatives (Solaris)
represent end-of-line differently then DOS derivatives (WinNT).  UNIX uses a
single character, ASCII 10.  DOS uses a sequence of two characters: ASCII 13
followed by ASCII 10.  You will sometimes see these referred to as LF (line
feed) for ASCII 10 and CR (carriage return) for ASCII 13.

  A file created with one operating system will usually not be interpreted
correctly by the other, without some sort of conversion process taking place
first.  I suspect that is what you are seeing.

  I believe Samba V2.0 has an option to do end-of-line translation on files
automatically (based on the file's name and extension).  See "man smb.conf"
for details.  (Samba V1.9 does not.)  Be aware that such automatic translation
can wreak havoc if accidentally applied to a binary file.

  Some programs which deal with text files are smart enough to recognize the
foreign end-of-line representation and handle it.  Others include an option
to do so.  You can also find small utility programs that will convert between
different formats.  They often take names like "todos" or "unix2dos" or such.

  Hope this helps!

Benjamin Scott <bscott at>          Phone: (603)431-7315
Hampton Systems Group, Inc.                     Fax  : (603)431-0822                       DSN  : 852-3581

More information about the samba mailing list