1. Win access to the Linux shared folder
--After installing samba through Yum, turn on SMB service
# Yum Install Samba
# service SMB Start
--add access to the shared files user to the Samba database
# smbpasswd-a root← Add the system user root to the Samba user database
New SMB password:← Enter the password that the user uses to log in to Samba
Retype new SMB password:← confirm entering this password again
Added user centospub.
--Modify/etc/samba/smb.conf, share all files, configure 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 the \\192.168.1.2 (CentOS host IP) under the win host and enter the correct username and password to access the shared files.
Be sure to remember, turn off Selinux:setenforce 0
Easily take care of samba services-the simplest window and Linux file sharing methods