Ubuntu installation samba for Windows network sharing

Source: Internet
Author: User
Keywords User network share username installation nbsp;
Tags access aliyun block 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."

Samba is a tool suite that implements the SMB (Server message Block) protocol, or the Netbios/lanmanager protocol, on UNIX. The SMB protocol is typically used by the Windows family to implement disk and printer sharing. It should be noted that NetBIOS is based on Ethernet broadcast mechanism, no transparent network bridge can not cross the network segment, perhaps with WINS and Lmhosts, but I did not try. I felt Samba was implementing SMB binding to TCP/IP, and Samba was only broadcasting on the subnet (many times I had to specify IP address:-(). So in Win95 with samba communication is not only to install NetBEUI protocol, but also to install TCP/IP protocol.

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/username/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_backup

sudo gedit/etc/samba/smb.conf

Search for this line of text code:

; Security = User

Replace it with the following lines

Code:

Security = User

Username 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

Related Article

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.