Easily deal with the samba service-the simplest way to share Windows and linux Files
1. Windows accesses the linux shared folder
-- Enable the smb service after samba is installed through yum
# Yum install samba
# Service smb start
-- Add users accessing shared files to the samba Database
# Smbpasswd-a root user add the System user root to the Samba user database
New SMB password: Login enter the password used by the user to log on to Samba
Retype new SMB password: Confirm again to enter the password
Added user centospub.
-- Modify/etc/samba/smb. conf to share all files. The configuration is as follows:
-- Add the following code at the end of the file:
[Share]
Comment = Shared Folder with username and password
Path =/home
Writable = yes
Valid users = root
Create mask = 0700
Directory mask = 0700
Browseable = yes
-- After modification, enter \ 192.168.1.2 (centos Host IP address) under the win host (run) and enter the correct user name and password to access the files shared by the host.
Remember to disable selinux: setenforce 0.