Share Linux and Windows Server 2003 Network Resources

zhaozj2021-02-16  68

In corporate information systems, many companies are installed with both Windows operating systems, but also installed the Linux operating system to meet the needs of different applications. The two types of network operating systems are different, and the interfaces are different. Applications are characterized. In actual use, if they can play the respective advantages of both parties, they will work together, which will undoubtedly bring many convenience to network management. This article describes an integrated method for sharing the two resources.

First, interconnection

Linux is a class UNIX operating system. A major feature of such networks is to use TCP / IP as a network transport protocol, so other systems connected to UNIX class systems must also use TCP / IP protocols. There is an optimized TCP / IP protocol stack inside Windows Server 2003 that provides efficient TCP / IP transmission. Therefore, the premise of connecting Linux and Windows Server 2003 is to configure TCP / IP protocols for them.

When configuring the TCP / IP communication protocol, you must specify an IP address and subnet mask for each block of the server. With the same network address and subnet mask as the Linux server, you can make the Windows Server 2003 server and the Linux server in the same subnet, so that the communication is simpler, but if you manage the needs, the two are allocated in different sons. Online, you can connect different subnets through settings with a gateway. Also specify its hostname and the DNS area for Windows Server 2003 and Linux servers.

After the TCP / IP protocol configuration is complete, the specific connection operation can be implemented. The implementation method of connection and visiting function is described below.

The UNIX class system supports the host terminal network and the microcomputer network 2 networking form. Ordinary Windows Server 2003 provides microcomputer networks, you need to use the Windows Terminal Network to use the terminal service of the Windows Server 2003 server. This article does not involve the host terminal network.

In terms of information networks, traditional UNIX uses its network file system NFS to provide file and print services, because NFS appears as early as the Windows series network system, it does not consider the compatibility of the Windows network, so you want to use this system, It should be installed in Windows to make software that makes NFS functions such as PCNFS or DiskAccess, and now there are many third-party companies to provide these software, and the configuration is also varied due to the product.

Microsoft's network products use a Server Message Block, SMB protocol to implement network applications. This is a communication method of request / response. The client's request is taken to the server, and the server is given after the server analyzes SMB. The machine response. The SMB protocol is generally incompatible with the NFS protocol mode. Therefore, when the Windows client is coexisting, the third party must be installed and debugged with the NFS and UNIX to communicate with UNIX. Now, there are many cases, and some of the version of the UNIX class system has begun to include the Windows system-compatible service agreement. Linux is the leader. Linux provides a service called Samba, which interfaces between Microsoft's SMB and Linux systems, using it to easily implement link between Windows and Linux, without having to be Windows Any additional software is installed. This article mainly discusses the connection problem between the Linux system installed with the Samba service and the Windows Server 2003 network.

When installing the Linux server, you can choose whether to install the Samba service. If you select the Samba service, each time Linux is started, the daemon's daemon is automatically run. The Linux administrator can also restart or stop the service through the SMB program under the /etc/rc.d/init.d/ directory. The core of the Samba service consists of two programs of SMBD and NMBD, where SMBD is responsible for scheduling requests from the network accessing the Linux system, and the NMBD is responsible for sending information about Linux servers to the network. Once the Samba service starts, you can view these two daemons using the PS X | GREP MBD command. After the Samba service is running normally, the Linux server will also appear in the Windows Server 2003 Server Manager, which shows the Samba service to make the Windows Server 2003 regard Linux servers running Samba services as a Windows server. In addition, on the Windows Server 2003 computer that is in the same Windows Domain or Working Group with the Linux server, if you use Linux's legitimate user login, open "Online Neighbors" to see this Linux server, if the Linux server is not with Windows Server 2003 computer homologous or in the same group, can also find it in the "online neighbor" "entire network".

To change the Windows Server 2003 domain or working group affiliated to the Linux server, just edit the SMB.conf file under its / etc / directory with Linux's VI editor, and modify the contents of its [Global]. . As shown in Figure 2, Workgroup is a subordinate Windows Server 2003 domain name or workgroup name; Server string is a comment on the L INUX server; Security is a secure authentication mode, where Share is a shared level authentication of the working group, User is domain User-level authentication, Server is authenticated by other authentication servers, and Domain Controller is the computer name of the Windows Server 2003 domain controller.

After Windows Server 2003 is connected to Linux, Linux can also browse to the shared resource of the Windows Server 2003 server. Samba provides the SMBClient command to query network resources, using the -l parameter to list a server sharing list, which is a bit like the Net View command of Windows Server 2003.

Second, use Linux resources

The connection between the two sides can browse each other means that the network service is working properly. At this time, the network sharing resources can be set according to the specific situation. We are familiar with all kinds of sharing methods in the Windows environment. It is no longer repeated here. The shared setting of the Linux Samba service is defined within the SMB.conf file, as long as the SMB.conf file is edited and the content about the shared is added. As shown in Figure 2, a paragraph in the SMB.conf file is specified to share the Linux server / usr / shared directory, and shared named myshared.

Note that every time you modify the SMB.conf file, you must use the SMB program to stop and restart the Samba service, and the new configuration will take effect.

The newly effective sharing will be browsed by Windows Server 2003's "online neighbor". If you define user-level secure authentication in SMB.Conf, you can verify the identity of the user when accessing the Linux server from Windows Server 2003, as shown in Figure 3. Enter the name and password of the LINUX server legitimate user to successfully enter.

Open the Linux server icon through "Online Neighbors", the shared resource provided by the Linux server is unbed. For the use of the shared folder, like the Windows Server 2003 network, you can open the folder or mapping network drive. In the "online neighbor", not only can you see Linux shared directory and you can browse to Linux's shared printer. WINDOWS Server 2003 administrators can connect Linux network printers like using a Windows network printer and install it locally. After installation, you can share it through Windows Server 2003 to use other Windows users in the network.

Linux's printer for Windows Server 2003 network user connections are done by Linux print daemon, which drives specific print devices in response to the network print request and defines the definition of the Print Profile. As shown in Figure 1, in the [Global] segment of the SMB.conf file, the printing parameter specifies the name of the print daemon, and the PrintCap name specifies the path to print the configuration file. The Load Printers parameter determines whether to define the print configuration file online. All printers list.

Linux default print profile is PrintCap in / e t c / directory, which is some parameters that delivers in colon, as shown in Figure 4, where the backslash (/) is a continuation mark, the well number (#) is a comment.

In the printcap file, the name of a printer is defined in each piece (LP in Figure 6): SD parameter defines the printer's spiking print directory, LP definition device file, AF specifies log file, IF set input filter .

After defining the Linux Print Profile, the Linux network printer is specifically set in the [Printers] segment of the SMB.conf file, where Comment describes the applicable range, the browseable explains all printers defined by the PrintCap file, and the public decision is allowed to allow anonymous guests User printing, Printable determines if the user can access the fake offline print directory when it is not printed, Writable defines whether the power of the fake offline print directory is written, the CREATE MODE parameter specifies the permissions of the spool file.

After editing the SMB.conf file and restarting the Samba service, Linux's network sharing directory and printer can be used in the Windows Server 2003 network.

Third, use Windows resources

With Samba services, you can also use the network resources of Windows Server 2003 in the Linux server. The UNIX class system uses the concept of connection point in the device, not the drive concept of the Windows system, so you should map a network shared directory to the local, you should specify a local connection point.

The Samba service has a SMBMount program to connect to the shared folder of the Windows Server 2003 server. In the example of FIG. 5, a shared folder clients in a Windows Server 2003 server NMNZ2003 are mapped to the LINUX local / mnt / ntshared directory.

After the mapping, Linux users enters the connection point to use the files in the Windows Server 2003 server like using this unit. Of course, all operations must be permissions within the Windows Server 2003 permission.

Windows Server 2003 Connection Linux Shared Printer is simple, in turn, Linux system Connect to the Windows Server 2000 server shared printer is slightly complex, you need to edit the modified print profile PrintCap, add a network printer in the print profile. A printer named EPS is defined in the example of Figure 6. After adding a new printer in the print profile, you have to define network locations and connect users, etc., which are saved in the .config text file in the printer's spiking print directory. For example, in the previous example, the .config file in the / var / spool / lpd / eps directory, network information about the printer EPS is shown in Figure 7.

SHARE is a network printer shared name on a Windows Server 2003 server defined using a general name rule. Hostip specifies the IP address of the Windows Server 2003 print server connected to the network printer, and the User and Passwd indicates that the Linux server is connected and printed. This user identity must be the user allowed by Windows Server 2003.

After this definition, you can print a document to the shared printer of the Windows Server 2003 server in Linux. Of course, if the X WINDOW system is installed in the Linux server, the operation of the connection network printer is also as simple as in Windows Server 2003. You can do a simple test after the connection, for example, type the following command:

Lpr -PEPS PrintCap

That is, print the printcap file to the EPS printer. Look at how the effect.

The Linux print job visiting the network is also within the control range of the Windows Server 2003 server, and its print manager can be monitored and managed to manage the remote print, as shown in Figure 8.

When managing a visiting Linux print job, its specific operation method is the same as the print job in the Manage Windows network.

The above introduction to the Internet is completed under the premise of using Samba services. When connecting to other UNIX class systems, if you cannot use Samba, you can use NFS, but you need to have other software cooperation, you also need to install other services, such as TCP / IP printing services.

Through the methods described in this article, it is easy to integrate today's most popular network operating systems, making it a good compatibility, sharing mutual resources, and gives full advantage of their advantages to facilitate users' various application needs.

Ni

转载请注明原文地址:https://www.9cbs.com/read-22716.html

New Post(0)