Samba tools for network sharing with Ubuntu and Windows

Source: Internet
Author: User
Keywords Ubuntu network sharing Samba
Tags access aliyun apt code create data etc files

Samba is the http://www.aliyun.com/zixun/aggregation/13835.html ">ubuntu and Windows network sharing tools, such as sharing printers, transferring data files to each other."

Installing Samba

Installing Samba

sudo apt install samba

Kubuntu

Installing shared modules for system settings

sudo apt install kdenetwork-filesharing

Configuration

1.windows access to Ubuntu

The first step is to create a shared directory: for example, to create a/home/username/share first create this folder (this username is your username, in order to be easy to understand I wrote this, remember to change their own AH)

Code:

mkdir/home/User name/share (new share folder) chmod 777/home/username/share (set permissions on this folder so that all users can read and write to run)

Back up and edit smb.conf allow network users to access (develop a good habit of backing up at any time, at the critical moment you will find the original backup is how wise!) Code:

sudo cp/etc/samba/smb.conf/etc/samba/smb.conf_backupsudo gedit/etc/samba/smb.conf

Search for this line of text code:

; Security = User

Replace it with the following lines

Code:

Security = Userusername Map =/etc/samba/smbusers

Add the following lines to the last side of the file, assuming that the user who is allowed to access is: new. and the folder's share name is Share # This is why we write this because we want to create an SMB user new and let XP users use this new to communicate with us. Of course, you can write your favorite name, just be consistent.

Code:

[Share]

Comment = Shared Folder with username and password

Path =/home/Username/share

Public = yes

writable = yes

Valid users = new

Create mask = 0700

Directory mask = 0700

force user = Nobody

Force Group = Nogroup

Available = yes

browseable = yes

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.