Příklad konfiguračního souboru smb.conf

Standardni nastavení, které používám pro konfiguraci Samby (a pro zjednodušení dalších aktivit). V této konfiguraci není moc dalších nastavení, pouze základní optimalizace pro zvýšení výkonnosti a využívání služby LDP (nikoliv CUPS).
Omezení zde uvedená jsou na komunikační interface, adresu sítě a blokování přístupu k souborům desktop.ini a lost+found.

[global]
    workgroup = WORKGROUP
    netbios aliases = ALIAS
    server string = DESCRIPTION
    interfaces = lo0, INTERNAL_INTERFACE
    bind interfaces only = Yes
    null passwords = Yes
    send spnego principal = Yes
    syslog = 0
    log file = /var/log/samba/log.%m
    max log size = 1000
    max protocol = SMB2
    read raw = No
    max mux = 256
    name resolve order = host wins lmhosts bcast
    time server = Yes
    socket options = SO_KEEPALIVE TCP_NODELAY IPTOS_LOWDELAY IPTOS_THROUGHPUT SO_SNDBUF=131072 SO_RCVBUF=131072
    printcap name = /etc/printcap
    add user script = /usr/sbin/pw useradd -n %u
    delete user script = /usr/sbin/pw userdel -n %u
    add group script = /usr/sbin/pw groupadd -n %g
    delete group script = /usr/sbin/pw groupdel -n %g
    set primary group script = /usr/sbin/pw usermod -n %u -g %g
    add machine script = /usr/sbin/pw useradd -n %u -g machines -c Machine -s /usr/sbin/nologin
    logon script = netlogon.bat
    logon path = \\%N\netlogon
    logon drive = h:
    domain logons = Yes
    os level = 255
    preferred master = Yes
    domain master = Yes
    wins support = Yes
    ldap ssl = no
    default service = netlogon
    #remote announce = TCP.IP.AD.DR/WORKGROUP
    idmap config * : range =
    idmap config * : backend = tdb
    path = /var/spool/samba
    admin users = @ntadmin
    write list = root, @ntadmin
    inherit acls = Yes
    aio write behind = no
    max print jobs = 256
    locking = No
    oplocks = No
    level2 oplocks = No

[homes]
    comment = Home Directories
    read only = No
    create mask = 0775
    hosts allow = 192.168.0.0/16, 127.0.0.1
    veto files = lost+found
    hide files = /desktop.ini/Thumbs.db/
    browseable = No

[netlogon]
    comment = Network Logon Service
    path = /app/samba/netlogon
    read list = @users
    force user = samba
    force group = samba
    hosts allow = 192.168.0.0/16, 127.0.0.1

[share]
    comment = Shared data
    path = /samba/share
    username = @users
    valid users = @users
    write list = @ntadmin, @users
    force user = samba
    read only = No
    create mask = 0775
    veto files = lost+found
    hide files = /desktop.ini/Thumbs.db/

[profile]
    comment = User profiles
    path = /samba/profiles
    read only = No
    create mask = 0600
    directory mask = 0700
    browseable = No

<>/code

Powered by Drupal - Design by artinet