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就可以了

相关推荐
哈基咪怎么可能是AI6 小时前
为什么我就想要「线性历史 + Signed Commits」GitHub 却把我当猴耍 🤬🎙️
linux·github
十日十行1 天前
Linux和window共享文件夹
linux
Sinclair1 天前
简单几步,安卓手机秒变服务器,安装 CMS 程序
android·服务器
木心月转码ing1 天前
WSL+Cpp开发环境配置
linux
Rockbean2 天前
用40行代码搭建自己的无服务器OCR
服务器·python·deepseek
茶杯梦轩2 天前
CompletableFuture 在 项目实战 中 创建异步任务 的核心优势及使用场景
服务器·后端·面试
崔小汤呀2 天前
最全的docker安装笔记,包含CentOS和Ubuntu
linux·后端
何中应2 天前
vi编辑器使用
linux·后端·操作系统
何中应2 天前
Linux进程无法被kill
linux·后端·操作系统
何中应2 天前
rm-rf /命令操作介绍
linux·后端·操作系统