Linux and Windows mutually access Samba settings

Install Samba

Check if the samba service is installed locally

rpm -qa | grep samba

 

If it is not installed, execute the following command

yum -y install samba

 

Configure Samba

First: backup samba configuration files 

cp  /etc/samba/smb.conf  /etc/samba/smb.conf.bak

 

Second: add the following at the end of the /etc/samba/smb.conf file:

[cnfestival]

comment = cnfestival

path = /home/rss/data/public/cnfestival

writable = yes

 

Again: samba add a user (add a user from a Linux system to samba)

  smbpasswd  -a   root

  Enter password: xxxxxx

  Confirm password: xxxxxx

 

Fourth: restart the smb service

  service smb restart

 

Fifth: Turn off the firewall (the document is here to understand why this is done and there is time to optimize it later)

service iptables stop

 

 Sixth: selinux processing (why this is done in the document is understandable and there is time to optimize later)

  setenforce 0

  Modifying the selinux configuration file will change SELINUX=enforcing to SELINUX=disabled

  vi /etc/selinux/config

 

Finally, it can be accessed in windows, as shown below:


 

 

 

 

 

 

 

Reference article:

http://blog.chinaunix.net/uid-23069658-id-3142052.html

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326615502&siteId=291194637