Samba (smb.conf)
Samba PDC com lixeira de rede (comentado)
Categoria: Samba
Software: Samba
[ Hits: 19.852 ]
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
Compartilhando a tela do Computador no Celular via Deskreen
Como Configurar um Túnel SSH Reverso para Acessar Sua Máquina Local a Partir de uma Máquina Remota
Configuração para desligamento automatizado de Computadores em um Ambiente Comercial
Como renomear arquivos de letras maiúsculas para minúsculas
Imprimindo no formato livreto no Linux
Vim - incrementando números em substituição
Efeito "livro" em arquivos PDF
Como resolver o erro no CUPS: Unable to get list of printer drivers
Excluir banco de dados no xampp (1)
phpmyadmin não abre no xampp (2)
[Python] Automação de scan de vulnerabilidades
[Python] Script para analise de superficie de ataque
[Shell Script] Novo script para redimensionar, rotacionar, converter e espelhar arquivos de imagem
[Shell Script] Iniciador de DOOM (DSDA-DOOM, Doom Retro ou Woof!)
[Shell Script] Script para adicionar bordas às imagens de uma pasta