VMware and Ubuntu share files via Samba server

Source: Internet
Author: User

Linux and Windows are shared in a variety of ways under virtual machine files, commonly used with VMware tools sharing and Samba servers for sharing, using VMware Tools here is not the point, I am using a samba server.

It's actually very simple:

1. First download the Samba server:
sudo Install Samba samba-commonsudoinstall System-config-samba cifs-utils

2. Add Samba Users
sudo  Samba_lennon  # Add a user, do not need to set a password, to log on.  sudosamba_lennon

注意:添加的用户必须是要存在的ubuntu用户,否则可能会出现

 for user user1.

Error

Several common options for SMBPASSWD are also:

            -a    add a user              -x    Delete a user              -  d    Disable a user              - e    unblock a user

Common server Management commands for Samba:

sudo /etc/init.d/sudo /etc/init.d/sudo /etc/init.d/samba Restart

3, create a shared directory (the directory is arbitrarily specified, here to create a temporary test)
mkdir ~/share
4. Configure the server:
sudo VI /etc/samba/smb.conf

The relevant properties in the file are as follows

[Share] path=/home/lennon/== = = =0700   0700=


Workgroup = workgroup

note that the Working Group here must be filled out correctly! Or you won't be logged in!

The other two configurations:

If garbled is configured in the [Global] option:

Workgroup == utf-8= utf-8= cp936

5. Restart the server
sudo /etc/init.d/samba restart

6. Testing
smbclient-l//127.0.  0.1 // The password you entered is the Samba password you just set.

7. Accessing the shared directory in Windows

\\192.168.233.131 This IP address can be obtained using the ifconfig command:

You can see the shared directory after the carriage return, double-click the share folder:

Well, you can share it.

Note: If your VMware service is off, it will be an error, the solution is to turn on VMware Network services:

Win+r input services.msc carriage return

There is no problem finding the VMware DHCP service and VMware NAT Service startup.

Attached: Some simple descriptions of the Samba server configuration

(1) Global Settings section

Security = User This line sets the level of safety for samba, and samba can have a total of four security registrations, from bottom to high, respectively:
Share this option means that anyone can sign in without having to enter a password.
User This is the default level for Samba and requires each user to enter a password to log in.
The server user level password is saved on this computer, and the server-level password and user name are saved on another host.
Domain This level requires that the network must have one of the Windows domains, and the authentication work is done by the domain controller.
It is important to note that the user name and password must be the first user in the Linux system, as long as you enter the level

(2) Share Settings section

Add a shared folder setting as follows

[Share] Shared file name, does not need to match the actual file name
Comment = My share directory's description of this shared branch
Path = shared directory of the/home/share system, must be an absolute path
Public = yes to allow everyone to see this directory, no to see
writable = yes whether to allow users to write in this directory, no is not necessary, if writable, also requires the directory has Write permission
Read Only = yes sets whether the user is read-only
Vaild users = Username settings are only valid for username user.

This article refers to the following:

1, http://blog.csdn.net/zshq280017423/article/details/7299439(solve the problem of sharing group)

2, http://www.cnblogs.com/ouuy/archive/2011/10/24/2223164.html(the text configuration some problems, but still learned a lot of things)

3. http://jingyan.baidu.com/album/da1091fbfa11c6027949d672.html(view workgroup in Win7)

VMware and Ubuntu share files via Samba server

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.