zoukankan      html  css  js  c++  java
  • Samba简单共享注意事项

    • 关闭防火墙
    • 关闭SELinux
    • 设置共享目录的访问权限为777
    • guest ok = yes and guest account = ftp要同时设置 //This user must exist in the password file, but does not require a valid login. The user account "ftp" is often a good choice for this parameter.
    • guest only没必要设,缺省guest only = no
    • 参考配置:

    security = share //should use security = share if you want to mainly setup shares without a password (guest shares)

    [hwlo
    -lib]

    comment
    = Public Stuff //This is a text field that is seen next to a share when a client does a queries the server

    path
    = /mnt/hwlo-lib //specifies a directory to which the user of the service is to be given access.

    ;public = yes //This parameter is a synonym for guest ok.

    writable
    = yes //Inverted synonym for read only. If this parameter is yes, then users of a service may create or modify files in the service's directory

    guest ok
    = yes //no password is required to connect to the service.

    browseable
    = yes //This controls whether this share is seen in the list of available shares in a net view and in the browse list

    NOTE ABOUT USERNAME/PASSWORD VALIDATION

    There are a number of ways in which a user can connect to a service. The server uses the following steps in determining if it will allow a connection to a specified service. If all the steps fail, the connection request is rejected. However, if one of the steps succeeds, the following steps are not checked.

    If the service is marked “guest only = yes”(Default: guest only = no. 'guest only' will have no effect if guest ok is not set for the service.) and the server is running with share-level security (“security = share”), steps 1 to 5 are skipped.

    1. If the client has passed a username/password pair and that username/password pair is validated by the UNIX system's password programs, the connection is made as that username. This includes the \\server\service%username method of passing a username.

    2. If the client has previously registered a username with the system and now supplies a correct password for that username, the connection is allowed.

    3. The client's NetBIOS name and any previously used usernames are checked against the supplied password. If they match, the connection is allowed as the corresponding user.

    4. If the client has previously validated a username/password pair with the server and the client has passed the validation token, that username is used.

    5. If a user = field is given in the smb.conf file for the service and the client has supplied a password, and that password matches (according to the UNIX system's password checking) with one of the usernames from the user = field, the connection is made as the username in the user = line. If one of the usernames in the user = list begins with a @, that name expands to a list of names in the group of the same name.

    6. If the service is a guest service, a connection is made as the username given in the guest account = for the service, irrespective of the supplied password.

    详细解释参考:http://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html

  • 相关阅读:
    Azure虚拟机部署Linux+PHP+Swoole
    [经验分享]OBS 如何实现多路推流
    SQL Server 中的登陆用户如何只看到指定的数据库
    NCF 数据库错位导致站点访问不了
    AutoIT+Selenium的使用
    2019年入职体检那些事
    Jmeter 针对工具类的每个方法进行测试
    Effective Jmeter:记录一些场景下有效的解决方案
    通过 Test Fragment + Module Controller 封装登录接口
    在setUp线程组中初始化全局工具类
  • 原文地址:https://www.cnblogs.com/yubo/p/2091884.html
Copyright © 2011-2022 走看看