• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Windows -> Unix file conversion problem

I run Samba on my FreeBSD to enable Windows to browse the network shares on my FreeBSD box. But suddenly Samba or Windows freaked out, when mapping more than one network share to driveletters, Windows XP says:
Multiple connections to a server or shared resource by the same user, using more
than one user name, are not allowed. Disconnect all previous connections to the
server or shared resource and try again..
While just 30 mins ago I had 5 network shares all under the same username running with no problem at all.
Also, when I open up a textfile from a share in Windows, all line-breaks are converted into little white squares. When I open them up in tsWebeditor, it's going nuts and showing only garbage. The other way around, when opening a file made and saved in a Windows app in FreeBSD, I see an extra W before each line break. I have never had this problem, in fact, I even transferred my entire website from Windows to Linux just two weeks ago with no problems at all.

I must say, after some thinking while I am typing, I haven't tested it much since I installed Samba3 (samba-devel in ports) on the BSD box. I know for sure it worked perfectly under at least Samba2.

Of course I did a testparm smb.conf to test it, here's the output:
# Global parameters
workgroup = THUISNET.LAN
server string = Samba Server
interfaces =
smb passwd file = /etc/smbpasswd
log file = /var/log/log.%m
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
load printers = No
os level = 33
preferred master = Yes
dns proxy = No
hosts allow = 192.168.0., 127.

comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No

comment = Glenn's Homedir
path = /usr/home/glenn
valid users = glenn
read only = No

comment = Yara Home
path = /home/yara
valid users = glenn, yara
read only = No

comment = Root website
path = /usr/local/www/data-dist
valid users = glenn
read only = No

comment = Music
path = /usr/local/music
valid users = glenn
read only = No

comment = Downloads
path = /usr/local/downloads
valid users = glenn
read only = No

comment = Pizza Website
path = /usr/home/stelvio
valid users = glenn, stelvio
read only = No
Please help me. I'll do some testing myself too.


Political User
It is the line breaks Glaanie, UNIX only takes \n, most FTP clients remove the \r automatically, but windows over SAMBA that does not happen.

What you need to do is open the UNIX file in Wordpad and all will be just fine, or open it in a program that supports UNIX line terminations.

If you transfer a text file over SAMBA to your FreeBSD box and need to work on it, open it in pico, then close the file again saving it, the extra \r's will be gone, and you can now use it without a problem.


Political User
About your first problem, that is a problem with Windows, it will not let you "mount" shares unless they all use the same username, which IMHO is a stupid limitation, but only a reboot will fix that. Just set them to be persistent and have them reconnect upon bootup, you won't have a problem.
But that's annoying! I have to transfer my entire website with lots and lots of text files, I don't wanna open them seperately in Pico... Why did it work last time? Does Samba2 work differently than Samba3 when it comes to converting line breaks? And shouldn't Samba take care of this? From what I understand Samba is meant as an invisible (to the user) networkshare-shell around Linux, so users shouldn't be bothered with difficult file conversions.
Maybe I should install Samba2 again then <_<
OK, I f*cked up. I uninstalled Samba-devel, so I could install samba2. But now it isn't working at all. When I browse to my server, it's asking for a password. Damn. Back to square one...


Political User
Samba two does not do this either.

Apache does not care about what line break you use. That is why it will work flawlessly, however, unix programs will.

Your thinking of SAMBA is a wrong one, it is supposed to let people using Windows utilize resources (HD space) on a Linux server without a problem, it is not there to remove or edit files as they are passed on to the server.
But if I want to be able to do both, editing files on Windows and Linux, without doing stupid conversions. Maybe a setting in Samba?


Political User
There is no setting in samba. To do that you need to choose either a text editor on both that can handle both, or choose a text editor on Windows that only does \n.


Political User
Glaanieboy said:
But if I want to be able to do both, editing files on Windows and Linux, without doing stupid conversions. Maybe a setting in Samba?
If they made a setting to strip out all the \r's in all documents, that could screw up everything majorly, word documents and whatnot would go screwy.

It just can not be done.


Glaanies script monkey
Political User
X is right, you need to use Wordpad to edit the file, I've editted files directly on my BSD server in windows via samba without problems this way. BTW, samba-devel has been moved to samba3 port since its deemed stable.

Members online

No members online now.

Latest posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
What a long strange trip it's been. =)

Forum statistics

Latest member