Samba uses the SMB protocol to share resources, common share files, printers and other resources between Linux and Windows.
General set up Samba server on Linux, Windows as a client, connect to the server to share files.
Physical machine win7, vm virtual machine using CentOS 6.5, practice.
1. Server Configuration
>>> 1.1 install samba service
[root@ ~]#: [root@ ~]#: yum install samba -y
...
Complete! # Installation is complete
>>> 1.2 modify the configuration file
[Root @ ~] #: cp /etc/samba/smb.conf /etc/samba/smb.conf.bak20190904 # backup
[Root @ ~] #: vi /etc/samba/smb.conf # emptied the original, enter the following:
. 1
2 [Global]
. 3 Workgroup = MYGROUP
. 4 Server String = the Samba Server Version% V
. 5 Security = Share
. 6 passdb backend = tdbsam
. 7 Load Printers = Yes
. 8 CUPS Options = RAW
. 9
10 [TEMP]
. 11 Comment = the Temporary File Space
12 is path = / tmp
13 is Read only = NO
14 public = Yes
15 the writeable = Yes
16
. 17 [Data]
18 is Comment = the Temporary File Space
. 19 path = / Data # subsequent root new data / directory, and modify the permissions
20 read only = no
public = yes 21
22 writeable = yes
# Save and exit
>>> 1.3 New / data / directory, and modify permissions
[Root @ /] #: mkdir / data / # you Create a directory
[Root @ /] #: chmod 777 / data / # modify permissions to: perform read and write
[Root @ /] #: /etc/init.d/smb start # service smb start
2. Client Configuration
>>> 2.1 win7 physical machine used in the system, use the shortcut win + r Open the "Run", enter the server address: \\ 192.168.10.61 Enter
In the open window you can see the data and two temp directory, you can create two directories, modify, delete files or folders.
NOTE: If you can not start the samba server or client can not connect to the server may shut down the server iptables and selinux, then restart the server, re-test.