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

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
J
Java Code Geeks
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Last Week in AI
Last Week in AI
雷峰网
雷峰网
博客园_首页
小众软件
小众软件
美团技术团队
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
腾讯CDC
P
Proofpoint News Feed
MongoDB | Blog
MongoDB | Blog
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
U
Unit 42
The Cloudflare Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Microsoft Security Blog
Microsoft Security Blog
大猫的无限游戏
大猫的无限游戏
Engineering at Meta
Engineering at Meta
N
Netflix TechBlog - Medium
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 叶小钗

Computer – Ed_'s Blog

给 Debian 开了自动安全更新 – yywr's Blog macOS 下 xlr-spaceFN 键盘映射方案实现方案 v1 – yywr's Blog 移动网络/高延迟网络下 ssh 的替代品 – yywr's Blog H3C NX30PRO 半砖救回记 – yywr's Blog OBS摄像头设置教程:画面形状与绿幕功能详解 – yywr's Blog 视频录制和推流直播工具OBS Studio 的使用 – 基础篇 – yywr's Blog UPower – 将笔记本电池当成UPS使用 – yywr's Blog 私有音乐服务 Navidrome:部署与Nginx 二级目录反代访问 – yywr's Blog 简单的私有云数据访问工具 – FileBrowser 部署记要 – yywr's Blog 又一个 Honkintosh – yywr's Blog Crontab 使用笔记 – yywr's Blog 终于修了个梯子 – yywr's Blog 防火墙配置工具 UFW – yywr's Blog
Samba 服务基本用法 – yywr's Blog
yywr · 2023-08-27 · via Computer – 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

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