1. Turn off firewall and SELinux
# Service Iptables Stop
# chkconfig--level 2345 iptables off
# Vim/etc/selinux/config
Change enforcing= to =>disabled
Use Getenforce to get the status of the current SELinux
Note: After you change SELinux, you have to restart the virtual machine or the record refresh is unsuccessful.
2. Installing the Samba component
# mount/dev/cdrom/mnt
# Yum Install Samba samba-client
3. Modify the Samba configuration file (/etc/samba/smb.conf)
1. Modify the authentication method to share
Security = Share
2. Add the following code to share a directory
[Share]
Comment = Share
Path =/home/share
browseable = yes
Guest OK = yes
writable = yes
4. Start Samba Service
# service SMB Start|restart
# chkconfig--level 2345 SMB on
5. Create a shared directory and create a file for testing
# Mkdir/home/share
# touch/home/share/a.py
# Chmod-r o+w/home/share/a.py
6. Accessing Shares in Windows
\\IP (IP refers to the IP under Linux)
Do it yourself, and you will succeed. | | | | | | | | | |
Author: Xiaoxiang Rain Wrong
A bridge between Linux and Windows--shared directory