Samba File Sharing Server Setup

Source: Internet
Author: User

About Samba

Samba is a software that allows a Linux system to apply the Microsoft Network Communication protocol, and SMB is the abbreviation for Server Message block, which means that the SMB is primarily a network communication protocol for Microsoft, Then samba applied the SMB communication protocol to the Linux system, and it became the samba software. the biggest feature of Samba is that it can be used for file sharing and print sharing directly with Linux and Windows systems.

Quickly configure a Samba server

1 shutting down the firewall with SELinux

[Email protected] ~]# Setenforce 0

[Email protected] ~]# sed-i "/selinux=/c selinux=disabled"/etc/sysconfig/selinux

[[Email protected] ~]# service iptables stop

[Email protected] ~]# chkconfig iptables off

2 Installing the Samba software

Yum install-y Samba samba-client Samba-swat #安装samba

3 Creating a shared directory

[Email protected] home]# mkdir Gongxiang

[Email protected] home]# chmod 777 gongxiang/

[Email protected] home]# echo "Hello Samba Gongxiang" > Gongxiang/test.txt #创建文件

4 Modifying a configuration file

Vim/etc/samba/smb.cnf

[Gongxiang]

Gongxiang = Samba Share

Path =/home/gongxiang #共享路径目录

browseable = yes #所有人可见

Guest OK = no #不允许匿名访问

writable = yes #支持数据写入

5 Creating an Access account


[Email protected] home]# useradd-s/sbin/nologin smbuser #创建samba用户

[Email protected] home]# smbpasswd-a smbuser #设置用户密码

New SMB Password:

Retype new SMB Password:

Added user Smbuser.

[[Email protected] home]# service SMB start #启动服务

Start the SMB service: [OK]

[[email protected] home]# chkconfig SMB on

6 Windows Client Access

Open Run, enter \\192.168.1.5 point OK

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/8C/52/wKiom1hqJEbyVDKXAABDCmzm8M0683.png-wh_500x0-wm_3 -wmp_4-s_2800699518.png "title=" Qq20170102175530.png "alt=" Wkiom1hqjebyvdkxaabdcmzm8m0683.png-wh_50 "/>

Enter the users and passwords for Samba

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/8C/52/wKiom1hqJIiQ770sAACB0nNAcKU178.png-wh_500x0-wm_3 -wmp_4-s_1592800822.png "title=" Qq20170102175611.png "alt=" Wkiom1hqjiiq770saacb0nnacku178.png-wh_50 "/>

OK, go to the shared directory Gongxiang

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/8C/4E/wKioL1hqJMHhRQnEAACOE2_01FY830.png-wh_500x0-wm_3 -wmp_4-s_2578423512.png "title=" Qq20170102175700.png "alt=" Wkiol1hqjmhhrqneaacoe2_01fy830.png-wh_50 "/>

Complete!



This article is from the "Practical Linux knowledge and Skills sharing" blog, please be sure to keep this source http://superleedo.blog.51cto.com/12164670/1888452

Samba File Sharing Server Setup

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.