Sharing Files and Applications Across UNIX and Windows Machines


Ways are available for accessing Windows files and applications from within the UNIX operating environment, or for accessing UNIX files from within the Windows environment. One such way is to use a TCP/IP utility such as ftp to transfer files from one machine to the other. A second way is to use a Windows-based application that is an enhancement of ftp to perform a file transfer from one machine to the other. A third way is to treat a remote UNIX file system as though it were local to your Windows PC network, via a product such as Samba. A fourth way is to set up a virtual network among different machine environments using Virtual Network Computing (VNC). This section discusses each of these methods.

Accessing Your UNIX Files from a Windows Machine

Many computing environments include machines running Windows and UNIX together. When you work with both, you may need to transfer files from a Windows system to a UNIX system or from a UNIX system to a Windows system. You may also want to log in to a UNIX system from your Windows PC to access files using terminal emulation, which was discussed previously Or you may want to share files on Windows machines and UNIX machines. This section describes some capabilities that provide Windows-to-UNIX System networking.

Transferring Files from Windows to UNIX Using ftp

One of the primary reasons for connecting your Windows PC to a UNIX machine is to transfer files between the two. You can send files from your Windows PC to your UNIX machine, and vice versa, by using one of the commercially available packages such as WS_FTP on your Windows machine (see Figure 18–2). WS_FTP is a software package interface to the Windows TCP/IP service, called WinSock (for Windows Sockets), that allows you to use a Windows interface to perform FTP operations from one machine to the other. You simply locate the source file on one machine, move to the appropriate directory in which you want to place the file on the other machine, select whether you want the transfer to be binary (as for program files) or ASCII (text files), and select an arrow showing in which direction the transfer is desired. WS_FTP Pro supports long filenames for Windows. You can get WS_FTP or WS_FTP Pro directly from the vendor, Ipswitch, Inc., via the web at http://www.ipswitch.com/.

image from book
Figure 18–2: A sample WS_FTP session

Another way that a Windows machine can share files with a UNIX System computer is via a simple local area network connection. Using such a configuration, the Windows machine can be a client of the UNIX system, which acts as a server. This allows Windows to share files with UNIX systems using facilities such as ftp. The ftp command is discussed in detail in Chapter 9.

A third way exists to share files between Windows machines and UNIX machines across a network. Both Windows and UNIX allow you to share files using the Network File System (NFS). This concept is discussed in more detail in Chapters 15 and 17. One useful feature of NFS is that you can set up the system to allow a machine that is acting as a file or print server for a client machine to become a client itself, accessing resources on another server. This resource pooling concept makes NFS a powerful file sharing environment. NFS implementations for use on a Windows machine can share files with a UNIX machine, and versions that run on UNIX machines can share files with Windows machines. The implementations for both UNIX and Windows machines are generically called PC/NFS.

Using Samba to Share and Print Files on Different Operating Systems

If you are a Windows user on a network that is constantly connected to a particular UNIX machine, you may need to access or print files that are on the UNIX machine to use in your local applications on your Windows machine. Rather than learn how the UNIX file system works in order to locate and manipulate files, you may want to use an application that allows you to access the files and manipulate them as a Windows user normally does, and have them look just like Windows files to you. The same is true for UNIX users that need to access and print files on a Windows machine.

Samba is an open-source software suite that is available on the web at http://www.samba.org/ through the GNU public license. Mirror sites are available worldwide for both the documentation and the software downloads. Samba was originally developed by Andrew Tridgell but has become a joint project of the Open Source team for Samba. The name Samba is derived from the functionality of the software. The protocol used is the equivalent of what Microsoft refers to as the NetBIOS protocol (also called the Common Internet File System, or CIFS, protocol). This protocol on UNIX is referred to as the Server Message Block (SMB) protocol, hence the name Samba.

One of the things this protocol allows is to mount UNIX file systems so that they appear to be DOS files to a user of a Windows system, or vice versa. A UNIX user can mount a file system on a UNIX machine that is connected to a Windows PC so that it looks like a network drive when a Windows user displays drives under Explorer. For example, you can mount a file system that is called winfiles on a UNIX machine and make it appear as though it is connected as a Windows directory available on the Windows L: drive, appearing as whatever you define it on your Windows machine, say L:\win.

Whenever you perform any file activity on the Windows machine in the directory L:\win, such as creating, modifying, or deleting files, you are actually using the Samba software to perform the activity on the UNIX file called winfiles. The advantage to doing this is that a Windows user does not need to know anything about the file system structure of UNIX to actually manipulate files and directories on a UNIX machine; everything appears as though the environment is Windows. If you are a UNIX user, the same concept is true from the UNIX perspective. Files that are accessed from the Windows machine appear as UNIX files to you.

This approach is different from mounting the remote files via NFS (the Network File System), which is discussed in Chapters 15 and 17. Although the two are functionally equivalent, the NFS approach requires the installation of something called the NFS client, in order to be able to access the files on the UNIX server. On the other hand, NFS is more robust, in that you can have multiple client/server relationships in the same network (for instance, a client can be a server, and vice versa). Which one you use depends on how many Windows clients are on your network. If there are many Windows clients and few UNIX servers, you may prefer the Samba approach. If the opposite is the case, you may prefer to use NFS to share files. We discuss this issue in more detail in Chapters 15 and 17.

Samba also enables UNIX users to print files on printers connected to Windows-based print servers, and Windows users to print files on printers connected to UNIX-based print servers. While each operating system has its own rules about how to configure printers-for instance, UNIX uses the smb.conf file to configure Samba printers-you can perform essentially the same types of print requests from the other operating system’s print server once Samba is correctly configured.

Using UNIX Servers in Windows Networks

In Chapter 15, we discuss the concept of clients and servers. In particular we discuss how Windows clients can access UNIX servers to obtain services without knowing that the server is actually a UNIX machine. Here are some examples of how this can be accomplished.

UNIX Servers Acting as Windows Servers

Another way to access DOS files from a UNIX environment is offered by Sun Microsystems. Sun has a platform called PC NetLink (currently version 2.0) that allows a Sun server to sit on a Windows network and perform the functions of a Windows server (NT/2000/XP). Putting the UNIX machine in the network allows users of Windows clients to get file and print services, as well as authentication services, from the UNIX server as though it were a Windows server.

UNIX Servers Providing Transparent Services to Windows Clients

The Apache Web server (see Chapter 16) is an example of a UNIX server environment that provides complete web server functionality to Windows clients. While Microsoft has its own web server called IIS (Internet Information Services), many hybrid-network administrators choose to use the Apache Web server due to its functionality, security, portability (it runs on all versions of Windows as well as UNIX variants), and cost (Apache is free).

A Windows user requesting web services from an Apache server does not see anything different than when using IIS. This is because the user sees only the browser interface (e.g., Mozilla or Internet Explorer). Browsers and the Internet in general are discussed in more detail in Chapter 10.

Virtual Network Computing (VNC)

Virtual Network Computing was originally developed at AT&T. It consists of remote control software that allows you to view (using a program called the viewer) and interact with another computer (called the server) anywhere on the Internet. The two computers can be running different operating systems; for example, you can use VNC to view a Linux machine in your office on your Windows home computer. One of the key features of VNC is the capability to assume control of the remote networked computer as though it were your local machine. This is made possible by a technique called the RFB (Remote Frame Buffer) protocol, which transmits inputs across the network and transmits the resulting screen back to the initiating computer.

VNC has a wide range of applications, including system administration, IT support, and help desks. It allows several connections to the same desktop and can be used for collaborative (shared) work in the office environment. It also has applications in electronic classrooms. VNC is freely and publicly available. You can find more about it at either http://www.vnc.com/ or http://www.realvnc.com/.




UNIX. The Complete Reference
UNIX: The Complete Reference, Second Edition (Complete Reference Series)
ISBN: 0072263369
EAN: 2147483647
Year: 2006
Pages: 316

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