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

相关推荐
Rverdoser25 分钟前
网站开发用什么语言好
服务器
Wy_编程1 小时前
VS中创建Linux项目
linux
luck_lin1 小时前
linux添加新硬盘挂载分区和数据迁移
linux·运维·分区扩容
四时久成1 小时前
服务器认证系统
运维·服务器
iFulling2 小时前
【云原生】CentOS安装Kubernetes+Jenkins
linux·云原生·kubernetes·centos·jenkins
徐子元竟然被占了!!2 小时前
Windows Server 2019 DateCenter搭建 FTP 服务器
运维·服务器·windows
wayuncn3 小时前
影响服务器托管费用的因素
运维·服务器·数据中心·服务器托管·物理服务器租用·服务器机柜·idc机房托管
喜欢你,还有大家3 小时前
Linux笔记10——shell编程基础-4
linux·运维·服务器·笔记
玩转以太网3 小时前
基于 W55MH32Q-EVB 实现 FatFs 文件系统+FTP 服务器
服务器·单片机·物联网
不懂机器人3 小时前
linux编程----网络通信(TCP)
linux·服务器·tcp/ip