Centos installs the samba file server method

  • 2020-05-24 06:43:36
  • OfStack

1: install samba for yum. If some dependencies are not installed, please install the dependencies first


yum -y install samba

2: check the installation status


rpm -qa | grep samba

3: configure open folders

1: set up an access user for samba


useradd username   // new 1 Access account 
smbpasswd -a username   //windows access samba You need to enter this user when sharing a directory 

2. Get the folders ready first


mkdir /var/samba/share   // If the Shared directory you just configured does not exist, create it 
chown -R nobody. /var/samba/share   // Set the Shared directory home to  nobody 
chmod 777 /var/samba/share   // Set the Shared directory property to  777

3: configure the folder samba property

Edit/etc samba/smb conf


[share]   //windows The folder name that the client sees when viewing 
path = /var/samba/share   // Share directory location, to exist in the system directory, can also be configured and created 
read only = no
public  = yes
writeable = yes
browseable = yes
guest ok = yes
valid users = jinx

Related articles: