Linux side:
#create share folder.
sudo nano /etc/samba/smb.conf
shared // please notes this is the name which shared for others
path = /home/adley/shared
available = yes
valid users = adley
read only = no
browsable = yes
public = yes
writable = yes
#add credicial
sudo smbpasswd -a adley
#restart smbd
sudo systemctl restart smbd
#check share folder if work
a. testparm
b. sudo mount -t cifs //localhost/shared /mnt/samba-test -o username=adley,password=你的Samba密码
c. sudo umount /mnt/samba-test
#windows 下 打开共享文件
-
确保 windows 的smb 服务开启了
-
open the share folder \\\172.21.67.193\shared 输入 Linux 上设置的 Samba 用户名(`adley`)和密码,即可访问和读写文件。
-
"此电脑" → 选择 **映射网络驱动器**