Monday, January 7, 2008

File Server

Samba is the open source version of the SMB protocol that is used by Windows for file sharing. It is also supported by Mac and so is the best choice for a mixed network. A discussion of setting up Samba in Debian can be found in the following episodes of Linux Reality.

The key to making Samba work with Windows is to have common usernames and passwords for Windows, Linux and Samba. This is described in detail in Linux Reality episode 26.

Create a Windows user with username "bob" and password "tom"
Create a Linux user using Yast with username "bob and password "tom"
Create a Samba user as follows
To add a Samba user called "bob"
# smbpasswd -a bob
You will then be prompted for a password. Enter "tom" twice.

Access a Samba share from Linux
Linux Reality Episode 25
Access a Linux Samba share from Windows
Linux Reality Episode 26
CUPS print server and Samba file server
Linux Reality Episode 59

The next step is to create a share on the Linux server.

When I switched to openSUSE (see the RAID chapter) things became much simpler because of YAST. In the Samba configuration GUI in I changed the workgroup to HOME, which is the name of my windows workgroup, then added a share called "files", accepting all of the defaults.

Then from the windows machine I mapped a new network drive and browsed to "files". It connected and works great.

The one glitch I had was when I first created the share, I called it "documents". Then when I tried to copy files to it from windows I got an error message saying it was read only. I have a shared folder on my windows machine with the same name, so that may be the problem or it could be something else.

No comments: