password that you have on the Samba server. After confirming your new
username and password, or if you already have one, Windows should ask
you if you want to have a profile, using the dialog shown in Figure 3.4
.
Figure 3.4: Windows Networking profiles
Answer Yes, upon which Windows will create a separate profile and
password file for you and save a copy of your password in the file. Now
when you connect to Samba, Windows will send its password, which will be
used to authenticate you for each share. We won't worry about profiles for
the moment; we'll cover them in Chapter 6, Users, Security, and Domains .
We should point out, however, that there is a small security risk: someone
can steal the password file and decrypt the passwords because it's weakly
encrypted. Unfortunately, there isn't a solution to this with Windows 95/98.
In Windows 2000 (NT 5.0), the password encryption should be replaced
with a much better algorithm.
3.1.2 Setting Up the Network
The next thing we need to do is make sure we have the TCP/IP networking
protocol set up correctly. To do this, double-click on the Network icon in the
Control Panel. You should see the network configuration dialog box, as
shown in Figure 3.5
.
Figure 3.5: The Windows 95/98 Network panel
Microsoft networking works by binding specific protocols, such as IPX or
TCP/IP, to a specific hardware device, such as an Ethernet card or a dialup
connection. By routing a protocol through a hardware device, the machine
can act as a client or server for a particular type of network. For Samba, we
are interested in binding the TCP/IP protocol through a networking device,
making the machine a client for Microsoft networks. Thus, when the dialog
box appears, you should see at least the Client for Microsoft Networks
component installed on the machine, and hopefully a networking device
(preferably an Ethernet card) bound to the TCP/IP protocol. If there is only
one networking hardware device, you'll see the TCP/IP protocol listed below
that device. If it appears similar to Figure 3.5
, the protocol is bound to the
device.
You may also see "File and printer sharing for Microsoft Networks," which
is useful. In addition, you might see NetBEUI or Novell Networking, which
are standard with Windows installations but undesirable when TCP/IP is
running. Remove NetBEUI if you possibly can - it's unnecessary and makes
debugging Windows browsing difficult. If you don't have any Novell servers
on your network, you can remove Novell (IPX/SPX) as well.
3.1.2.1 Adding TCP/IP
If you don't see TCP/IP listed at all, you'll need to install the protocol. If you
already have TCP/IP, skip this section, and continue with the section Section
3.1.3, Setting Your Name and Workgroup ," later in this chapter.
Installing TCP/IP isn't difficult since Microsoft distributes its own version of
TCP/IP for free on their installation CD-ROM. You can add the protocol by
clicking on the Add button below the component window. Indicate that you
wish to add a specific protocol by selecting Protocol and clicking Add on
the following dialog box, which should look similar to Figure 3.6
.
Figure 3.6: Selecting a protocol to install
After that, select the protocol TCP/IP from manufacturer Microsoft, as
shown in Figure 3.7
, then click OK. After doing so, you will be returned to
the network dialog. Click OK there to close the dialog box, upon which
Windows will install the necessary components from disk and reboot the
machine.
Figure 3.7: Selecting a protocol to install
3.1.2.2 Configuring TCP/IP
If you have more than one networking device (for example, both an Ethernet
card and a dialup networking modem), each appropriate hardware device
should be "linked" to the TCP/IP protocol with an arrow, as shown in Figure
3.8. Select the TCP/IP protocol linked to the networking device that will be
accessing the Samba network. When it is highlighted, click the Properties
button.
Figure 3.8: Selecting the correct TCP/IP protocol
After doing so, the TCP/IP Properties panel for that device is displayed, as
shown in Figure 3.9
.
Figure 3.9: STCP/IP Properties panel
There are seven tabs near the top of this panel, and you will need to
configure four of them:
• IP address
• DNS configuration
• WINS configuration
• Bindings
3.1.2.3 IP Address tab
The IP Address tab is shown in Figure 3.9
. Press the "Specify an IP address"
radio button and enter the client's address and subnet mask in the space
provided. You or your network manager should have selected an address for
the machine. The values should place the computer on the same subnet as
the Samba server. For example, if the server's address is 192.168.236.86,
and its network mask 255.255.255.0, you might use address 192.168.236.10
(if it is available) for the Windows 98 computer, along with the same
netmask as the server. If you already use DHCP on your network to provide
IP addresses to Windows machines, select the "Obtain an IP address
automatically" button.
3.1.2.4 DNS Configuration tab
Domain Name Service (DNS) is responsible for translating Internet
computer names such as hobbes.example.com into machine-readable IP
addresses such as 192.168.236.10. There are two ways to accomplish this on
a Windows 98 machine: you can specify a server to do the translation for
you or you can keep a local list of name/address pairs to refer to.
Networks that are connected to the Internet typically use a server, since the
hosts files required would otherwise be huge. For an unconnected LAN, the
list of possible hosts is small and well-known and might be kept on a Unix
machine in the /etc/hosts file. If you are in doubt as to whether a DNS server
is being used, or what its address might be, look at the file /etc/resolv.conf
on your Unix servers. Any machine using DNS will have this file, which
looks like:
#resolv.conf
domain example.com
nameserver 127.0.0.1
nameserver 192.168.236.20
In the example shown, the second nameserver line in the list contains the
IP address of another machine on the local network: 192.168.236.20. It's a
good candidate for a DNS server.[ 1
]
[1] We can disqualify the other address because every Unix machine has a
localhost address of 127.0.0.1 whether it is connected to a network or not.
This address is required for some system tools to operate correctly.
You must type the correct IP address of one or more DNS servers (note that
you cannot use its Internet name, such as dns.oreilly.com) into the
appropriate field in Figure 3.10
. Be sure not to use 127.0.0.1 - that will never
be the correct DNS server address!
Try to select addresses on your own network. Any name servers listed in
/etc/resolv.conf should work, but you'll get better performance by using a
server nearby. (If you don't find /etc/resolv.conf files on your Unix
machines, just disable DNS until you can find the address of at least one
DNS server.) Let's assume you only have one DNS server, and its address is
192.168.236.20. Click the Enable DNS radio button, as shown in Figure
3.10, and add the server's address to the top DNS Server Search Order field.
Figure 3.10: The DNS Configuration tab
Also, provide the name of the Windows 95/98 machine and the Internet
domain you're in. You can safely ignore the Domain Suffix Search Order
field for anything related to Samba.
3.1.2.5 WINS Configuration tab
WINS is the Windows Internet Name Service, its version of a NetBIOS
name server. If you've enabled WINS on Samba, you must tell Windows the
Samba server's address. If you are using WINS servers that are entirely
Windows NT, enter each of them here as well. The dialog box shown after
selecting the WINS Configuration tab is shown in Figure 3.11
.
Figure 3.11: The WINS Configuration tab
WARNING: Do not mix a Samba WINS server and a Windows NT server
as a primary/backup combination in the WINS dialog. Because the two
cannot replicate their databases, this will cause name resolution to perform
incorrectly.
From here, select Enable WINS Resolution and enter the WINS server's
address in the space provided, then press Add. Do not enter anything in the
Scope ID field.
3.1.2.6 Hosts files
If you do not have either DNS or WINS, and you don't wish to use broadcast
resolution, you'll need to provide a table of IP addresses and hostnames, in
the standard Unix /etc/hosts format. On a Windows machine, this goes in
\WINDOWS\HOSTS under whichever drive you installed Windows on
(typically C:\). A sample host file follows:
# 127.0.0.1 localhost
192.168.236.1 escrime.example.com escrime
192.168.236.2 riposte.example.com riposte
192.168.236.3 wizzin.example.com wizzin
192.168.236.4 touche.example.com touche
192.168.236.10 hobbes.example.com hobbes
Không có nhận xét nào:
Đăng nhận xét