14.Windows and Linux file sharing

Source: Internet
Author: User

Windows vs. Linux file sharing

Experimental requirements:

1. Use the WINSCP tool to implement file sharing between Windows and virtual machines.

2. Use the Samba service to implement file sharing between Windows and virtual machines.

Laboratory Equipment:

Software:

1. A VMware virtual machine with RHEL6 installed.

2. WINSCP tool.

Hardware:

1.PC Machine one set.

Background knowledge:

1. WinSCP:

WinSCP is an open-source graphical SFTP client that uses SSH in a Windows environment. The SCP protocol is also supported. Its main function is to copy files securely between local and remote computers.

2. The concept of samba:

Samba is an implementation of the SMB (Server Message Block) protocol, which is primarily used to implement file and print services for Linux systems. Linux users can share resources with Windows users by configuring them to use the Samba server. There are two services that make up Samba, one is SMB and the other is NMB. SMB is the core of Samba boot services, only the SMB service can be started to achieve file sharing, and the NMB service is responsible for parsing, similar to the DNS implementation of the function, NMB can put the Linux system shared workgroup name and its IP corresponding. If the NMB service does not start, it can only access the shared file over IP.

Experimental steps:

WinSCP Server usage

1. According to the experimental requirements, Windows through the network to log on to Linux for file sharing, so according to the knowledge of the 13th lesson, configure the Windows and Linux network environment, using bridging mode to connect to the network, and then ensure that Windows can ping Linux, while shutting down Linux with Windows Firewall.

2. In the relevant software \winscp514 find the WinSCP software to be used in the experiment. Run the application "WinSCP"; Configured as shown in 3-137.

Figure 3-137

WinSCP Configuration Interface

3. When the WinSCP first landing, the following window will pop up, select "Yes", as shown in 3-133;

Figure 3-138

WinSCP Login

4. Login success, 3-139, the left and right sides represent the Windows and Linux directory, WINSCP can achieve a different file directory between Windows and Linux copy, like a copy between different Windows folders, you can directly drag files.

Figure 3-139

WinSCP operator Interface

Samba Server Use

5. Install the Samba server; "Mount/dev/cdrom/mnt" uses the command to mount the Linux CD to/mnt

Directory, locate the Samba installation package in the/mnt/packages directory, and use the "RPM–IVH

samba-3.5.10-125.el6.i686.rpm "Install the Samba server.

Figure 3-140

Samba Server Installation

6. Add the Samba service user win; First use the command "Useradd win" to add the win user and set the win password, and then set the Samba service user win password; 3-141, as shown in

Figure 3-141

The addition of Samba users

7. Configure Samba services;

Using the VIM editor to open the configuration file, "vim/etc/samba/smb.conf"

Figure 3-142

/etc/samba/smb.conf File Modification

Hint: Share definitions under each parameter and use method:

8. Restart the Samba service, using the command "/ETC/INIT.D/SMB restart", as shown in 3-143;

Figure 3-143

Restart Samba Services

9. Log in to the Samba server in Windows, open IE Browser (or Windows Explorer), enter in the Address bar: \\192.168.1.138 (192.168.1.138 is the IP address of the Linux system), 3-144, In the Popup interface figure 3-145 Enter the Samba user information added in step 6th.

?

Figure 3-144

Use IE to log into Samba server

Figure 3-145

Samba User Login

10. Successfully login to Samba server; As shown in 3-146.

?

?

?

?

?

?

?

?

?

?

?

?

Figure 3-146

Successfully logged into Samba

The Windows Samba Login folder displays

Samba folder display under Linux

?

Attention:

When Samba access to Linux is slow, and many directory access failures, 3-147 hints, because Linux prohibits the violation of SELinux behavior. Workaround: Enter "Setenforcepermissive" in the Linux terminal to allow the violation of SELinux, and the system will log the violation information.

Figure 3-147

Logon failure

Summarize:

Using WinSCP to access Linux files through this section, installing Samba servers and accessing Linux using the Samba service, we can familiarize ourselves with how to install, configure, start, and test Samba services in Linux. Here's a tip, when using samba, sometimes for convenience, you can add the root user after the valid users parameter in the configuration file, namely: valid Users=root, so you can log in to samba using the root user. Root to Samba, you also need to set a samba password for root, using the command: Smbpasswdroot. With root login, the user will gain root privileges on all original Linux systems.

14.Windows and Linux file sharing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.