Samba配置了很多次,总是忘,现在写在博客里。

免密码只读

最主要的是免密配置,主要用到了两个配置,要写在[global]里:

        map to guest = Bad User
guest ok = yes

结果安装完了之后,文件夹被识别成了打印机,那是因为错配了一个参数。

就是在配置public的时候复制时多了一个printable = Yes

    printable = Yes

所有配置:

# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it. [global]
workgroup = SAMBA
security = user passdb backend = tdbsam printing = cups
printcap name = cups
load printers = yes
cups options = raw
map to guest = Bad User
guest ok = yes [homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes [printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No [print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @printadmin root
force group = @printadmin
create mask = 0664
directory mask = 0775 [public]
comment = public
path = /path/to/yourdir
create mask = 0664
directory mask = 0775
public = yes
writable = yes
read only = no

加密码可读写

创建用户:

useradd share -M -p 1234567
pdbedit -a -u share

配置:

[root@localhost cc]# vim /etc/samba/smb.conf
……
[asset]
comment = public
path = /home/asset
create mask = 0777
directory mask = 0777
public = no
writable = yes
create mode = 0777
valid users = share
write list = share
writable = yes
force create mode = 0777
directory mode = 0777
force directory mode = 0777
share modes = yes
……

Centos7 samba配置的更多相关文章

  1. centos7 samba配置完成后不管怎么登陆都会显示密码错误的解决方案

    添加系统用户 useradd samba 添加samba用户 smbpasswd -a samba 激活samba用户 smbpasswd -e samba 1.win+r运行secpol.msc打开 ...

  2. Centos7 -samba服务配置

    Centos7 -samba服务配置 https://blog.csdn.net/zh515858237/article/details/76914905 http://blog.51cto.com/ ...

  3. debian下samba配置

    debian下samba配置  http://blog.chinaunix.net/uid-2282111-id-2113216.html 服务器端配置过程:1. apt-get install sa ...

  4. Centos7网络配置,vsftpd安装及530报错解决

    今天在虚拟机安装CentOS7,准备全新安装LTMP,结果又是一堆问题,不过正好因为这些出错,又给自己长了见识. 1,CentOS7网络配置 最小化安装CentOs7后,ifconfig提示comma ...

  5. Centos7安装配置gitlab

    Centos7安装配置gitlab 这篇文字我会介绍在Centos7上安装gitlab,配置gitlab的smtp,并且创建项目demo. sudo yum install openssh-serve ...

  6. VMware中安装CentOS7网络配置静态IP地址,常用配置和工具安装

    VMware中安装CentOS7网络配置静态IP地址,常用配置和工具安装在阿里云开源镜像地址下载镜像Index of /centos/7.2.1511/isos/x86_64/http://mirro ...

  7. centos7初步配置

    centos7初步配置 首先安装lrzsz zip/unzip yum -y install lrzsz yum -y install zip unzip 安装vim yum install vim* ...

  8. centos7网络配置总结

    centos7网络配置 --wang 一.通过配置文件 配置/etc/sysconfig/network-scripts/en.. 记忆信息量大,易出错,不推荐使用.配置多台电脑静态ip可以通过复制模 ...

  9. CentOS7基本配置一

    CentOS7基本配置一 安装VMwareTools 1.点击重新安装VM-tool, 继而找到压缩文件VMwareTools-10.2.0...tar.gz,复制到桌面下,解压这么压缩文件到桌面下 ...

随机推荐

  1. Shell:

    Bash Notes for professionals ebook https://blog.csdn.net/simple_the_best/article/details/52821136 27 ...

  2. node fs相对路径

    如果在js里面使用了node.js的fs,在传入path参数时,如果使用相对路径,按照根目录的层级就是用就好. 比如:目录结构为: a -b -c -c1.js d 在c1.js中调用时,如果需要使用 ...

  3. 【JSP】${pageContext.request.contextPath}

    取出部署的应用程序名或者是当前的项目名称 http://localhost:8080/demo1/a.jsp  ${pageContext.request.contextPath}或<%=req ...

  4. ios、安卓的兼容性

    日期转换成时间戳: 安卓下可以使用 Date.parse(new Date('2019-11-18 12:00:00')) 直接转换,结果为 1574049600000 ios下 Date.parse ...

  5. [LeetCode] 337. House Robber III 打家劫舍之三

    The thief has found himself a new place for his thievery again. There is only one entrance to this a ...

  6. JAVA SE11环境变量配置(Windows)

    附上:03. 安装环境:Windows · IntelliJ IDEA Tutorial 附上:使用调试功能进行 Java debug 附上:Linux(Deepin)下配置java8 - L1412 ...

  7. 树形DP(超详细!!!)

    一.概念 1.什么是树型动态规划 树型动态规划就是在“树”的数据结构上的动态规划,平时作的动态规划都是线性的或者是建立在图上的,线性的动态规划有二种方向既向前和向后,相应的线性的动态规划有二种方法既顺 ...

  8. [转载]3.15 UiPath图片操作保存图片的介绍和使用

    一.保存图像 (Save Image)的介绍 可以将图像保存到磁盘的一种活动 二.保存图像 (Save Image)在UiPath中的使用 1.打开设计器,在设计库中新建一个Sequence,为序列命 ...

  9. mtd-utils编译安装过程

    git clone git://git.infradead.org/mtd-utils.git cd mtd-utils apt install -y libssl-dev libzlb libzst ...

  10. python 爬取媒体文件(使用chrome代理,启动客户端,有防火墙)

    #coding = utf-8 ''' 中文转经纬度 ''' import time,json import urllib.request from selenium import webdriver ...