Getting the old Samba beat-down -- Twice!

So, it was another really long day at work today. I spent the vast majority of it bashing my head against a problem that one of our NT SA's was having. Without getting mired in the boring details -- he was trying to image a server using ghost, and dump the resulting Gigs 'n Gigs of data onto one of our Samba servers.

Everything with his boot disk seemed fine, but when ghost got started, it died right away saying "not enough space on device for image headers", or some such crap. I checked to make sure I could create a file on the shared drive, and that the drive had plenty of space (check and check).

So, I thought that maybe it was a problem with some sort of file size limit, or something. I set out to find a copy of dd for DOS (so that I could run dd if=/dev/zero of=some_large_file.junk bs=1024 count=1048576). Basically, I wanted to see if I could write out a gig+ file in one crack. Of course, I couldn't find anything that ran in plain old DOS.

So, I set out to write a batch file that did much the same thing.

Much remembering, cursing, fighting, and debugging later, I finally had a script that reasonably approached what I wanted. I took it down to the server room, mentally preparing myself for a long wait as the computer wrote zero's to my test file. However, I was surprised when my batch file started printing an "out of disk space" error right after I started it. How big of a file did it write before the disk space errors started?

2,857 bytes.

Yes, that is it. A little more than 2Kb. Cripes. Did the shared volume have well over 2Kb free? Oh hell yes it did.

To make a long story even longer, after much debugging of boot disks, samba (even debug level 10 was now help), and voodoo later, I still don't know what's wrong. I came up with a work-around for NT guy (solution: use an NT box as the server), but I still don't know what's up with Samba.

Fast forward to this evening/morning, after all of the cards (and there were a lot of cards played) have finished. Kevin and I took on round 2 of his mission to be able to get at his code from the VPN. The sysadmins where he works have wisely configured the Samba server that he needs to disallow IP addresses associated with the VPN. Why? Because they want Kevin to learn about SSH tunneling and such so that he'll devise a work-around.

We beat up on windows enough that I got to the point where I was tunneling NetBIOS-in-TCP/IP-in-SSH in my test environment. But, once again -- I noticed some more strange Samba behavior. When I tried to connect through the tunnel, anything that allows a connection from guest works, but shares that require my username/password don't work! Argh!

I give up. Somehow, I just know that this is all Microsoft's fault...

-Andy.