Samba (smb.conf)
Exemplo de configuração do Samba
Categoria: Samba
Software: Samba
[ Hits: 14.789 ]
Por: Perfil removido
Exemplo de configuração do Samba com lixeira em cada compartilhamento (individual, pois assim é possível disponibilizar a lixeira para os usuários do respectivo grupo compartilhamento).
Para auditoria funcionar, não esqueça de acrescentar a seguinte linha ao arquivo /etc/syslog.conf ou /etc/rsyslog.conf (caso seu sistema use o rsyslog):
local5.alert -/var/log/samba/auditoria.log
É simples, mas o que vale é a intenção de colaborar. Até +
[global] name resolve order = wins bcast hosts netbios name = servidor-pdc workgroup = dominio time server = yes security = user map to guest = Bad User os level = 100 wins support = yes server string = Ubuntu Server # hosts allow = 192.168.0.0/255.255.255.0 # remote announce = 192.168.0.255/dominio winbind use default domain = yes winbind enum users = yes winbind enum groups = yes idmap uid = 10000-20000 idmap uid = 10000-20000 winbind uid = 10000-20000 winbind gid = 10000-20000 template shell = /bin/false passwd chat debug = yes unix password sync = yes username map = /etc/samba/smbusers passdb backend = tdbsam admin users = @sysadmin unix password sync = yes domain logons = yes domain master = yes preferred master = yes local master = yes log level = 3 max log size = 1000 log file = /var/log/samba/log.%m passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . add machine script = /usr/sbin/useradd -s /bin/false -d /var/lib/nobody -g maquinas %u add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u delete user script = /usr/sbin/userdel %u #shutdown script = /home/samba/bin/shutdown %m %t %r %f add group script = /usr/sbin/groupadd %g set primary group script = /usr/sbin/usermod -g %g %u add user to group script = /usr/sbin/usermod -G %g %u delete group script = /usr/sbin/groupdel %g message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' & #dfree command = /home/samba/bin/dfree.sh # include = /home/samba/etc/smb.conf.%m printing = CUPS printcap name = CUPS cups options = "raw media=a4" load printers = yes unix extensions = yes unix charset = UTF8 display charset = cp850 socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 logon script = KIX32.exe netlogon.kix logon home = \\%L\profiles\%U logon path = \\%L\profiles\%U logon drive = U: template homedir = /home/%U usershare prefix allow list = /home /srv /media usershare prefix deny list = /etc /dev /root /proc csc policy = disable enable privileges = yes hide files = /desktop.ini/outlook*.lnk/*Briefcase*/ veto files = /*Security*/*.tmp/*root*/.AppleDouble/.bin/.AppleDesktop/Network Trash Folder/ #======================= Lixeira ======================= recycle:directory_mode = 0770 recycle:exclude = *.tmp, *.temp, *.ldb, *.o, *.obj, ~*.*, *.bak recycle:exclude_dir = tmp, temp, cache recycle:facility = LOCAL1 recycle:keeptree = Yes recycle:maxsize = 10000000 recycle:noversions = .ppt|*.dcl recycle:priority = NOTICE recycle:subdir_mode = 0770 recycle:touch = True recycle:versions = Yes #======================= Shares ======================== [printers] comment = All Printers browseable = no path = /var/spool/samba printable = yes valid users = @publico writable = yes create mode = 777 write list = @sysadmin [print$] comment = Printer Drivers path = /var/lib/samba/printers admin users = @sysadmin @lpadmin write list = @sysadmin read list = @publico [PDF] comment = Impressora PDF ( cups-pdf ) path = /var/spool/samba read only = No create mask = 0770 printable = Yes printer name = PDF ; oplocks = No admin users = @sysadmin write list = @sysadmin read list = @publico [homes] comment = Home (Diretorio Pessoal) valid users = %S read only = no browsable = no create mode = 0700 veto files = /*.wmv/*.wav/*.mp3/*.vob/*.mov/*.iso/*.nrg/ vfs objects = recycle recycle:repository = /home/%U/.Lixeira vfs objects = full_audit full_audit:facility = LOCAL5 full_audit:failure = close closedir mkdir open opendir rename rmdir write full_audit:prefix = %U|%I|%P full_audit:priority = ALERT full_audit:success = close mkdir open rename rmdir write [netlogon] comment = Servico de logon path = /home/samba/netlogon guest ok = yes browseable = no admin users = @sysadmin write list = @sysadmin vfs objects = recycle recycle:repository = /home/samba/netlogon/.Lixeira/%U vfs objects = full_audit full_audit:facility = LOCAL5 full_audit:failure = close closedir mkdir open opendir rename rmdir write full_audit:prefix = %U|%I|%P full_audit:priority = ALERT full_audit:success = close mkdir open rename rmdir write #root preexec = /home/samba/bin/powerlogon.sh %I %m %a %U %G [profiles] comment = Network Profiles Service path = /home/samba/profiles/%U read only = No store dos attributes = Yes create mask = 0600 directory mask = 0700 hide files = /desktop.ini/outlook*.lnk/*Briefcase* browseable = no vfs objects = recycle recycle:repository = /home/samba/profiles/.Lixeira/%U vfs objects = full_audit full_audit:facility = LOCAL5 full_audit:failure = close closedir mkdir open opendir rename rmdir write full_audit:prefix = %U|%I|%P full_audit:priority = ALERT full_audit:success = close mkdir open rename rmdir write [apps] comment = Aplicativos globais path = /home/samba/apps guest ok = yes browseable = no create mask = 0775 directory mask = 0775 admin users = @sysadmin write list = @sysadmin read list = @users [setup] comment = Executáveis de instalação path = /home/samba/setup browseable = no create mask = 0775 directory mask = 0775 admin users = @sysadmin write list = @sysadmin read list = @sysadmin [financeiro] comment = Dados do Departamento Financeiro path = /home/samba/dados/financeiro browseable = yes writable = yes read only = no create mask = 0770 directory mask = 0770 admin users = @financeiro write list = @financeiro read list = @financeiro vfs objects = recycle recycle:repository = /home/samba/dados/.Lixeira/%U vfs objects = full_audit full_audit:facility = LOCAL5 full_audit:failure = close closedir mkdir open opendir rename rmdir write full_audit:prefix = %U|%I|%P full_audit:priority = ALERT full_audit:success = close mkdir open rename rmdir write [gerencia] comment = Dados da Equipe de Gerentes path = /home/samba/dados/gerencia browseable = yes writable = yes read only = no create mask = 0770 directory mask = 0770 admin users = @gerencia write list = @gerencia read list = @gerencia vfs objects = recycle recycle:repository = /home/samba/dados/.Lixeira/%U vfs objects = full_audit full_audit:facility = LOCAL5 full_audit:failure = close closedir mkdir open opendir rename rmdir write full_audit:prefix = %U|%I|%P full_audit:priority = ALERT full_audit:success = close mkdir open rename rmdir write [comercial] comment = Dados da Equipe de Vendas path = /home/samba/dados/comercial browseable = yes writable = yes read only = no create mask = 0770 directory mask = 0770 admin users = @comercial write list = @comercial read list = @comercial vfs objects = recycle recycle:repository = /home/samba/dados/.Lixeira/%U vfs objects = full_audit full_audit:facility = LOCAL5 full_audit:failure = close closedir mkdir open opendir rename rmdir write full_audit:prefix = %U|%I|%P full_audit:priority = ALERT full_audit:success = close mkdir open rename rmdir write [marketing] comment = Dados da Equipe de Marketing path = /home/samba/dados/marketing browseable = yes writable = yes read only = no create mask = 0770 directory mask = 0770 admin users = @marketing write list = @marketing read list = @marketing vfs objects = recycle recycle:repository = /home/samba/dados/.Lixeira/%U vfs objects = full_audit full_audit:facility = LOCAL5 full_audit:failure = close closedir mkdir open opendir rename rmdir write full_audit:prefix = %U|%I|%P full_audit:priority = ALERT full_audit:success = close mkdir open rename rmdir write
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
Não to conseguindo resolver este problemas ao instalar o playonelinux (1)
Excluir banco de dados no xampp (1)
[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