惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
AI
AI
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
The Cloudflare Blog
Apple Machine Learning Research
Apple Machine Learning Research
Jina AI
Jina AI
大猫的无限游戏
大猫的无限游戏
博客园 - 【当耐特】
V
Visual Studio Blog
博客园 - Franky
宝玉的分享
宝玉的分享
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
I
Intezer
C
Cybersecurity and Infrastructure Security Agency CISA
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
S
SegmentFault 最新的问题
腾讯CDC
T
Threat Research - Cisco Blogs
Last Week in AI
Last Week in AI
酷 壳 – CoolShell
酷 壳 – CoolShell
Webroot Blog
Webroot Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
小众软件
小众软件
C
Cyber Attacks, Cyber Crime and Cyber Security
Hacker News: Ask HN
Hacker News: Ask HN
T
Tor Project blog
WordPress大学
WordPress大学
雷峰网
雷峰网
J
Java Code Geeks
GbyAI
GbyAI
Recorded Future
Recorded Future
F
Full Disclosure
Cisco Talos Blog
Cisco Talos Blog
S
Secure Thoughts
I
InfoQ
量子位
Forbes - Security
Forbes - Security
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
T
Threatpost
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Security Blog
Microsoft Security Blog
Attack and Defense Labs
Attack and Defense Labs
爱范儿
爱范儿
N
News and Events Feed by Topic
V
Vulnerabilities – Threatpost
L
LINUX DO - 最新话题
A
Arctic Wolf
S
Security Affairs

Linux – Ed_'s Blog

给 Debian 开了自动安全更新 – yywr's Blog UPower – 将笔记本电池当成UPS使用 – yywr's Blog Crontab 使用笔记 – yywr's Blog Linux 程序开机启动并保活:Systemd 进程守护管理工具 – yywr's Blog Linux 下自动挂载 Samba /CIFS 共享文件夹 – yywr's Blog Ubuntu 开机自动挂载第二块硬盘 – yywr's Blog 重装了家里的服务器系统 – yywr's Blog Ubuntu 笔记本合盖子不休眠的方法 – yywr's Blog
Samba 服务基本用法 – yywr's Blog
yywr · 2023-08-27 · via Linux – Ed_'s Blog

Skip to content

Linux下开机挂载SMB目录已经会了,配置服务端 samba 也做下记录,能实现最基本的需求 – 跑起来 

基本来说就三块内容,能保证基本的使用,一是Samba服务的安装启用,二共享目录的配置,三是账户的管理

安装服务包 (Ubutnu):  apt install samba

启用服务 systemctl start smbd

查看服务状态 systemctl status smbd

配置共享目录

编辑设置目录共享目录 /etc/samba/smb.conf , 添加下面配置,Path 设置为需要共享的路径

[filerun]
   path = /mnt/DataDisk/ed
   browseable = yes
   writeable = yes
   guest ok = no

管理账户

  • 增/改密码:sudo pdbedit -a username 
  • 删:sudo pdbedit -x username
  • 查:sudo pdbedit -L
  • 重置密码错误次数 sudo pdbedit -z -u username

其它

设置端口与防火墙,默认端口:445 , Ubuntu 下参考UFW 的使用防火墙配置工具 UFW

账户名称,建议配置成文件夹默认的Linux账户

用户端测试命令: smbclient -L//192.168.1.2

参考1:https://www.cnblogs.com/sinlang5778/articles/2120712.html

参考2:https://linux.die.net/man/8/pdbedit

参考3:https://linux.die.net/man/7/samba

本文是 居家服务器折腾笔记 的一部分