zoukankan      html  css  js  c++  java
  • samba共享修改匿名用户为非nobody

    samba共享修改匿名用户为非nobody


    1)linux的samba用户,如果开启匿名用户登陆共享权限,security 设置为 share ,配置如下:
    [root@centos69:~]$grep  "^[^#^;]" /etc/samba/smb.conf  
    [global]
            workgroup = workgroup
            server string = centos69
            # logs split per machine
            # max 50KB per log file, then rotate
            security = share
            #passdb backend = tdbsam
            guest account = asterisk
            # the login script name depends on the machine name
            # the login script name depends on the unix user used
            # disables profiles support by specifing an empty path
            #load printers = no
            #cups options = raw
            #obtain list of printers automatically on SystemV
    [wjj]
            comment = wjj
            path = /web/wjj.cc
            browseable = yes
            writable = yes
            guest ok = yes
    [lch]
            comment = lch
            path = /web/lch.cc
            browseable = yes
            writable = yes
            guest ok = yes
    [zy]
            comment = zy
            path = /web/zy.cc
            browseable = yes
            writable = yes
            guest ok = yes
    [root@centos69:~]$


    如果上面的配置没有 “guest account = asterisk”这行,那么默认用户就是 nobody,就是说windows客户端上载文件到linux samba共享文件夹后,文件夹的属主权限就都是 nobody用户。有时候需要用户为asterisk,那么就需要增加这行就行了。

    2) 当有客户端连接的时候,你也可以看到连接的时候,samba派生出了一个asterisk用户的进程
    [root@centos69:~]ps -ef|grep smb       
    root      2917     1  0 11:45 ?        00:00:00 smbd -D
    root      2922  2917  0 11:45 ?        00:00:00 smbd -D
    asterisk  2930  2917  0 11:45 ?        00:00:02 smbd -D
    root      3003  1221  0 11:55 pts/0    00:00:00 grep smb
    [root@centos69:~]$
    那么此进程上载的文件,属组肯定就是asterisk ,而不是默认的nobody了。

  • 相关阅读:
    jsp大文件(视频)上传问题
    python多版本的pip共存问题解决办法
    buntu系统安装rpm包的方法
    如何查看linux是32位还是64位
    python的if else
    python获取列表唯一值
    python列表转数组
    python文件操作write与writelines的区别
    python中字符串str的strip()方法
    ubuntu16.04安装cloudcompare及打开方法
  • 原文地址:https://www.cnblogs.com/voiphudong/p/3240274.html
Copyright © 2011-2022 走看看