Samba is a free software that implements the SMB protocol on Linux and UNIX systems, consisting of servers and client programs. Smb(Server Messages block, information service blocks) is aLanshared files and printers on aCommunication protocols, it provides shared services for files and printers among different computers within the LAN. The SMB protocol is a client/server protocol that allows clients to access shared file systems, printers, and other resources on the server. By setting up "NetBIOS over TCP/IP", Samba will not only share resources with local network hosts, but also share resources with computers around the world.
Sample system: CentOS release 6.6 (Final)
Installation:
Yum Install Samba
The user used by Samba must be a system user, so you need to add several shared users to the system without specifying permissions.
Creating a Linux User Samba does not create a home directory
Useradd Samba--no-create-home
Add user Samba to the Samba service user library (note: This step prompts you to create a password)
Smbpasswd-a Samba
Add user without password
Smbpasswd-an Samba
Repeat the Add user command if you want to change the password
Create a shared disk storage location
First look at the next directory space (shared disk space is large, it is best to find a large directory storage)
Df-ah
Take the/home directory as an example, create a publicly directory, and give sufficient permissions
Mkdir-m 777/home/publicly
Open Samba config file, default profile in/etc/samba/
Vim/etc/samba/smb.conf
Append content at the bottom
[Samba_public] comment = Test shared disk Path =/home/publicly browseable = yes public = yes; writable = yes Valid users = Samba Write list= Samba
Related instructions:
Samba_public only \\ip\samba_public when a shared disk name is connected
Comment Shared Disk notes description
directory where the path share disk is located
browseable If you can browse
Public is shared
Writable can be written, active users can write after opening
Valid user list of valid users, separating
Write list writable user lists to, separate, specify writable users
Open Service (note: Samba service name is SMB)
Service SMB Start
Test the connection, open the window computer to my computer, and use the mapped network drive to enter the user name password to connect.
This article is from the "gangbusters" blog, make sure to keep this source http://php2012web.blog.51cto.com/5585213/1852246
Linux shared disk Samba installation and use