samba server  设置
yum install samba.x86_64
systemctl start smb.service
systemctl enable smb.service

samba 使用系统用户共享(用户家目录  )
useradd -s /sbinlogin dafei
pdbedit -a dafei
useradd -s /sbinlogin xiaofu
pdbedit -a xiaofu
pdbedit -L #列出smb用户
pdbedit -x xiaofu #删除用户
smbpasswd sifei  #修改smb用户密码
systemctl restart smb.service
setsebool -P samba_enable_home_dirs on
pdbedit -c "[D]" -u tiantian && systemctl restart smb.service
pdbedit -c "[]" -u tiantian && systemctl restart smb.service

windows客户端直接使用uri路径访问即可。
\\192.168.1.27
net use * /delete  #清空windows缓存 

设置samba共享目录:
1 规划目录路径
mkdir /public
chown nobody:nobody /public

2 vi /etcmba/smb.conf  #参考书213页
[public]
comment = Public Stuff
path = /public/
public = yes
writable = yes
printable = no

    [pub2]
        comment = Public Stuff
        path = /pub2
        browseable = no
        public = yes
        writable = yes
        printable = no

semanage fcontext -a -t public_content_rw_t "/public"
restorecon -F -R -v /public/   #查看目录上下文的修改
ll -Z /public/ -d   #查看目录上下文的修改
setsebool -P smbd_anon_write 1  #设置匿名用户可写布尔值

samba server 设置的更多相关文章

  1. [转]Android与电脑局域网共享之:Samba Server

    大家都有这样的经历,通过我的电脑或网上邻居访问另一台计算机上的共享资源,虽然电脑和手机之间可以有多种数据传输方式,但通过Windows SMB方式进行共享估计使用的人并不是太多,下面我就简单介绍一下, ...

  2. The Guideline of Setting Up Samba Server on linux(Ubuntu)

    The Guideline of Setting Up Samba Server on linux(Ubuntu) From terminate command window, install the ...

  3. CentOS 7 samba server 配置

    samba是linux上的文件共享服务软件,相当与Windows上的共享文件夹,当然也是要在同一网段上的. 当前用的版本是4.4.4,好吧!下面介绍怎么去安装配置它,here we go! 1. 安装 ...

  4. samba server install

    要求: create vnc service for win7 access it via vnc viewer. 1TB disk for this Centos PC is used as Sam ...

  5. ubuntu server设置时区和更新时间

    ubuntu server设置时区和更新时间 今天测试时,发现时间不对,查了一下时区: data -R    结果时区是:+0000 我需要的是东八区,这儿显示不是,所以需要设置一个时区   一.运行 ...

  6. 浅谈:SAMBA配置设置

      通过以下命令安装samba: yum install -y samba samba拥有三个服务,分别是: smbd 提供文件及打印共享功能,使用139.445端口 nmbd 提供NetBIOS支持 ...

  7. Samba: Server setup..

    To make samba shard folder permission clear, there are 3 kind of permission need to be paid attentio ...

  8. 【MSSQL】SQL Server 设置用户只能查看并访问特定数据库

    #背景 SQL Server实例上有多个服务商的数据库,每个数据库要由各自的服务商进行维护, 为了限定不同服务商商的维护人员只能访问自己的数据库,且不能看到其他服务商的数据库,现需要给各个服务商商限定 ...

  9. How to configure Samba Server share on Debian 9 Stretch Linux

    Lubos Rendek Debian 13 June 2017 Contents 1. Objective 2. Operating System and Software Versions 3.  ...

随机推荐

  1. 当页面加载完成时,JQ触发添加页面的元素的事件触发不了。。

    有下代码可知: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default. ...

  2. 《JavaScript网页经典特效300例》

    <JavaScript网页经典特效300例> 基础篇 进阶篇 高级篇

  3. 30分钟学习sea.js使用指南

    : seajs如何解决? ①引入sea.js的库 <script src="../sea/sea.js" ></script> ②如何变成模块? defin ...

  4. 利用Paramiko模块远程连接Linux

    使用Paramiko模块模拟SSH远程连接到服务器,并执行命令.(支持Tab键补全) 1.安装相关模块: 1)安装 Crypto 模块: 下载源码包解压 安装: sudo python setup.p ...

  5. 2016 Vultr VPS最新优惠码,赠送新用户70美元,亲测有效

    vultr肯定疯了,从来没有哪家海外vps像vultr那么大力度的优惠.近期,vultr vps再度推出优惠码,任何新用户注册即送20美元!要知道,vultr vps最便宜的vps套餐只要5美元/月, ...

  6. Dylans loves numbers

    Problem Description Who is Dylans?You can find his ID in UOJ and Codeforces. His another ID is s1451 ...

  7. c#中命令copy已退出,返回值为1

    c#中命令copy已退出,返回值为1 本正经的道:董姐刚才你说的修心养性其中的'修心'我 有孕在身刚好由戴梦瑶顶替了她的位置按照的指示 ╋旆呆 湎术葶页 邾箕砜笳 烦璜卿廑 奶奶个腿儿的等下次非让你 ...

  8. python 在mongo 中建立索引

    import pymongo mongo = pymongo.Connection('localhost') collection = mongo['database']['user'] collec ...

  9. linux重要目录说明

    1 home :root用户的home 目录是root,普通用户的home 目录是/home,users/(不要随便使用root权限,小白容易改错东西哒) 2 bin:常用可执行文件:/bin./us ...

  10. STL容器小结

     1.空间分配器 std::alloc用于容器中内存空间的分配和释放,以及分配内存的管理.construct().destroy()等全局函数用于为对象的构造和析构. 2.迭代器和trains 迭代器 ...