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. LeetCode24-Swap_Pairs

    swapPairs public ListNode swapPairs(ListNode head) { if(head==null ||head.next==null) return head; L ...

  2. Bandit

    CSE599:online and adaptive machine learning Lecture 3:Stochastic Multi-Armed Bandits, Regret Minimiz ...

  3. Associatively Segmenting Instances and Semantics in Point Clouds

    论文引入一个简单且灵活的框架同时分割点云中的实例和语义,进一步提出两种方法让两个任务从彼此受益. 代码: https://github.com/WXinlong/ASIS 论文: https://ar ...

  4. thymeleaf实现热部署

    热部署可以在修改页面之后,不重新启动服务器也能查看修改效果. 1.导入依赖,我用的是gradle,使用maven的可以去https://mvnrepository.com/寻找对应的依赖 compil ...

  5. 关于对STL容器重载运算符的问题

    注意:下文中vector数组指的是每个数组元素都是一个vector的数组 大部分有序STL容器都重载了小于号,且比较方式是对容器中元素进行字典序比较. 此时如果你写\(bool\ operator&l ...

  6. [LeetCode] 126. Word Ladder II 词语阶梯之二

    Given two words (beginWord and endWord), and a dictionary's word list, find all shortest transformat ...

  7. Mysql遇到的问题总结

    1.解决导出csv中文乱码问题: 将csv用txt打开,另存为,选择utf8编码即可. 解决导入问题: mysql安装目录下的my.ini,增加如下参数: [client]default-charac ...

  8. C#用mouse_event模拟鼠标点击的问题

    1.首先添加using System.Runtime.InteropServices; 2.为鼠标添加模拟点击的各种参数 //鼠标事件  因为我用的不多,所以其他参数没有写 1 2 3 4 5 6 7 ...

  9. HTML连载28-标签的权重

    一.什么是优先级的权重 1.作用:当多个选择器混合在一起的时候,我们可以通过计算权重来判断谁的优先级最高. 2.权重的计算规则 公共代码: <body> <div id=" ...

  10. HashMap 源码分析 基于jdk1.8分析

    HashMap 源码分析  基于jdk1.8分析 1:数据结构: transient Node<K,V>[] table;  //这里维护了一个 Node的数组结构: 下面看看Node的数 ...