Friday, July 09, 2004

Networking Linux and Windows

Who'da thought it would be so easy??

So, this afternoon I settled in for what I thought would be the biggest struggle of all times. My goal: set up a network between my Linux box and the new XP laptop, so I could access all of the files on the old XP drive on the Linux box. (Eventually I'll probably wipe XP off the desktop system completely and use the laptop as my Windows machine.... I need somewhere to play Ultima Online and poker, right?!)

So, I used the Mandrake GUI package manager to install samba. That went a-ok. But where to go from there? Documentation on the web seems spotty at best, which surprised me considering I would think samba configuration is a big topic. I grabbed my O'Reilly "Running Linux" book, and that helped to fill in the blanks. I also got good mileage from this web site:

My laptop and Linux box both connect wirelessly to a WAP in my basement (where the cable modem comes in). My third computer in the basement (an old Win2000 machine) is connected to the WAP (which has a built-in 4 port switch) via a CAT5 cable.

On Mandrake 10, I found my samba configuration files to be in: /etc/samba
This differed from where the book thought they'd be.

Anyhoo, I edited smb.conf with the basics - making sure to put the right workgroup name in there - and set up some data shares. Be careful to put the right path to each share - typing the wrong path will end up giving you a login error when you try to access the share from your Windows box.

Here's an example of what my shares look like:

comment = /home/Shelly
path = /home/Shelly
public = yes
guest ok = yes
browseable = yes
writeable = yes

After configuring the file, I started up samba with: /usr/sbin/samba start
It also accepts stop and restart as options. I didn't have to worry about making a script to auto-start, as samba is already set to start automatically in my init.d file.

Moment of truth! I fired up the laptop, changed the workgroup name to match what I'd configured in smb.conf, and went to My Network Places. (Why oh why couldn't they just keep the name "Network Neighborhood"?? MNP drives me nuts - I don't know why. Too cheesy sounding, maybe?)

Voila! I saw all of the shares I'd set up, and my printer. I was able to browse them with no problems, and copy/write files to and from them. Woohoo!

Consider me networked :)

No comments: