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

相关推荐
运维行者_24 分钟前
网络监控工具怎么选?从设备监控到智能运维的能力清单
运维·服务器·开发语言·网络·人工智能·支持向量机·php
小小de风呀25 分钟前
de风——【从零开始学习Linux】(九):进程基础 —— 从冯诺依曼体系到 fork 创建进程
linux·学习
2401_8685347827 分钟前
陈冲2026年上海纽约大学全英文毕业演讲
服务器·网络
晚风吹北巷2 小时前
Linux复习篇(自用)
linux·运维·服务器·1024程序员节
数字新视界3 小时前
信创机房动环监控技术在智能运维中的应用与优势分析
大数据·服务器·数据库·动环监控系统·动力与环境监控系统
by209993 小时前
Linux 压缩传输、进程查看与权限管理
linux·经验分享·1024程序员节
无足鸟ICT3 小时前
【RHCA+】reboot命令(重启)
linux·运维·服务器·1024程序员节
DYWorker0014 小时前
第1课:基于正点原子RK3568开发板读懂Linux内核
linux·运维·网络
Android系统攻城狮5 小时前
Linux FFmpeg深度解析之avformat_open_input调用流程与实战(一)
linux·运维·ffmpeg·车载音视频·ffmpeg音视频·音视频进阶手册