Configure samba to share folders under Ubuntu

  • 2020-05-27 07:56:52
  • OfStack

Configure samba for folder sharing under Ubuntu

1. Installation of samba:

sudo apt-get insall samba
sudo apt-get install smbfs

2. Create a Shared directory:

mkdir /home/phinecos/share
sodu chmod 777 /home/phinecos/share

3. Create Samba profile:

1. Save the existing configuration file

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

2. Modify the current configuration file

sudo gedit /etc/samba/smb.conf

Add at the end of smb.conf

   path = /home/phinecos/share
   available = yes
   browsealbe = yes
   public = yes
   writable = yes

4. Create an samba account

 sudo touch /etc/samba/smbpasswd
 sudo smbpasswd -a phinecos

You will then be asked to enter your password for the samba account

[if there is no step 4, when you log in you will be prompted with session setup failed: NT_STATUS_LOGON_FAILURE]

5. Restart the samba server

sudo /etc/init.d/samba restart

Test 6.

smbclient -L //localhost/share

7, use

 Can go to the windows The input ip Yes, type in the folder  "\\" + "Ubuntu The machine's ip Or the host name " + "\\" + "share"

Thank you for reading, I hope to help you, thank you for your support of this site!

Related articles: