Chapter 4: File Sharing between Windows and Linux

Overview

Both Windows and Linux have a "native" way of sharing files over a network. In this chapter we'll first explore those native ways. Then we'll show how to access files served by a Windows system from a Linux client and vice versa. Of course, some combinations work better than others, so along the way we'll suggest what we feel the best options are in each scenario.

As you'll see in this chapter, NFS (Network File System) is the traditional file-sharing solution on Linux. NFS is still in heavy use and is probably the best option in a pure Linux environment. Making Windows clients talk to Linux NFS servers is also possible, and we'll demonstrate that. However, since Samba can offer up Windows-compatible shares via Windows SMB (Server-Message-Block), the best Windows-client to Linux-server file sharing solution is Samba.

With that in mind, here is what we want to do:

  • Use Windows to create file shares to store files and

    • Have Windows clients see and open the files

    • Have Linux clients see and open the files

    • Have Windows clients use Windows shares for home directory and roaming profile storage

  • Create Linux file shares using Samba (which look like Windows SMB shares). Account validation will come from Samba and OpenLDAP (appearing to Windows clients as a PDC). Then, we'll

    • Have Windows clients see and open them

    • Have Windows clients use Samba shares for home directory and roaming profile storage

  • Create Linux file shares using Samba but have account validation from Active Directory. In other words, we'll create a domain member file server running on Linux. Then we'll have Windows clients see and open those shares.

  • Leverage NFS mount points on Linux and Windows. Here, we'll

    • Have our Linux clients see and open them, including using them for home directory storage

    • Have our Windows clients open and see them (via a centralized method)

    • Have our Windows clients open and see them (individually from each Windows XP machine)

    • Create a centralized home drive (in Linux, home directory) for users who log on to both Windows and Linux

Of course, we'll get started by introducing the basics: Linux clients talking with Linux servers and Windows clients talking with Windows servers. Setting up Windows SMB shares is a fairly easy task. Having Windows clients talk to them is also, as expected, pretty easy. Let's go through a quick file sharing test.

To create a share on our Windows 2003 server:

  1. Click Start image from book My Computer and select a drive to store the data on. You might only have one drive letter set up (C) so go ahead and double-click that drive if it's the only choice available.

  2. While the C: drive is open, select File image from book New image from book Folder and give the folder the name WinShare1 .

  3. Right-click " WinShare1 " and select "Sharing and Security." The " WinShare1 Properties" window will appear as shown in Figure 4.1.

  4. Click the "Permissions" button and the "Permissions for WinShare1 " window will appear (also shown in Figure 4.1.)

  5. For now, leave the default Windows 2003 permissions on the share (that is, Everyone can read the files contained within the share), so click "OK."

  6. At the " WinShare1 Properties" page, click "OK."

image from book
Figure 4.1: You can set permissions directly on each Windows share.

At this point, WinShare1 is shared. Right now, there's nothing in it. Double-click the WinShare1 directory, then right-click the white space and select New image from book Text Document. Create two documents for later use: winfile1.txt and winfile2.txt . While you're here, you might as well add a sentence or two of text to each file, so you can read it later. We'll leverage these files when we perform our integration testing.



Windows and Linux Integration. Hands-on Solutions for a Mixed Environment
Windows And Linux Integration Hands-on Solutions for a Mixed Environment - 2005 publication.
ISBN: B003JFRFG0
EAN: N/A
Year: 2005
Pages: 71

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net