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

相关推荐
JavaPub-rodert18 分钟前
Linux 下部署 MongoDB:从安装、配置到生产环境使用
linux·运维·mongodb
我不会插花弄玉19 分钟前
11.Linux进程信号【由浅入深-Linux】
linux·进程·信号
辻弋20136 分钟前
一键优化电源计划、游戏模式、独显强制、禁用后台录制——DeltaForceBooster专治三角洲行动卡顿掉帧,所有改动可一键还原
服务器·数据库·windows·游戏·电脑·php
xcLeigh43 分钟前
Go入门:基本数据类型全览与选择指南
android·服务器·golang·教程·go热门
Doraemomo1 小时前
Linux编程-socket网络编程之TCP
linux·网络·tcp/ip
何以解忧,唯有..2 小时前
Python os模块详解:文件与目录操作指南
java·服务器·python
Brilliantwxx2 小时前
【Linux】 进程(3)深度解析:从查看进程到进程状态
linux·服务器·网络·c++
我星期八休息2 小时前
Linux—五种IO模型与非阻塞IO
linux·运维·服务器·网络·数据库·网络协议
hweiyu002 小时前
Linux命令:column
linux·运维·服务器
Csxyzj2 小时前
kubernetes集群部署方法
java·linux·kubernetes