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

  • 相关阅读:
    *args和**kwargs
    事件驱动模型
    同步异步和阻塞非阻塞
    多进程和多线程
    认识tornado(五)
    认识tornado(四)
    认识tornado(三)
    [GO]使用select实现超时
    [GO]使用select实现斐波那契
    [GO]ticker的使用
  • 原文地址:https://www.cnblogs.com/yubo/p/2091884.html
Copyright © 2011-2022 走看看