Industry


Ads by TechWords

See your link here


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.

What People Are Saying

OSX headaches

Does this work as simply with mac clients browsing to SAMBA CIFS shares? Rumor has it that one must turn off password encryption to make it work. Trying this, about a month ago, I gave up after a weekend of digging for a fix.

Doesn't work for me.

I've set-up ubuntu hardy on three computers lately, my Dad's desktop, my brother's laptop, and my dektop. I've been unable to browse windows shares on any of them. I've installed samba and followed many tutorials/articles/forum posts claiming to have the answer yet none of them have worked for me on any of the three computers. I can get windows to see ubuntu shares very easily. I can see and click on the workgroup, I can actually see and click on the workgroup computers, but it sits there with a wait cursor for about a minute then brings up nothing. No access to the shares. Anyone else run into this problem or know how to get it to work?
Thanks

Re: Doesn't work for me

Since you can see out from your Windows computer but not see in from your Ubuntu boxes, I'm just guessing here but I'm assuming you're running WinXP? (As that's the typical, infamous one-way behavior of the integral WinXP firewall.) If this is the case, did you check your firewall settings?

network woes

Lots of things can go wrong with networking. Some quick things to check are: Are the firewalls set up to allow share access? Do the users have permission to access the shares in question?

Steven

Steven J. Vaughan-Nichols sjvn@vna1.com
QOTD: "A cynic is a man who, when he smells flowers, looks around for a coffin."--H. L. Mencken

Did you setup the workgroup

Did you setup the workgroup in your samba config to match all the other PCs?

The title should have

The title should have "ubuntu" and not just "Linux" in it since ubuntu is not the only distro out there.

Linux is appropriate

Since every distro is the kernel with a bundle added, this is possible with just about any Linux flavor out there. I've done the same thing with Xandros and Linspire. I can't imagine a distro not including Samba. Either way Samba is readily available.