SlideShare a Scribd company logo
1 of 11
SAMBA 4 - Tutorial de Instalacao no Debian
Instalandopacotes
# apt-getinstall linux-sourcelinux-headers-$(uname -r) build-essential sshvimopenvpn
libreadline-devgitbuild-essentiallibattr1-devlibblkid-devlibgnutls28-devautoconfpython-
dev python-dnspythonlibacl1-devgdbpkg-configlibpopt-devlibldap2-devdnsutilsacl attr
libbsd-devdocbook-xsl libcups2-devkrb5-user
SetandopermissõesespeciaisdoAD
$ sudovim/etc/fstab
/dev/sdb1 /home xfs user_xattr,acl,barrier=1 1 1
# mount-oremount,rw/home
Testandopermissoesespeciais
# touchtest.txt
# setfattr-nuser.test-vtesttest.txt
# setfattr-nsecurity.test-vtest2test.txt
# getfattr-dtest.txt
# getfattr-nsecurity.test-dtest.txt
Se estivertudocorreto,oscomandosacima retornaraoessasrespostas,respectivamente:
# file:test.txt
user.test="test"
# file:test.txt
security.test="test2"
Instalandoe sincronizandoserviçode timercomPUCPR
# apt-getinstall ntpdate
# ntpdate ntp.pucpr.br
Setandohostname
# vim/etc/hostname
samba4
Setandoresolvedores
# vim/etc/resolv.conf
domainshark.net
searchshark.net
nameserver192.168.0.250
nameserver189.4.0.157 189.4.0.152
Setandoip
# vim/etc/network/interfaces
# The primarynetworkinterface
iface eth0inetstatic
address192.168.0.250
netmask255.255.255.0
gateway192.168.0.1
dns-nameservers192.168.0.250 189.4.0.157
dns-searchshark.net
Configurandooarquivo/etc/hosts
# vim/etc/hosts
127.0.0.1 localhost
127.0.1.1 samba4.shark.net samba4
192.168.0.250 samba4.shark.net samba4
# The followinglinesare desirable forIPv6capable hosts
::1 localhostip6-localhostip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
# wgethttp://ftp.samba.org/pub/samba/samba-4.1.16.tar.gz
# tar xvzf samba-4.1.16.tar.gz
# cd samba-4.1.16
# ./configure --prefix=/opt/samba --enable-debug --enable-selftest
# make
# make install
Solucaotemporariaparaexportarpath’sdo SAMBA4 compiladono/opt/samba
# exportPATH=$PATH:/opt/samba/bin/
Solucaodefinitivaparaexportarpath’sdoSAMBA4 no/opt/samba
# vim/etc/profile ( cole aofinal doarquivo)
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/samba/bin:/opt/samba
/sbin"
# . /etc/profile
RebootdoSO
# init6
Subindooserviço
# /opt/samba/sbin/samba
Ou apenas
# samba( apósexportaras path’s)
# psaux | grepsamba
Criandoo DominioAD
# /opt/samba/bin/samba-tooldomainprovision
Ou apenas
# samba-tool domainprovision( aposexportaraspath’s )
# Exemplode configuracaopara/etc/krb5.conf
[logging]
default= FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server=FILE:/var/log/kadmind.log
[libdefaults]
default_realm=shark.net
dns_lookup_realm=false
dns_lookup_kdc= true
ticket_lifetime=24h
renew_lifetime =7d
forwardable =true
[realms]
SHARK.NET= {
kdc = samba4.shark.net # ( aqui pode sero ip doServidor)
admin_server= samba4.shark.net
}
[domain_realm]
.shark.net= samba4.shark.net
shark.net= samba4.shark.net
Sobe SAMBA 4
# samba
Testandoo smb.conf
# testparm
# /opt/samba/bin/smbclient//localhost/netlogon -UAdministrator%'SUA_SENHA'-c"ls"
Consultandoclient:
# /opt/samba/bin/smbclient –version
# /opt/samba/bin/smbclient -Llocalhost-U%
VerificandozonaprimariacriadapeloSAMBA 4
# samba-tool dnszonelist127.0.0.1 --auto-U Administrator--password=SUA_SENHA
Criandozonade DNSreverso
# samba-tool dnszonecreate 127.0.0.1 0.168.192.in-addr.arpa -U Administrator--
password=SUA_SENHA
Verificandoazonareversa
# samba-tool dnszonelist127.0.0.1 --reverse -UAdministrator --password=SUA_SENHA
# verificarusabilidade
#AdicionandooRoteadordarede ao DNS
# samba-tool dnsadd192.168.0.1 0.168.192.in-addr.arpa 1 PTR roteador.shark.net -U
Administrator--password=SUA_SENHA
Desabilitandoacomplexidade de senhas
# samba-tool domainpasswordsettingsshow
# samba-tool domainpasswordsettingsset --complexity=off --history-length=0--min-pwd-
length=0--min-pwd-age=0
Relendoconfiguracoes
# /opt/samba/bin/smbcontrol all reload-config
Revisandousuarios
# /opt/samba/bin/samba-tooluserlist
# /opt/samba/bin/samba-toolusersetpasswordEduardo.charquero
Testandotiket
# kinitAdministrator@shark.net
# klist
Testandoo dominiocomdig
# digshark.net
Consultandokerberose ldap:
# dig-t srv_kerberos._tcp.shark.net
# dig-t srv_ldap._tcp.shark.net
# host-t A rwindows8
SetandoSAMBA 4 na inicializaçãodoSO
# vim/etc/init.d/samba
#! /bin/bash
### BEGIN INIT INFO
# Provides: samba
# Required-Start: $network $local_fs$remote_fs
# Required-Stop: $network $local_fs$remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description:start Samba daemons
### END INIT INFO
#
# Start/stopsthe Samba daemon (samba).
# Adapted from the Samba 3 packages.
#
SAMBAPID=/opt/samba/var/run/samba.pid
# clear conflicting settingsfrom the environment
unset TMPDIR
# See if the daemon and the config file are there
test -x /opt/samba/sbin -a -r /opt/samba/etc/ || exit 0
. /lib/lsb/init-functions
case "$1" in
start)
log_daemon_msg "Starting Samba 4 daemon" "samba"
if ! start-stop-daemon --start --quiet --oknodo --exec /opt/samba/sbin/samba -- -D; then
log_end_msg 1
exit 1
fi
log_end_msg 0
;;
stop)
log_daemon_msg "Stopping Samba 4 daemon" "samba"
start-stop-daemon --stop --quiet --name samba $SAMBAPID
# Wait a little and remove stale PID file
sleep 1
if [ -f $SAMBAPID ] && ! ps h `cat $SAMBAPID` > /dev/null
then
# Stale PID file (samba was succesfully stopped),
# remove it (should be removed by samba itself IMHO.)
rm -f $SAMBAPID
fi
log_end_msg 0
;;
restart|force-reload)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: /etc/init.d/samba {start|stop|restart|force-reload}"
exit 1
;;
esac
exit 0
Setandopermissão
# chmod+x /etc/init.d/samba
# update-rc.dsambadefaults
Criandoa pasta de perfismoveis
# mkdir/opt/samba/var/profiles
# chmod-R 1777 profiles
Criandoo Compartilhamento
# cd /home
# mkdir/Dados
# mkdir/Dados/Diretoria...Financeiro...Rh...Comercial...Publica...Tecnico...
Adicionandodiretóriosaosmb.conf
# vim/opt/samba/etc/smb.conf
# Global parameters
[global]
workgroup= shark
realm= samba4.shark.net
netbiosname = samba4
serverrole = active directorydomaincontroller
dns forwarder= 200.189.80.43
[netlogon]
path = /opt/samba/var/locks/sysvol/xirux.local/scripts
read only= No
[sysvol]
path = /opt/samba/var/locks/sysvol
read only= No
[profiles]
Path = /opt/samba/var/profiles
Readonly= no
[Dados]
path = /home/Dados
comment= CompartilhamentosdaRede
read only= No
[Diretoria]
path = /home/Dados/Diretoria
comment= Pasta Diretoria
read only= No
[Rh]
path = /home/Dados/Rh
comment= PastaRh
read only= No
[Financeiro]
path = /home/Dados/Financeiro
comment= PastaFinanceiro
read only= No
[Tecnico]
path = /home/Dados/Tecnico
comment= PastaTecnico
read only= No
[Comercial]
path = /home/Dados/Comercial
comment= PastaComercial
read only= No
[Publica]
path = /home/Dados/Publica
comment= PastaPublica
readonly= no
SetandopermissoesaosDiretorios
# chownroot:usersDados/ -R
# chmod770 /home/dados/ -R
# chownroot:users/opt/samba/var/profiles/ -R
# chmod770 /opt/samba/var/profiles
As demaisconfiguracoesrelativasacriacaode usuarios,gerenciamentode compartilhamentos
podeme devemserfeitospelasFerramentasde GerenciamentodoWindowsServer2008,
instaladosnoWindows7ou 8.
Os perfisMoveis;Basicamente,crieiumapastaem/opt/samba/profiles,apontei no
/opt/samba/etc/smb.conf e adicionei aoperfildousuárionoAD:
samba4profiles%USERNAME%
Eduardo Charquero
Tecnólogo em Redes de Computadores
Administrador de Sistemas Linux
Linux user & 529578
e-mail: eduardo.charquero@hotmail.com

More Related Content

What's hot

도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)
도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)
도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)Sam Kim
 
OSBConf 2015 | Backups with rdiff backup and rsnapshot by christoph mitasch &...
OSBConf 2015 | Backups with rdiff backup and rsnapshot by christoph mitasch &...OSBConf 2015 | Backups with rdiff backup and rsnapshot by christoph mitasch &...
OSBConf 2015 | Backups with rdiff backup and rsnapshot by christoph mitasch &...NETWAYS
 
agri inventory - nouka data collector / yaoya data convertor
agri inventory - nouka data collector / yaoya data convertoragri inventory - nouka data collector / yaoya data convertor
agri inventory - nouka data collector / yaoya data convertorToshiaki Baba
 
Make container without_docker_7
Make container without_docker_7Make container without_docker_7
Make container without_docker_7Sam Kim
 
Lecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administrationLecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administrationMohammed Farrag
 
3.1.c apend scripting, crond, atd
3.1.c apend   scripting, crond, atd3.1.c apend   scripting, crond, atd
3.1.c apend scripting, crond, atdAcácio Oliveira
 
Using cgroups in docker container
Using cgroups in docker containerUsing cgroups in docker container
Using cgroups in docker containerVinay Jindal
 
Ubuntu安装SVN总结
Ubuntu安装SVN总结Ubuntu安装SVN总结
Ubuntu安装SVN总结wensheng wei
 
Linux Capabilities - eng - v2.1.5, compact
Linux Capabilities - eng - v2.1.5, compactLinux Capabilities - eng - v2.1.5, compact
Linux Capabilities - eng - v2.1.5, compactAlessandro Selli
 
FreeBSD Jail Complete Example
FreeBSD Jail Complete ExampleFreeBSD Jail Complete Example
FreeBSD Jail Complete ExampleMohammed Farrag
 
2.1.using the shell
2.1.using the shell2.1.using the shell
2.1.using the shelldonv214
 
Really useful linux commands
Really useful linux commandsReally useful linux commands
Really useful linux commandsMichael J Geiser
 
Bundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMBundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMAlexander Shopov
 
MINCS - containers in the shell script (Eng. ver.)
MINCS - containers in the shell script (Eng. ver.)MINCS - containers in the shell script (Eng. ver.)
MINCS - containers in the shell script (Eng. ver.)Masami Hiramatsu
 

What's hot (20)

도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)
도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)
도커 없이 컨테이너 만들기 4편 네트워크네임스페이스 (2)
 
50 Most Frequently Used UNIX Linux Commands -hmftj
50 Most Frequently Used UNIX  Linux Commands -hmftj50 Most Frequently Used UNIX  Linux Commands -hmftj
50 Most Frequently Used UNIX Linux Commands -hmftj
 
OSBConf 2015 | Backups with rdiff backup and rsnapshot by christoph mitasch &...
OSBConf 2015 | Backups with rdiff backup and rsnapshot by christoph mitasch &...OSBConf 2015 | Backups with rdiff backup and rsnapshot by christoph mitasch &...
OSBConf 2015 | Backups with rdiff backup and rsnapshot by christoph mitasch &...
 
agri inventory - nouka data collector / yaoya data convertor
agri inventory - nouka data collector / yaoya data convertoragri inventory - nouka data collector / yaoya data convertor
agri inventory - nouka data collector / yaoya data convertor
 
Make container without_docker_7
Make container without_docker_7Make container without_docker_7
Make container without_docker_7
 
50 most frequently used unix
50 most frequently used unix50 most frequently used unix
50 most frequently used unix
 
Putting some "logic" in LVM.
Putting some "logic" in LVM.Putting some "logic" in LVM.
Putting some "logic" in LVM.
 
Lecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administrationLecture 3 Perl & FreeBSD administration
Lecture 3 Perl & FreeBSD administration
 
3.1.c apend scripting, crond, atd
3.1.c apend   scripting, crond, atd3.1.c apend   scripting, crond, atd
3.1.c apend scripting, crond, atd
 
Using cgroups in docker container
Using cgroups in docker containerUsing cgroups in docker container
Using cgroups in docker container
 
Ubuntu安装SVN总结
Ubuntu安装SVN总结Ubuntu安装SVN总结
Ubuntu安装SVN总结
 
Linux Capabilities - eng - v2.1.5, compact
Linux Capabilities - eng - v2.1.5, compactLinux Capabilities - eng - v2.1.5, compact
Linux Capabilities - eng - v2.1.5, compact
 
Lec7
Lec7Lec7
Lec7
 
FreeBSD Jail Complete Example
FreeBSD Jail Complete ExampleFreeBSD Jail Complete Example
FreeBSD Jail Complete Example
 
2.1.using the shell
2.1.using the shell2.1.using the shell
2.1.using the shell
 
Really useful linux commands
Really useful linux commandsReally useful linux commands
Really useful linux commands
 
Solaris
SolarisSolaris
Solaris
 
Bundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMBundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPM
 
MINCS - containers in the shell script (Eng. ver.)
MINCS - containers in the shell script (Eng. ver.)MINCS - containers in the shell script (Eng. ver.)
MINCS - containers in the shell script (Eng. ver.)
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
 

Similar to Samba 4 - debian instalacao

Install tomcat 5.5 in debian os and deploy war file
Install tomcat 5.5 in debian os and deploy war fileInstall tomcat 5.5 in debian os and deploy war file
Install tomcat 5.5 in debian os and deploy war fileNguyen Cao Hung
 
SANS @Night There's Gold in Them Thar Package Management Databases
SANS @Night There's Gold in Them Thar Package Management DatabasesSANS @Night There's Gold in Them Thar Package Management Databases
SANS @Night There's Gold in Them Thar Package Management DatabasesPhil Hagen
 
Piratte installation
Piratte installationPiratte installation
Piratte installationKampa Lavanya
 
Slug 2009 06 SELinux For Sysadmins
Slug 2009 06 SELinux For SysadminsSlug 2009 06 SELinux For Sysadmins
Slug 2009 06 SELinux For SysadminsPaulWay
 
NUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline TutorialNUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline TutorialGagah Arifianto
 
Install Archlinux in 10 Steps (Sort of) :)
Install Archlinux in 10 Steps (Sort of) :)Install Archlinux in 10 Steps (Sort of) :)
Install Archlinux in 10 Steps (Sort of) :)Sian Lerk Lau
 
Virtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + PuppetVirtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + PuppetOmar Reygaert
 
Slackware Demystified [SELF 2011]
Slackware Demystified [SELF 2011]Slackware Demystified [SELF 2011]
Slackware Demystified [SELF 2011]Vincent Batts
 
Introduction to linux day1
Introduction to linux day1Introduction to linux day1
Introduction to linux day1Gourav Varma
 
One-Liners to Rule Them All
One-Liners to Rule Them AllOne-Liners to Rule Them All
One-Liners to Rule Them Allegypt
 
Andresen 8 21 02
Andresen 8 21 02Andresen 8 21 02
Andresen 8 21 02FNian
 
Linux Troubleshooting
Linux TroubleshootingLinux Troubleshooting
Linux TroubleshootingKeith Wright
 
Supporting Debian machines for friends and family
Supporting Debian machines for friends and familySupporting Debian machines for friends and family
Supporting Debian machines for friends and familyFrancois Marier
 
Container Security
Container SecurityContainer Security
Container Securityamouat
 
Basic shell commands by Jeremy Sanders
Basic shell commands by Jeremy SandersBasic shell commands by Jeremy Sanders
Basic shell commands by Jeremy SandersDevanand Gehlot
 
Linux Du Jour
Linux Du JourLinux Du Jour
Linux Du Jourmwedgwood
 

Similar to Samba 4 - debian instalacao (20)

Install tomcat 5.5 in debian os and deploy war file
Install tomcat 5.5 in debian os and deploy war fileInstall tomcat 5.5 in debian os and deploy war file
Install tomcat 5.5 in debian os and deploy war file
 
SANS @Night There's Gold in Them Thar Package Management Databases
SANS @Night There's Gold in Them Thar Package Management DatabasesSANS @Night There's Gold in Them Thar Package Management Databases
SANS @Night There's Gold in Them Thar Package Management Databases
 
Piratte installation
Piratte installationPiratte installation
Piratte installation
 
Slug 2009 06 SELinux For Sysadmins
Slug 2009 06 SELinux For SysadminsSlug 2009 06 SELinux For Sysadmins
Slug 2009 06 SELinux For Sysadmins
 
Rpm Introduction
Rpm IntroductionRpm Introduction
Rpm Introduction
 
NUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline TutorialNUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline Tutorial
 
Install Archlinux in 10 Steps (Sort of) :)
Install Archlinux in 10 Steps (Sort of) :)Install Archlinux in 10 Steps (Sort of) :)
Install Archlinux in 10 Steps (Sort of) :)
 
Linux Command Line
Linux Command LineLinux Command Line
Linux Command Line
 
Virtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + PuppetVirtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + Puppet
 
Slackware Demystified [SELF 2011]
Slackware Demystified [SELF 2011]Slackware Demystified [SELF 2011]
Slackware Demystified [SELF 2011]
 
Introduction to linux day1
Introduction to linux day1Introduction to linux day1
Introduction to linux day1
 
Unix tips and tricks
Unix tips and tricksUnix tips and tricks
Unix tips and tricks
 
One-Liners to Rule Them All
One-Liners to Rule Them AllOne-Liners to Rule Them All
One-Liners to Rule Them All
 
Andresen 8 21 02
Andresen 8 21 02Andresen 8 21 02
Andresen 8 21 02
 
Linux Troubleshooting
Linux TroubleshootingLinux Troubleshooting
Linux Troubleshooting
 
Supporting Debian machines for friends and family
Supporting Debian machines for friends and familySupporting Debian machines for friends and family
Supporting Debian machines for friends and family
 
Container Security
Container SecurityContainer Security
Container Security
 
Basic shell commands by Jeremy Sanders
Basic shell commands by Jeremy SandersBasic shell commands by Jeremy Sanders
Basic shell commands by Jeremy Sanders
 
Centos config
Centos configCentos config
Centos config
 
Linux Du Jour
Linux Du JourLinux Du Jour
Linux Du Jour
 

Recently uploaded

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 

Recently uploaded (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 

Samba 4 - debian instalacao

  • 1. SAMBA 4 - Tutorial de Instalacao no Debian Instalandopacotes # apt-getinstall linux-sourcelinux-headers-$(uname -r) build-essential sshvimopenvpn libreadline-devgitbuild-essentiallibattr1-devlibblkid-devlibgnutls28-devautoconfpython- dev python-dnspythonlibacl1-devgdbpkg-configlibpopt-devlibldap2-devdnsutilsacl attr libbsd-devdocbook-xsl libcups2-devkrb5-user SetandopermissõesespeciaisdoAD $ sudovim/etc/fstab /dev/sdb1 /home xfs user_xattr,acl,barrier=1 1 1 # mount-oremount,rw/home Testandopermissoesespeciais # touchtest.txt # setfattr-nuser.test-vtesttest.txt # setfattr-nsecurity.test-vtest2test.txt # getfattr-dtest.txt # getfattr-nsecurity.test-dtest.txt Se estivertudocorreto,oscomandosacima retornaraoessasrespostas,respectivamente: # file:test.txt user.test="test" # file:test.txt security.test="test2" Instalandoe sincronizandoserviçode timercomPUCPR # apt-getinstall ntpdate # ntpdate ntp.pucpr.br
  • 2. Setandohostname # vim/etc/hostname samba4 Setandoresolvedores # vim/etc/resolv.conf domainshark.net searchshark.net nameserver192.168.0.250 nameserver189.4.0.157 189.4.0.152 Setandoip # vim/etc/network/interfaces # The primarynetworkinterface iface eth0inetstatic address192.168.0.250 netmask255.255.255.0 gateway192.168.0.1 dns-nameservers192.168.0.250 189.4.0.157 dns-searchshark.net Configurandooarquivo/etc/hosts # vim/etc/hosts 127.0.0.1 localhost 127.0.1.1 samba4.shark.net samba4 192.168.0.250 samba4.shark.net samba4
  • 3. # The followinglinesare desirable forIPv6capable hosts ::1 localhostip6-localhostip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters # wgethttp://ftp.samba.org/pub/samba/samba-4.1.16.tar.gz # tar xvzf samba-4.1.16.tar.gz # cd samba-4.1.16 # ./configure --prefix=/opt/samba --enable-debug --enable-selftest # make # make install Solucaotemporariaparaexportarpath’sdo SAMBA4 compiladono/opt/samba # exportPATH=$PATH:/opt/samba/bin/ Solucaodefinitivaparaexportarpath’sdoSAMBA4 no/opt/samba # vim/etc/profile ( cole aofinal doarquivo) PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/samba/bin:/opt/samba /sbin" # . /etc/profile RebootdoSO # init6 Subindooserviço # /opt/samba/sbin/samba Ou apenas # samba( apósexportaras path’s)
  • 4. # psaux | grepsamba Criandoo DominioAD # /opt/samba/bin/samba-tooldomainprovision Ou apenas # samba-tool domainprovision( aposexportaraspath’s ) # Exemplode configuracaopara/etc/krb5.conf [logging] default= FILE:/var/log/krb5libs.log kdc = FILE:/var/log/krb5kdc.log admin_server=FILE:/var/log/kadmind.log [libdefaults] default_realm=shark.net dns_lookup_realm=false dns_lookup_kdc= true ticket_lifetime=24h renew_lifetime =7d forwardable =true [realms] SHARK.NET= { kdc = samba4.shark.net # ( aqui pode sero ip doServidor) admin_server= samba4.shark.net }
  • 5. [domain_realm] .shark.net= samba4.shark.net shark.net= samba4.shark.net Sobe SAMBA 4 # samba Testandoo smb.conf # testparm # /opt/samba/bin/smbclient//localhost/netlogon -UAdministrator%'SUA_SENHA'-c"ls" Consultandoclient: # /opt/samba/bin/smbclient –version # /opt/samba/bin/smbclient -Llocalhost-U% VerificandozonaprimariacriadapeloSAMBA 4 # samba-tool dnszonelist127.0.0.1 --auto-U Administrator--password=SUA_SENHA Criandozonade DNSreverso # samba-tool dnszonecreate 127.0.0.1 0.168.192.in-addr.arpa -U Administrator-- password=SUA_SENHA Verificandoazonareversa # samba-tool dnszonelist127.0.0.1 --reverse -UAdministrator --password=SUA_SENHA # verificarusabilidade #AdicionandooRoteadordarede ao DNS # samba-tool dnsadd192.168.0.1 0.168.192.in-addr.arpa 1 PTR roteador.shark.net -U Administrator--password=SUA_SENHA Desabilitandoacomplexidade de senhas
  • 6. # samba-tool domainpasswordsettingsshow # samba-tool domainpasswordsettingsset --complexity=off --history-length=0--min-pwd- length=0--min-pwd-age=0 Relendoconfiguracoes # /opt/samba/bin/smbcontrol all reload-config Revisandousuarios # /opt/samba/bin/samba-tooluserlist # /opt/samba/bin/samba-toolusersetpasswordEduardo.charquero Testandotiket # kinitAdministrator@shark.net # klist Testandoo dominiocomdig # digshark.net Consultandokerberose ldap: # dig-t srv_kerberos._tcp.shark.net # dig-t srv_ldap._tcp.shark.net # host-t A rwindows8 SetandoSAMBA 4 na inicializaçãodoSO # vim/etc/init.d/samba #! /bin/bash ### BEGIN INIT INFO # Provides: samba
  • 7. # Required-Start: $network $local_fs$remote_fs # Required-Stop: $network $local_fs$remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description:start Samba daemons ### END INIT INFO # # Start/stopsthe Samba daemon (samba). # Adapted from the Samba 3 packages. # SAMBAPID=/opt/samba/var/run/samba.pid # clear conflicting settingsfrom the environment unset TMPDIR # See if the daemon and the config file are there test -x /opt/samba/sbin -a -r /opt/samba/etc/ || exit 0 . /lib/lsb/init-functions case "$1" in start) log_daemon_msg "Starting Samba 4 daemon" "samba" if ! start-stop-daemon --start --quiet --oknodo --exec /opt/samba/sbin/samba -- -D; then log_end_msg 1 exit 1 fi log_end_msg 0 ;; stop) log_daemon_msg "Stopping Samba 4 daemon" "samba"
  • 8. start-stop-daemon --stop --quiet --name samba $SAMBAPID # Wait a little and remove stale PID file sleep 1 if [ -f $SAMBAPID ] && ! ps h `cat $SAMBAPID` > /dev/null then # Stale PID file (samba was succesfully stopped), # remove it (should be removed by samba itself IMHO.) rm -f $SAMBAPID fi log_end_msg 0 ;; restart|force-reload) $0 stop sleep 1 $0 start ;; *) echo "Usage: /etc/init.d/samba {start|stop|restart|force-reload}" exit 1 ;; esac exit 0 Setandopermissão # chmod+x /etc/init.d/samba # update-rc.dsambadefaults Criandoa pasta de perfismoveis # mkdir/opt/samba/var/profiles
  • 9. # chmod-R 1777 profiles Criandoo Compartilhamento # cd /home # mkdir/Dados # mkdir/Dados/Diretoria...Financeiro...Rh...Comercial...Publica...Tecnico... Adicionandodiretóriosaosmb.conf # vim/opt/samba/etc/smb.conf # Global parameters [global] workgroup= shark realm= samba4.shark.net netbiosname = samba4 serverrole = active directorydomaincontroller dns forwarder= 200.189.80.43 [netlogon] path = /opt/samba/var/locks/sysvol/xirux.local/scripts read only= No [sysvol] path = /opt/samba/var/locks/sysvol read only= No [profiles] Path = /opt/samba/var/profiles
  • 10. Readonly= no [Dados] path = /home/Dados comment= CompartilhamentosdaRede read only= No [Diretoria] path = /home/Dados/Diretoria comment= Pasta Diretoria read only= No [Rh] path = /home/Dados/Rh comment= PastaRh read only= No [Financeiro] path = /home/Dados/Financeiro comment= PastaFinanceiro read only= No [Tecnico] path = /home/Dados/Tecnico comment= PastaTecnico read only= No
  • 11. [Comercial] path = /home/Dados/Comercial comment= PastaComercial read only= No [Publica] path = /home/Dados/Publica comment= PastaPublica readonly= no SetandopermissoesaosDiretorios # chownroot:usersDados/ -R # chmod770 /home/dados/ -R # chownroot:users/opt/samba/var/profiles/ -R # chmod770 /opt/samba/var/profiles As demaisconfiguracoesrelativasacriacaode usuarios,gerenciamentode compartilhamentos podeme devemserfeitospelasFerramentasde GerenciamentodoWindowsServer2008, instaladosnoWindows7ou 8. Os perfisMoveis;Basicamente,crieiumapastaem/opt/samba/profiles,apontei no /opt/samba/etc/smb.conf e adicionei aoperfildousuárionoAD: samba4profiles%USERNAME% Eduardo Charquero Tecnólogo em Redes de Computadores Administrador de Sistemas Linux Linux user & 529578 e-mail: eduardo.charquero@hotmail.com