Samba (smb.conf)

Samba PDC com lixeira de rede (comentado)

Categoria: Samba

Software: Samba

[ Hits: 19.887 ]

Por: Nélio Soares de Freitas


smb.conf comentado ajustado para funcionar como PDC com suporte a lixeira de rede e auditoria de logs para facilitar a vida da galera.


#############################################
# CONFIGURAÇÕES DO DOMÍNIO
#############################################
[global]
        workgroup = DOMINIO
        server string = Servidor
        netbios name = SERVIDOR
        interfaces = lo eth0 192.168.0.0/24
        hosts allow = 127. 192.168.12. 192.168.13.
        remote announce = 192.168.0.255/DOMINIO
        ntlm auth = yes
        lanman auth = yes
        obey pam restrictions = yes
        admin users = @admin

#############################################
# CONFIGURAÇÕES DO PDC
#############################################
        log level = 0 vfs:10
        log file = /var/log/samba/log.%m
        max log size = 50
        security = user
        passdb backend = tdbsam:/etc/samba/db/passdb.tdb
        domain master = yes
        domain logons = yes
;       logon script = %m.bat
        logon script = %U.bat
;       logon path = \\%L\Profiles\%u
        logon path =
        logon drive = H:
;       add user script = /usr/sbin/useradd "%u" -n -g users
;       add group script = /usr/sbin/groupadd "%g"
        add machine script = /usr/sbin/useradd -g machines -c "Computador (%u)" -d /nohome -s /bin/false "%u"
;       delete user script = /usr/sbin/userdel "%u"
;       delete user from group script = /usr/sbin/userdel "%u" "%g"
;       delete group script = /usr/sbin/groupdel "%g"
        local master = yes
        os level = 33
        preferred master = yes
        wins support = yes
;       wins server = w.x.y.z
;       wins proxy = yes
;       dns proxy = yes

#############################################
# CONFIGURAÇÕES DE IMPRESSAO
#############################################
;       load printers = yes
;       cups options = raw
;       printcap name = /etc/printcap
;       printcap name = lpstat
;       printing = cups

#############################################
# CONFIGURAÇÕES DO FILESYSTEM
#############################################
;
;       map hidden = no
;       map read only = no
;       map system = no
;       store dos attributes = yes

#############################################
# CARREGAMENTO DE MODULOS EXTRAS
#############################################

        vfs objects = recycle extd_audit


#############################################
# CONFIGURAÇÕES DO LIXEIRA DE REDE
#############################################
        recycle:exclude = *.tmp *.temp *.o *.obj ~$*
        recycle:keeptree = True
        recycle:touch = True
        recycle:versions = True
        recycle:noversions = .doc|.xls|.ppt|.docx|.xlsx
        recycle:repository = .recycle
        recycle:maxsize = 0
        recycle:directory_mode = 0770
        recycle:subdir_mode = 0770
;       recycle:force group = admin
;       create mask = 0770
;       directory mask = 0770
;       force group = admin

#############################################
# CONFIGURAÇÕES DE AUDITORIA
#############################################
        extd_audit:facility = local5
        extd_audit:priority = notice
        extd_audit:prefix = %u|%I|%S
        extd_audit:success = all
;       rename rmdir unlink
extd_audit:failure = none

;       full_audit:facility = LOCAL6
;       full_audit:priority = NOTICE
;       full_audit:success = mkdir, rmdir, open, close, read, write, rename, lock, unlink, connect, disconnect
;       full_audit:prefix = Usuario => %u - IP => %I - Máquina %m - Grupo %g e %G - Compartilhamento => %S
;       full_audit:failure = mkdir, rmdir, open, close, read, write, rename, lock, unlink, connect, disconnect


#############################################
# CONFIGURAÇÕES DO WINBIND
#############################################
        winbind use default domain = no
        idmap backend = tdb
        idmap gid = 10000-20000
        idmap uid = 10000-20000
;       idmap domains = ALLDOMAINS
        idmap config ALLDOMAINS:default = yes
        idmap config ALLDOMAINS:backend = tdb
        idmap config ALLDOMAINS:range   = 10000 - 50000
        idmap alloc backend = tdb
;       idmap alloc backend = ad
        idmap alloc config:range = 10000 - 50000


#############################################
# DEFINIÇÕES DOS COMPARTILHAMENTOS
#############################################
;[printers]
;       comment = All Printers
        path = /var/spool/samba
        browseable = no
        guest ok = yes
;       valid users %u
;       writable = no
        printable = yes
        public = yes

[netlogon]
        comment = Network Logon Service
        path = /home/netlogon
        guest ok = yes
;       writable = no
        public = no
;       browseable = yes
;       share modes = yes

[publico]
        comment = Arquivos de Acesso Publico
        path = /home/dados/publico
        browseable = no
        writeable = yes
        force create mode = 0777
        force directory mode = 0777
        force group = nogroup
        force user = nobody
        guest ok = yes

[grupo1]
        comment = Arquivos do Grupo 1
        path = /home/dados/grupo1
        browseable = no
        writable = yes
        force create mode = 0777
        force directory mode = 0777
        force user = nobody
        force group = grupo1
        valid users = +grupo1

[grupo2]
        comment = Arquivos do Grupo 2
        path = /home/dados/grupo2
        browseable = no
        writable = yes
        force create mode = 0777
        force directory mode = 0777
        force user = nobody
        force group = grupo2
        valid users = +grupo2
  


Comentários
[1] Comentário enviado por mcl085 em 07/09/2010 - 11:37h

Muito bom arquivo. Comentado e muito organizado. Vou testar!

[2] Comentário enviado por apchagas81 em 04/02/2011 - 14:10h

Concordo com o MCL085

Muito bom o arquivo, muito bem separado! Testando...

[3] Comentário enviado por igor.vinhote em 05/04/2011 - 12:47h

Excelente artigo!
Como faço para restaurar um arquivo excluído da rede?

[4] Comentário enviado por cainf em 31/05/2012 - 10:48h

Amigo duas perguntas, configurei o samba pdc e as estações XP estao entrando no dominio primeiro como faço para salvar o Desktop e meus documentos e como faço para que quando um user fazer logon o proxy ja ir configurado no navegador ??

Desde ja agradeço


Contribuir com comentário

  



Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts