Share documents with windows in Ubuntu

Source: Internet
Author: User
1. Of course, you have to install Samba first.
Sudo apt-Get install Samba smbfs

2. Edit smb. conf
Sudo Vim/etc/samba/smb. conf
Found; security = user
Replace the following two rows:
Security = user
Username map =/etc/samba/smbusers

Add the following lines to the end of the document,
Assume that the user allowed to access is weijianhua, And the Share Name of the document folder is share,

[Share]
Comment = shared folder with username and password
Path = "document directory to be shared"
Public = Yes
Writable = Yes
Valid users = weijianhua
Create mask = 0700
Directory mask = 0700
Force user = nobody
Force Group = nogroup
Available = Yes
Browseable = Yes

Then find [Global] and change workgroup = mshome

Workgroup = workgroup
Displays charset = UTF-8
UNIX charset = UTF-8
DOS charset = cp936
3. Add a user's samba password: (this is very important !!!)

Sudo smbpasswd-A weijianhua
Sudo gedit/etc/samba/smbusers
Add the following line to the newly created document and save it.

Weijianhua = "Network username"
4. Restart the samba service:

Sudo/etc/init. d/samba restart
Finally, log out and log on again or restart the machine.
In this way, you can directly MAP network disks in windows, which is convenient ......

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.