部署samba

**每个用户有自己的目录,可以浏览内容,也可以删除**

清空防火墙规则

[root@bogon ~]# iptables -F

安装samba

[root@bogon ~]# yum -y install samba

配置文件在/etc/samba/smb.conf

添加用户

[root@bogon samba]# useradd smbtest
[root@bogon samba]# usermod -s /sbin/nologin smbtest
[root@bogon samba]# smbpasswd -a smbtest
New SMB password:
Retype new SMB password:
Added user smbtest.

重启服务测试连接

[root@bogon samba]# systemctl restart smb

smb删除用户用以下命令:

smbpasswd -x smbtest

**所有的用户共享一个目录,只能浏览内容,不能删**

新建share目录,修改权限

[root@bogon samba]# mkdir /share
[root@bogon samba]# ll /share -d
drwxr-xr-x 2 root root 6 6月 1 00:53 /share
[root@bogon samba]# chmod o+w /share
[root@bogon samba]# ll -d /share
drwxr-xrwx 2 root root 6 6月 1 00:53 /share

修改配置,重启服务

[root@bogon samba]# vim smb.conf
[public]
comment = Public Stuff
path = /share
public = yes
writable = no
printable = no
write list = lucaq,lucaqsmb,smbtest [root@bogon samba]# systemctl restart smb

windows下测试:

net use
net use * /del
\\192.168.16.99\public

最新文章

  1. 札记:Fragment基础
  2. 微信小程序火车票查询 直取12306数据
  3. Lintcode: Remove Node in Binary Search Tree
  4. Easyui扩展或者重载(方法和属性)
  5. SQLserver查询数据库所有字段-表名
  6. BZOJ 2456
  7. libevent 初试
  8. STM32库函数实现方法
  9. Unity NGUI Tween的用法
  10. jQuery手机发送验证码倒计时代码
  11. css sprites 图标合并工具网站
  12. C++简单交换堆排序的代码
  13. Oracle 11g设置IP访问限制
  14. 爬虫——cookies池的搭建
  15. 当我们用自定义的类对象作为key时,我们必须在程序中覆盖HashCode()和equals()。
  16. sonar gitlab+jenkins配置
  17. response的contentType的类型值Response.ContentType
  18. 利用monkeyrunner、python脚本来做多设备多apk适配ui界面截屏的自动化测试
  19. Alpha冲刺(3/10)——追光的人
  20. 微信小程序/支付宝小程序 WxParse解析富文本(html)代码

热门文章

  1. 步骤1:JMeter 录制脚本接口测试
  2. weblogic中配置自定义filter和servlet
  3. 前端----css总结
  4. 为Zabbix配置RabbitMQ监控模板
  5. wangEditor编辑器中解析html图文信息问题
  6. Python 异步编程笔记:asyncio
  7. LCA(最近公共祖先)——离线 Tarjan 算法
  8. c# 自动关机代码
  9. maven仓库地址
  10. StanFord 编程方法