ubuntu之搭建samba文件服务器

1. 在服务器端安装samba程序

sudo apt-get install samba

sudo apt-get install smbclient

2.配置samba服务

sudo gedit /etc/samba/smb.conf

在文件末尾追加入以下配置

develop_share

valid users = ancy

path = /home/ancy

public = yes

writable = yes

create mask = 0644

force create mode = 0644

directory mask = 0755

force directory mode = 0755

available = yes

3. 添加samba用户

sudo smbpasswd -a ancy

4.重启samba服务器

sudo /etc/init.d/samba restart

或者

sudo /etc/init.d/smbd restart

5.windows上访问samba服务器

在下面窗口输入: \\ + ip

注意:

1.增加samba用户提示Failed to add entry for user

root@ubuntu \~\]# smbpasswd -a ancy New SMB password: Retype new SMB password: Failed to add entry for user test. 解决办法: 这是因为没有加相应的系统账号,所以会提示Failed to add entry for user的错误,只需增加相应的系统账号ancy就可以了

相关推荐
chao1898448 分钟前
完整MES系统实现 (C# 客户端服务器)
服务器·windows·c#
她说彩礼65万24 分钟前
C语言 文件
linux·服务器·c语言
txg66635 分钟前
自动驾驶领域热点简报(2026-04-26 ~ 2026-05-03)
linux·人工智能·自动驾驶
二哈赛车手43 分钟前
新人笔记---ES和kibana启动问题以及一些常用的linux的错误排查方法,以及ES,数据库泄密解决方案[超详细]
java·linux·数据库·spring boot·笔记·elasticsearch
嵌入式×边缘AI:打怪升级日志1 小时前
嵌入式Linux开发核心自测题(全系列精华浓缩)
java·linux·运维
_codemonster1 小时前
系统分析师刷题系列--操作系统(二)
服务器·系统架构
嵌入式×边缘AI:打怪升级日志1 小时前
TinaSDK Linux Kernel 基本使用(全志T113开发板)
linux·运维·服务器
嵌入式×边缘AI:打怪升级日志1 小时前
Linux内核基础完全入门指南(理论篇)
linux·运维·服务器
Muyuan19982 小时前
28.Paper RAG Agent 开发记录:修复 LLM Rerank 的解析、Fallback 与可验证性
linux·人工智能·windows·python·django·fastapi
比昨天多敲两行2 小时前
Linux进程概念
linux·运维·服务器