ubuntu samba share

setp 1: Install depend dev pakage

bash 复制代码
sudo apt install python3-samba samba-common
sudo apt install vim

setp 2: Add user for sambashare

bash 复制代码
sudo adduser <yourname> sambashare

setp 3: Set your sambashare password

bash 复制代码
sudo smbpasswd -a <yourname>

setp 4: Edit samba config

bash 复制代码
sudo vim /etc/samba/smb.conf

add : ( the file end )

bash 复制代码
[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

bash 复制代码
sudo reboot 

Tips: or restart samba services !! use this common

bash 复制代码
sudo service smbd restart && service nmbd restart

setp 6: Test sambashare

Use your other computer to test sambashare!!!

Eg : system is ubuntu

bash 复制代码
smb://<your host computer of sambashare ip>/<your sambashare folder>

Done !!!

相关推荐
冰帆<15 分钟前
[特殊字符] 深度起底:突破火山引擎 Ark-Helper 的 Linux 底层环境死锁,顺手魔改一份 Windows 一键安装脚本!
linux·windows·火山引擎
我星期八休息22 分钟前
Linux系统编程—mmap文件映射
java·linux·运维·服务器·数据库·mysql·spring
2301_7779983436 分钟前
Linux:文件系统
linux
Tian_Hang37 分钟前
Linux基础知识(五)
linux·运维·服务器
凡人叶枫1 小时前
Effective C++ 条款32:确定你的 public 继承塑模出 is-a(是一种)关系
java·linux·开发语言·c++·嵌入式开发
utf8mb4安全女神1 小时前
expect工具,expect脚本,实现全自动免交互登录ssh,shell脚本和expect结合使用,在多台服务器上创建1个用户【linux】
linux·运维·服务器
暮云星影1 小时前
全志开发环境搭建及编译构建
linux·arm开发·驱动开发
vortex51 小时前
Alpine Linux 运行架构解析:从内核到容器的精简之道
linux·运维·架构
三块可乐两块冰1 小时前
rag学习5
linux·前端·python
::呵呵哒::1 小时前
在macOS/Linux上优雅管理多个JDK版本:环境变量与别名配置指南
java·linux·macos