ubuntu samba share

setp 1: Install depend dev pakage

sudo apt install python3-samba samba-common
sudo apt install vim

setp 2: Add user for sambashare

sudo adduser <yourname> sambashare

setp 3: Set your sambashare password

sudo smbpasswd -a <yourname>

setp 4: Edit samba config

sudo vim /etc/samba/smb.conf

add : ( the file end )

[Share]
  path = /home/<yourname>/<your_share_folder>
  available = yes
  browseable = yes
  public = yes
  writable = yes
  valid users = <yourname>
  create mask = 0700
  directory mask = 0700
  force user = nobody
  force group = nogroup

use wq save Edit !

setp 5: Restart computer

sudo reboot 

Tips: or restart samba services !! use this common

sudo service smbd restart && service nmbd restart

setp 6: Test sambashare

Use your other computer to test sambashare!!!
Eg : system is ubuntu

smb://<your host computer of sambashare ip>/<your sambashare folder>

Done !!!

你可能感兴趣的:(ubuntu,postgresql,linux)