zoukankan      html  css  js  c++  java
  • Set samba server on freeBSD

    1. server configuration

    Samba is configured in /usr/local/etc/smb4.conf.

    # touch /usr/local/etc/smb4.conf
    

    smb4.conf is as follows.

    [global]
    workgroup = WORKGROUP
    server string = Samba Server Version %v
    netbios name = ExampleMachine
    wins support = Yes
    security = user
    encrypt passwords = yes
    max log size = 500
    preferred master = yes
    hosts allow = 192.168.1.
    interfaces = em0
    bind interfaces only = yes
    socket options = TCP_NODELAY
    passdb backend = tdbsam
    
    # Example: share /path/to/share accessible only to 'test1' user
    [src]
    path = /usr/home/test1
    valid users = test1
    writable  = yes
    browsable = yes
    read only = no
    guest ok = no
    public = no
    create mask = 0666
    directory mask = 0755
    

    2. Add user to samba

    2.1 Add a new system user

    # adduser
    Username: test1
    ...
    

    2.2 Add the new system user(test1) as a samba user.

    # smbpasswd  -a test1 
    ...
    

    3. Start or stop samba

    To enable samba at boot time, add the following line to /etc/rc.conf:

    samba_server_enable="YES"
    

    To start samba now:

    # service samba_server start
    

    To stop samba:

    # service samba_server stop
    
  • 相关阅读:
    函数--第一类对象、闭包、
    递归
    局部变量 和 全局变量
    默认参数,不固定参数 *args,**kwargs
    函数基本语法及特性
    文件修改
    文件操作,重点,日常使用!!!
    集合
    重新写了一边三级菜单,加了一些自己的理解
    三级菜单
  • 原文地址:https://www.cnblogs.com/freedom-try/p/15430064.html
Copyright © 2011-2022 走看看