Connecting to Shares And Common Shares
Now that you have these shares, how do people use them? Assuming that you have a share called Apps on a server called BF1, how would someone attached to the network access that share?
Primarily, you connect to a share using the universal naming convention (UNC)通用命名规则 of \\ServerName\ShareName. Alternatively as a simple example, you can press the Windows key + R from the desktop to open the Run dialog box and enter \\ServerName (using the server name of any server connected to your network) followed by a backslash, as shown in Figure 13.19.
Another way to open the Run dialog box in Server 2012 is to go to the Start screen, type Run, and press Enter. In the fi gure, we’ve used \\BF2\ to connect to the server named BF2.
Once the operating system connects, it retrieves a list of shares that are available. On this server there are currently four shares, well, four shares that aren’t hidden. Chapter 14 will show you how additional hidden shares are available. You could type in Apps to the end of \\BF1\ and complete the entry as \\BF1\Apps, or simply click the Apps share from the menu shown in Figure 13.19 and click OK to connect the Apps share.
Besides using the Search menu, you can connect to the share in the following ways:
Mapping a Drive
You can map a drive letter to a share on your network. For example, users may need access to a share each time they boot. You can right-click either Computer or Network from the Windows Explorer menu and select Map Network Drive. Take a moment to enjoy the new feel of the Server 2012 R2 user interface. With the Windows Explorer page open, select Computer, and then select the Computer option from the top action bar. A new ribbon will be displayed similar to the ones that you are familiar with seeing in programs like Microsoft Word. Many new options are available from the ribbon, including Map a Network Drive. Figure 13.20 shows the Map Network Drive dialog box. With “Reconnect at sign-in” selected, the user will always have the Z drive mapped to the share when they boot.
Searching Active Directory
If a client is a member of a domain, the Search Active Directory command appears on the Network console. You can launch Network by selecting Start ➢ Network on Windows Server 2012 R2.
Using net use You can use the net use command at the command line. The basic syntax is as follows:
net use driveletter \\servername\sharename
For example, to attach to the share Apps on the server named BF1 and then to be able to refer to that share as drive Z, you could use this command:
net use Z: \\BF1\apps
If you later want to remove the mapping, you can use this command:
net use Z: /delete
1、“A Set of Credentials Conflicts”
Sometimes when you’re trying to attach to a share, you’ll get an error message that says something like “A set of credentials conflicts with an existing set of credentials on that share.”
Here’s what’s happening. You’ve already tried to access this share and failed for some reason—perhaps you mistyped a password.
The server that the share is on has constructed some security information about you that says you’re a deadbeat, and it doesn’t want to hear anything else about you. You need to get the server to forget about you so that you can start all over. You can do that with the /d option.
Suppose you’ve already tried to access the \\BF1\Apps share and apparently failed. It might be that you are actually connected to the share but with no permissions. (We know it doesn’t make sense, but it happens.) You can find out what shares you’re connected to by typing just net use all by itself. Chances are, you’ll see that \\BF1\Apps is on the list. You have to disconnect from that BF1 server so that you can start over. To do that, type this:
net use \\BF1\apps /d
Then do another net use to make sure that you have all of those connections cleaned up; you may find that you have multiple attachments to a particular server. Or…in a few cases, you may have to disconnect all of your file shares with this command:
net use * /d
With all the connections closed, you can try net use again, and it will work.
2、“Using net use on a WAN”
3、Common Shares
In Windows Server, several common shares have already been created for you. Most of these shares are hidden. If you know of these shares, you can connect to any of them using the UNC path.
C$, D$, and So On | All drives, including CD-ROM drives, are given a hidden share to the root of the drive. This share is what is called an administrative share. You cannot change the permissions or properties of these shares, other than to configure them for Offline Files (we’ll talk about Offl ine Files at the end of this chapter). Only the Administrators and Backup Operators groups can connect to administrative shares, and you can’t stop sharing these administrative shares without modifying the registry or by stopping the Server service (which stops all sharing). These shares come in handy for server administrators who do a lot of remote management. Mapping a drive to the C$ share is the equivalent of being at C:\ on the server. |
ADMIN$ | The ADMIN$ share is another administrative share and it maps to the location of the operating system. If you installed the operating system at D:\Windows, the ADMIN$ share would map to D:\Windows. |
PRINT$ | Whenever you create a shared printer, the system places the drivers in this share. This allows the drivers to be easily downloaded when clients connect to the shared printer. |
IPC$ | The IPC$ share is probably one of the most widely used shares in interserver communications, though you will rarely interact with it directly. When you try to access shared resources on other computers (to read event logs, for example), the system uses named pipes. A named pipe is a piece of memory that handles a communication channel between two processes, whether local or remote, and the IPC$ is used by the named pipes. |
NETLOGON | The NETLOGON share is used in conjunction with processing logon requests from users. Once users successfully log in, they are given any profile and script information that they are required to run. This script is often a batch fi le. For example, we have a common batch fi le that we want all of our users to run every time they log in. This allows us to have all clients run a standard set of commands, like copying updated network information, mapping standard network drives, and so on. These batch fi les, scripts, and profi les go in the NETLOGON share. The NETLOGON share is required on all domain controllers. |
SYSVOL | The SYSVOL share is used to house Group Policy information and scripts that are accessed by clients on the network. You will always see SYSVOL shares on domain controllers, but they can be replicated to member servers. |