installation, configuration, and communication with host for Samba servers in virtual machines in Win7 environment

Source: Internet
Author: User

Considering the hassle of transmitting files between Windows and Linux virtual machines, it is intended to install the Samba server in the virtual machine to share files with Windows. However, the installation of the configuration process twists and turns, the following records:

One, the installation of Samba server

The normal installation process is as follows: 1. Installing Samba:yum Install Samba Check Samba installation status: RPM QA | grep Samba (make sure Samba server is installed) 2, configure Samba services: vim/etc/samba/smb.conf testparm Test Samba configuration file for syntax error 3, add samba new users: SMBPASSW D-a user_name Add a new Samba user (provided that the user is already present on the Linux system) smbpasswd-x user_name Delete the Samba user pdbedit-l list all s Amba User 4, restart Samba service: Problems encountered during the service SMB restart installation process: Dependency PackagesThe error of the online search for a long time, has not found the right answer (to find a dependency on the direction of the package, because the Yum command itself can automatically solve the problem of the dependency package). After that, I used the Yum Update command, noticing that there was a problem, and then, aware of the problem--probably because the samba process was previously installed Some process files are left to cause, there was a conflict during reinstallation? Anyway, because the command yum-complete-transaction in the Yum-utils package, first installs the Yum-utils, uses the commandyum install yum-utils;Then execute the command yum-complete-transaction, the successful installation of Samba, the problem has been resolved.Summary: When encountering a problem, be patient to find out all the possible problems and consider where the source of the problem is.

Second, the Samba server communicates with the host

The problems encountered, access to Samba's shared port via Win7 host Run window (key: win+r), unable to connect to Samba:         In order to solve this problem, almost searched the resources on the Internet, unfortunately there is no solution for the problem I have encountered. However, this post has mentioned https://www.iyunv.com/thread-70422-1-1.html. The network configuration of the virtual machine is always NAT mode, then the bridge mode is used, and the connection is successful. The problem is solved and seems to be related to the fact that I have broken down the final goal into different steps. The final effect is to implement Win7 access to the CentOS Samba in the virtual machine, but first smbclient client logons can be performed locally in the virtual machine, and if this succeeds, further Win7 access to Samba can be achieved. However, even the operation in the virtual machine is still unsuccessful. However, the advantage is that the error is prompt, as follows: Session setup failed:success-0Thus, through this hint and then the network resource search, finally found a reference to the scheme https://www.iyunv.com/thread-70422-1-1.html. The Samba profile/etc/samba/smb.conf is added as follows (simple configuration to meet usage requirements): [Work_dzh]; shared directory virtual name comment = DZH share dircetory; shared directory Description path =/home/work; Real shared directory browseable = yes; directory can be browsed writable = yes; writable in directory Valid users = Dzh; logged-on User: DzhIn addition, for easy access, the shared file Work_dzh in the virtual machine can be configured as a network file, but this makes the computer boot process unusually slow (this is because the computer boot process requires the drive Z to be loaded, but the drive Z has not been able to find it because the virtual machine is not turned on, which takes a lot of time).

installation, configuration, and communication with host for Samba servers in virtual machines in Win7 environment

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.