Linux to Windows and back again with Samba

I see my buddy in technology writing, Preston Gralla, is having trouble getting his new Wubi-based Ubuntu 8.04 system to work with his Windows file systems and vice-versa. While some Linuxes, like Xandros and SLED (SUSE Linux Enterprise Desktop) come Windows network ready, most, like Ubuntu, require some Samba work.

Samba is an open-source program that provides file and print services to SMB (Server Message Block) and CIFS (Common Internet File System) clients and servers. What that means in English is that a Samba-equipped Linux system can both use and provide file and printer services for all three basic kinds of Windows LANs: P2P (peer-to-peer), NT Domain, and AD (Active Directory).

Of course to do any of that you have to have Samba installed in the first place. In Ubuntu, like any Linux, you can install and setup Samba with command-line tools. Most documentation assumes you're going to use Linux shell commands and manually edit configuration files, but you don't need to bother with all that. You can set up basic Windows file and print sharing with Samba in Linux as easily in Windows. Actually, more easily since, Vista, for example, by default fails with Samba-powered NAS (Network Attached Storage) devices. You can fix that problem, by the way, by following my notes on how to get Vista to work and play with Samba and NAS hardware.

Gralla has a simple P2P network of, I presume, Vista and XP systems, so we don't have to worry about any advanced networking. So, let's move on to installing Samba with Ubuntu's GUI tools. I prefer Synaptic to install software on Ubuntu, and other Debian-based Linux distributions, but let's not even bother with that. Just click on Applications and pick Add/Remove.

Then, set the software installation program to look at all available software and then do a search for Samba, once you've found it, install it. If you want to get a little fancier, you can also install the oddly named GSAMBAD for more advanced Samba control.

Sticking to the basics the next thing you'll need to do is go to System > Administration > Network to get to the Network Settings window. Windows users can think of this in terms of using the Control Panel to get to the Network Connections icon and you'll be close enough for computer work.

Once here, unlock it so you can make changes. Next, fill in your hostname, which is almost certainly already filled with whatever it was you named your PC, and your domain name. In the case of home Windows P2P networks that's almost certainly going to be either "mshome" or "workgroup."

All done? OK, now click on place and follow that up with clicking on "Network." One of your choices should be a "Windows network" icon. Pop it open and you should see your workgroup. Open that up and there will be icons for all your PCs that are sharing files. Double-click the PC icon and there are your shared directories. If you're like me you can then drag the directory to your desktop and -- ta-da --instant icon for your shared drive.

The easy way to share files from your Ubuntu PC is to head over to the Places file menu. Once there, right click on the directory icon, it doesn't work by right clicking on the directory entry on the left. When the pop up menu shows up, select "Sharing Options." For Windows P2P, give the folder an appropriate name, enable people to write to the directory, and you might as well enable guest users to access it as well.

Now, none of this has any security to speak of, but that's part and parcel of Windows P2P file sharing. It's like the old saying: "You can two out of the three. You can have it quick, cheap, or good." In this case, your choices of two out of three are: quick, secure, or good. With Windows P2P, you're picking quick and good. Security doesn't even begin to come into it.

That said, this should provide Gralla, and you, with basic Windows/Ubuntu file sharing. Enjoy yourselves.

Next time around, I'll take a look at getting Gralla's Lexmark printer to work and Samba printer sharing basics.

Copyright © 2008 IDG Communications, Inc.

7 inconvenient truths about the hybrid work trend
Shop Tech Products at Amazon