Combining Linux and Windows

Because peer-to-peer networks provide a way to connect a few computers together on "the cheap," we should also take a look at how Linux can fit into a Windows peer network. Linux is becoming an inexpensive alternative to other desktop operating systems (and also in the network operating system arena). This is particularly due to the fact that a number of Linux distributions can actually be downloaded from the Internet for free.

Linux-based computers can be made a part of a Windows workgroup by configuring an add-on program on the Linux computers called Samba . Samba derives its name from SMB or Server Message Block. SMB is an important part of the NetBIOS protocol and supplies the data blocks that make requests between client and server or between peers on a Microsoft network.

Samba is able to simulate the operation of SMB and also provide NetBIOS over IP (TCP/IP being the protocol stack for Linux), which means that a Linux computer can actually pretend to be a Windows client. This means the Linux machine can share folders and printers or access folders and printers in the workgroup.

Many distributions of Linux provide Samba on the installation CDs. In some cases you will have to make sure that Samba is installed as an option when you install the Linux OS. As already mentioned, Samba is installed by default and will actually be up and running on a computer using Lycoris Desktop. Samba can be further configured using a Samba client utility. Other Samba settings can be configured by editing Samba configuration text files. While the prospect of editing configuration files might be a little scary, there are other options for configuring Samba. For example, there is a tool called SWAT (Samba Web Administration Tool) , which allows you to configure Samba from any Web browser. Let's take a quick look at how Samba is configured on a Linux computer, with the understanding that this is certainly not an exhaustive treatise on Linux or Samba.

Note

graphics/nman.gif

Samba is actually made up of a suite of programs. For example, smbd is the Samba daemon that handles the SMB services. Another program, nmbd, handles the NetBIOS name issues.


Note

graphics/nman.gif

Linux, an open source Unix-like operating system, is available in a number of different distributions such as Red Hat, Lycoris, SuSE, and Mandrake. While Linux has long been considered the operating system of geeks and hackers, a number of the distributions offer a very Windows-like environment that provides a pretty intuitive graphical user interface. Lycoris, which we discuss in this chapter, actually preconfigures a number of the features that allow you to connect to the Internet and Windows computers in a workgroup. If you want to experiment with Linux, check out www.linuxiso.org. It provides a place to download Linux distributions and burn your own installation CDs. To actually receive customer support and hard copy manuals, you may wish to actually purchase one of the Linux distributions. Most Linux distributions, including my favorites, Lycoris and Red Hat, are actually quite inexpensive when you compare them to other mainstream operating systems.


Configuring and Using Samba

Samba actually consists of two parts: a client and a server. Both of these parts must be configured so that the computer running Linux can both access and serve up shared resources in the Windows workgroup. Configuring the Samba client is very straightforward in most Linux distributions. Lycoris Desktop actually provides a very straightforward way of accessing the Samba client settings. Right-click on the Network Browser icon on the Lycoris desktop and select Configure Network Settings. The Windows Shares dialog box opens as shown in Figure 6.12.

Figure 6.12. The Samba client is most often configured using a desktop utility such as the Lycoris Windows Shares dialog box.

graphics/06fig12.gif

The server side of Samba must also be configured so that you can provide shared resources to other computers in the workgroup. The main Samba configuration file is named smb.conf. This file can be accessed using any file access or search tool provided by your Linux distribution. This file can also be located using the command line if you are familiar with the various commands required to operate at the Linux command line. Figure 6.13 shows the Konqueror window on the Lycoris desktop. It provides a search tool that was used to locate the smb.conf file.

Figure 6.13. You must locate and configure the smb.conf file.

graphics/06fig13.jpg

The smb.conf file can be opened in a text editor. There are several sections to the smb.conf file, as shown in Figure 6.14. Most of the settings are straightforward and can be edited intuitively. You must provide a Workgroup name and the name of the server in the Global settings area of the smb.conf file. Other areas of the configuration include the homes area, where you set the home directory for users; the netlogon area of the configuration file, which determines whether or not you will allow guest logons ; and a printers section where you specify print parameters related to shared printers.

Figure 6.14. The smb.conf file can be configured in a text editor.

graphics/06fig14.gif

Manually configuring the smb.conf file can be tricky, so if you are new to Linux, you will probably want to use a Samba configuration tool that makes the entire process a little more intuitive. We discuss SWAT in the next section.

Note

graphics/nman.gif

Some Linux distributions may not include Samba. You might also have to download and install the most recent version of Samba from the Internet. You can do this from your computer running Linux. Information related to Samba and links for downloading the recent release of Samba can be found at http://www.samba.org.


Using SWAT

An alternative to manually configuring the Samba configuration file is to use an add-on program to configure Samba. One of the easiest to use Samba configuration tools is SWAT. SWAT is included with some Linux distributions, or you can download it from one of the Linux software repositories on the Web (if you use Lycoris or Red Hat, the distributions have their own Web sites, lycoris.com and redhat.com respectively, that provide you with the ability to easily add software components to your Linux operating system. These services are typically reserved for those who have purchased a copy of the OS, however).

Note

graphics/nman.gif

You can see from Figure 6.12 that Lycoris has gone to great pains to provide a desktop environment that would be familiar to users of Microsoft Windows.


SWAT is also available from a number of Linux software repositories. Checkout www.linux.org and www.linux.com as starting places to locate LINUX add-on software such as SWAT.

Once SWAT is installed on the Linux computer (in some cases some configuration files on the Linux box may have to be customized for SWAT to work; again consult Web resources related to SWAT or consult Sams Teach Yourself Samba in 24 Hours ), you can access the Samba configuration file by invoking SWAT in any Web browser.

In the Web browser address window type http://localhost:901/ and press Enter. The number 901 is actually a port number that allows a TCP connection between SWAT and your Web browser (the port number and the IP address provide the socket used as the communication avenue between TCP and HTTP on the Web browser). Figure 6.15 shows the Samba SWAT program running in the Mozilla Web browser.

Figure 6.15. The SWAT program allows you to configure Samba from a Web browser.

graphics/06fig15.jpg

Once SWAT is up and running, you need to configure Samba so that it allows the Linux computer to communicate in the Windows workgroup. This is accomplished using the Samba Globals settings, which is reached by clicking Globals in the browser window.

The two most important settings in the Globals configuration are the name of the workgroup that the computer will belong to and how Windows peers trying to access shares on the Linux box will be validated . Figure 6.16 shows the Globals configuration settings that need to be addressed, such as the workgroup name and the NetBIOS name for the Linux computer.

Figure 6.16. Samba must be configured with the Windows workgroup name.

graphics/06fig16.jpg

Linux actually has a lot more robust security than most of the flavors of Windows (except for perhaps Windows 2000 and Windows XP). This means that you need some sort of mechanism that will dilute the security so that Windows clients in the workgroup can easily access shares on the Linux computer without having to provide a username and a password each time they try to connect (the whole point of peer-to-peer networking is to try to keep things as simple as possible).

Samba weakens the Linux security by allowing you to set up a guest account. The guest account is automatically mapped to when one of the Windows peers in the workgroup attempts to access a shared folder on the Linux computer but doesn't provide an appropriate password (because there hasn't been a user account established for the Windows user on the Linux machine). Figure 6.17 shows the Samba screen where the security settings for connections and the guest account is specified (in this case nobody, meaning anyone trying to connect will be considered a guest).

Figure 6.17. Windows users accessing resources on the Linux box are automatically mapped to a guest account.

graphics/06fig17.jpg

Shares are also created using SWAT. Directories on the Linux computer are mapped to a share name. This is done using the Shares screen (accessed by clicking Shares in the Web browser window). The Shares screen also allows you to set security options related to a particular share by specifying that the share is read or write. Access to specific hosts in the workgroup can also be allowed or denied using this screen.

Once Samba is completely configured using the SWAT interface (SWAT provides easy access to help files for configuring SAMBA) and the smbd and nmbd services are started using the Status screen of the SWAT utility, the Linux computer is ready to participate in the Windows workgroup. In the next section we look at accessing workgroup resources from Windows and Linux computers.

Note

graphics/nman.gif

All the aspects of using and configuring Samba would fill an entire book; in fact it has. For a detailed looking at configuring and using Samba check out Sams Teach Yourself Samba in 24 Hours by Gerald Carter.


Note

graphics/nman.gif

If you are logged on to the Linux computer as a "regular" user you will have to supply the "root" username and the root password to access SWAT. The root password is required when you configure the various services in Linux.




Absolute Beginner's Guide to Networking
Absolute Beginners Guide to Networking (4th Edition)
ISBN: 0789729113
EAN: 2147483647
Year: 2002
Pages: 188
Authors: Joe Habraken

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