Foreword:
The full name of smb is samba, which is a file sharing protocol that exists on Linux and Unix. It can share file systems on Linux and Windows resumes.
Usage scenario: Distributed storage servers generally have smb sharing.
The sharing tools of IT companies and the download of shared files generally apply the smb protocol.
There is also a server for sharing the file system in the university laboratory, and smb sharing is also applicable.
Linux server-----> server side
Windows users--->client
One, install smb on Linux
Keep the external network usually execute the following command
yum -y install samba
Generally, the following 6 packages will be installed actively
samba-4.8.3-6.el7_6.x86_64
samba-client-libs-4.8.3-6.el7_6.x86_64
samba-libs-4.8.3-6.el7_6.x86_64
samba-common-tools-4.8.3-6.el7_6.x86_64
samba-common-4.8.3-6.el7_6.noarch
samba-client-4.8.3-6.el7_6.x86_64
samba-common-libs-4.8.3-6.el7_6.x86_64
1.2 Modify the smb configuration file
Generally, it will be in the directory by default: cd /etc/samba
Find the smb.conf file
Edit the smb.conf file
vi smb.conf
[printers]
comment = share
path = /var/tmp
guest ok = yes
writable = yes
browdeable = Yes
create mask = 0644
directory mask =0755
Save and exit after finishing.
1.3 Add smb user, set password
useradd smbuser
smbpasswd -a smbuser
Remarks: [smbpasswd option description: -a add smb account; -x delete smb account; -d disable smb account; -e enable smb account]
Two, test the connection
Open the Windows file system, enter the IP address in the address bar, as shown in the figure below, we can see our shared folder, and we can upload and download things.
3. Mount the shared folder and set the space size of the shared file
Follow-up