7.5. Sharing Resources and FilesThere's little point in setting up a network with multiple computers if you don't take advantage of the connection by sharing files and printers. Once you've established a network connection with another Windows computer and verified that the connection is working, you can set up resources to be shared over your network. A shared resource is a folder on your hard disk, a printer physically attached to your computer, or some other device that you would like to share with other computers on your network. If you share a printer, others on your network can print to it; if you share a folder, others on your network can access the files and folders contained therein as though they were stored on their own hard disks. Whenever you share a resource, you are opening a backdoor to your computer. It's important to keep security in mind at all times, especially if you're connected to the Internet. Otherwise, you may be unwittingly exposing your personal data to intruders looking for anything they can use and abuse. Furthermore, an insecure system is more vulnerable to viruses and other malicious programs. To start sharing resources, you first need to enable sharing on your PC. Open the Network and Sharing Center (Figure 7-33) by choosing Control Panel Set up file sharing, or Control Panel [Network and Internet] Network and Sharing Center. Figure 7-33. The first step to sharing resourcesconfiguring the Network and Sharing Center properlySet up sharing in the Sharing and Discovery section. Here are your options:
7.5.1. Sharing Public FoldersThe Public folder, by default, contains these subfolders:
The subfolders are empty. Simply place any folders or files in the appropriate folders, or make new folders and put them there. They'll now be available to anyone with network access. At any point, you can change access rights to those folders by going to the Network and Internet control panel. 7.5.2. Sharing Other FoldersTo share a folder not in the Public folder, right-click it, select Share, and choose the appropriate options from the screen that appears, as shown in Figure 7-34. Figure 7-34. Using the File Sharing dialog to share a folder and set its access privilegesYou'll see accounts and account groups listed, and next to each account, its permission level. Here are the choices, and what each means:
Configure each account and account group. The Everyone group, as the name implies, covers everyone who connects to your PC, except for other users you specifically configure on this screen. Permissions are inherited, which means if you configure the permissions for a folder, those permissions will be active for all subfolders and their contents. However, you can set rather liberal permissions for, say, a drive, and then selectively restrict access for the more sensitive folders contained therein. If you want to add new accounts or groups to let them access your shared folders, click the down arrow in the input box next to the Add button, choose from the list that appears, and click Add. Choose "Create a new user" and follow the prompts if you want to create a new user account for accessing your folders. When you're done, click the Share button, and the folder will be shared with the permissions you specified. You'll see the notification shown in Figure 7-35, which shows you the shared name and location of the folder. Figure 7-35. The notification showing you the folder's shared name and locationNote that if you've turned on password-protected sharing, only people who have a user account and password on your PC will be able to access the shared folder. This means that you need to make sure that your user accounts are in order before others on your network are able to access your shared resources. With password-protected sharing, every user who wants to access data on your computer remotely (that is, through the network connection) must have a user account on your computer. For example, if you're logged in as "Lenny," you'll be able to access resources only on other computers that also have an account called "Lenny" and that have the same password configured for that account. If you have two Windows Vista machines, one with a "Lenny" account and one with a "Lenny" and a "Karl" account, a user logged in as "Karl" will be able to access resources only on the second machine. Of course, if you turn off password-protected sharing, anyone on the network will be able to access data from your PC remotely.
Once a folder has been shared, and assuming the user accounts are set up properly, you can access the folder from another computer via the Network and Sharing Center, in particular from the Network Map (click "View full map" from the Network and Sharing Center), as shown in Figure 7-36. Figure 7-36. The Network Map, which shows you all the devices on your network and gives you access to themClick any computer on the network, and you'll see all the folders and devices it shares, as you can see in Figure 7-37. This shows several shared folders on the computer called VISTA-DESKTOP. Note that several of the folders have small circular icons beneath them. That means that those are offline folders that synchronize between two PCs. For details, see "Sync Center," later in this chapter. Figure 7-37. Connecting to another PC on the network and seeing its shared folders and devicesNote that you don't have to go through the Network and Sharing Center in order to connect to other shared folders on your network. You can also open Windows Explorer and click Network in the Folders area, and you'll see a list of all PCs connected to your network, as you can see in Figure 7-38. Open them to browse to their shared folders. Figure 7-38. Viewing other PCs on the network via Windows Explorer
The full path to a network resource (called a UNC path, for Universal Naming Convention) looks a little different from a standard path. For example, the path to a shared folder called Budget2007, located on a computer called Barney, will look like this: \\Barney\Budget2007 7.5.3. Sharing PrintersPrinters are shared in much the same way that folders are. First, on the computer to which the printer is attached, go to the Network and Sharing Center and turn on Printer sharing. Then go to the PC on which you want to use that shared printer and choose Control Panel Hardware and Sound Add a printer, and follow the wizard for adding a printer. For details, see "Add Printer," in Chapter 9. 7.5.4. Mapping DrivesDon't like to use multiple clicks to connect to a shared folder or networked PCs? You can instead have folders or PCs show up in Windows Explorer as drives. They'll appear in the Network Locations area, as well as in the Folders area, as you can see in Figure 7-39. Connect to them as you would any other folder. Figure 7-39. Several mapped network drivesTo map a drive, click Map Network Drive on the Windows Explorer toolbar. The Map Network Drive dialog appears. Click Browse and then double-click the Network icon that appears. A list of the PCs on your network appears. (See Figure 7-40.) Choose the PC or folder on a PC that you want to map, click OK, and from the Map Network Drive dialog, select the drive letter. Click Finish. If you want to automatically reconnect to the network drives whenever you log on, keep the box checked next to "Reconnect at logon." Figure 7-40. Mapping a network drive
|