cesarpazebao
(usa CentOS)
Enviado em 06/11/2023 - 23:44h
cesarpazebao escreveu:
vchacal escreveu:
cesarpazebao escreveu:
Amigo todas essas situações eu fiz... porém sem sucesso. Estou usando samba 4.19. Estranhamente quando deixei o arquivo dlz sem habilitar, o nslookup funcionou normal. Agora o kinit é o kerberos ainda não respondem. Continua com nxdomain.
Deve ser pq ele passa usar o samba_internal. Mas usando bind tmb é p/ funcionar tmb, só da um pouco mais de trabalho.
Faz a configuração do seu bind e nos arquivos de configuração comenta as opções que habilita o modulo dlz. E inicia o bind, que é o serviço named, é pra ele iniciar sem erros pq até aqui é somente o bind sem o modulo dlz.
Se tiver problema nessa parte, posta o log ... pode ser o journalctl -n 20 "p/ ele mostrar somente as ultimas 20 linhas". E posta os arquivos de configuração tmb, /etc/bind/named.conf, /etc/bind/named.conf.local e /etc/bind/named.conf.options.
Aew no samba vc pode provisionar usando o bind9_dlz, assim ele vai criar os arquivos lá no diretório de instalação do samba. Faz os lances de permissões destes arquivos, inicia o samba e faz um restart do serviço named. Aew que ele vai subir normal se vc configurou tudo certo, ou dar erro .... aew posta o erro ... usando systemctl status named, systemctl status samba-ad-dc e tmb os logs usando o journalctl.
Qto ao kerberos, como vc ta instalando as dependências do samba? Ta usando o bootstrap?
Posta o arquivo /etc/krb5.conf tmb.
Boa tarde! Em relação ao kerberos, estou copiando direto samba depois de provisiona-lo.
Irei fazer uns testes hj a noite e posto as configurações. Em relação ao bootstrap descobri esse script antes de fazer a compilação do samba em si e nao utilizei. Fiz tudo na munheca mesmo!!!
Grato pelo suporte!!!!
Olah boa noite!
Conforme vc solicitou, segue as configs do meu server.
/etc/bind# cat named.conf
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
include "/usr/local/samba/bind-dns/named.conf";
/etc/bind# cat named.conf.local
zone "teste.local" IN {
type master;
file "/etc/bind/db.192";
};
zone "2.168.192.in-addr.arpa" IN {
type master;
file "/etc/bind/db.192.168.2";
};
/etc/bind# cat named.conf.options
acl "trusted" {
192.168.2.70; # set to localhost
};
options {
directory "/var/cache/bind";
recursion yes; # enable recursive queries
allow-recursion { trusted; }; # permite consultas recursivas para o trusted clients
listen-on port 53 { 192.168.2.70; }; # permite endereço IP apenas para rede privada
allow-transfer { none; }; # desabilitar transferencia de zona por default
forwarders {
1.1.1.1;
1.0.0.1;
};
auth-nxdomain no;
tkey-gssapi-keytab "/usr/local/samba/private/dns.keytab";
minimal-responses yes;
};
/etc/bind# journalctl -n20
samba[481]: [2023/11/06 22:13:08.545303, 0] ../../lib/util/util_runcmd.c:355(samba_runcmd_io_handler)
samba[481]: /usr/local/samba/sbin/samba_dnsupdate: ERROR(runtime): Record already exists; record could not be added. zone[_msdcs.teste>
samba[481]: [2023/11/06 22:13:08.703592, 0] ../../lib/util/util_runcmd.c:355(samba_runcmd_io_handler)
samba[481]: /usr/local/samba/sbin/samba_dnsupdate: ERROR(runtime): Record already exists; record could not be added. zone[vitel.teste]>
samba[481]: [2023/11/06 22:13:08.853513, 0] ../../lib/util/util_runcmd.c:355(samba_runcmd_io_handler)
samba[481]: /usr/local/samba/sbin/samba_dnsupdate: ERROR(runtime): Record already exists; record could not be added. zone[_msdcs.teste>
samba[481]: [2023/11/06 22:13:09.011787, 0] ../../lib/util/util_runcmd.c:355(samba_runcmd_io_handler)
samba[481]: /usr/local/samba/sbin/samba_dnsupdate: ERROR(runtime): Record already exists; record could not be added. zone[teste.local]>
samba[481]: [2023/11/06 22:13:09.170041, 0] ../../lib/util/util_runcmd.c:355(samba_runcmd_io_handler)
samba[481]: /usr/local/samba/sbin/samba_dnsupdate: ERROR(runtime): Record already exists; record could not be added. zone[teste.local]>
samba[481]: [2023/11/06 22:13:09.328323, 0] ../../lib/util/util_runcmd.c:355(samba_runcmd_io_handler)
samba[481]: /usr/local/samba/sbin/samba_dnsupdate: ERROR(runtime): Record already exists; record could not be added. zone[teste.local]>
samba[481]: [2023/11/06 22:13:09.486596, 0] ../../lib/util/util_runcmd.c:355(samba_runcmd_io_handler)
samba[481]: /usr/local/samba/sbin/samba_dnsupdate: ERROR(runtime): Record already exists; record could not be added. zone[teste.local]>
samba[481]: [2023/11/06 22:13:09.644843, 0] ../../lib/util/util_runcmd.c:355(samba_runcmd_io_handler)
samba[481]: /usr/local/samba/sbin/samba_dnsupdate: ERROR(runtime): Record already exists; record could not be added. zone[teste.local]>
samba[481]: [2023/11/06 22:13:09.803201, 0] ../../lib/util/util_runcmd.c:355(samba_runcmd_io_handler)
samba[481]: /usr/local/samba/sbin/samba_dnsupdate: ERROR(runtime): Record already exists; record could not be added. zone[teste.local]>
samba[481]: [2023/11/06 22:13:09.927656, 0] ../../source4/dsdb/dns/dns_update.c:85(dnsupdate_nameupdate_done)
samba[481]: dnsupdate_nameupdate_done: Failed DNS update with exit code 26
/etc/bind# systemctl status named
● named.service - BIND Domain Name Server
Loaded: loaded (/lib/systemd/system/named.service; enabled; preset: enabled)
Active: active (running) since Mon 2023-11-06 21:43:59 -03; 37min ago
Docs: man:named(8)
Main PID: 591 (named)
Status: "running"
Tasks: 6 (limit: 4642)
Memory: 38.8M
CPU: 153ms
CGroup: /system.slice/named.service
└─591 /usr/sbin/named -f -u bind -4
named[591]: zone 255.in-addr.arpa/IN: loaded serial 1
named[591]: zone 127.in-addr.arpa/IN: loaded serial 1
named[591]: zone teste.local/IN: loaded serial 3
named[591]: zone localhost/IN: loaded serial 2
named[591]: all zones loaded
systemd[1]: Started named.service - BIND Domain Name Server.
named[591]: running
named[591]: zone teste.local/IN: sending notifies (serial 3)
named[591]: managed-keys-zone: Key 20326 for zone . is now trusted (acceptance timer complete)
named[591]: resolver priming query complete: success
/etc/bind# systemctl status samba-ad-dc
● samba-ad-dc.service - Samba Active Directory Domain Controller
Loaded: loaded (/etc/systemd/system/samba-ad-dc.service; enabled; preset: enabled)
Active: active (running) since Mon 2023-11-06 21:33:00 -03; 1h 22min ago
Process: 421 ExecStart=/usr/local/samba/sbin/samba -D (code=exited, status=0/SUCCESS)
Main PID: 435 (samba)
Tasks: 56 (limit: 4642)
Memory: 252.7M
CPU: 47.077s
CGroup: /system.slice/samba-ad-dc.service
├─435 "samba: root process" "" "" "" "" "" "" "" .
├─456 "samba: tfork waiter process(457)"
├─457 "samba: task[s3fs] pre-fork master"
├─458 "samba: tfork waiter process(460)"
├─459 "samba: tfork waiter process(461)"
├─460 "samba: task[rpc] pre-fork master"
├─461 /usr/local/samba/sbin/smbd -D "--option=server role check:inhibit=yes" --foreground
├─462 "samba: tfork waiter process(463)"
├─463 "samba: task[nbt] pre-fork master"
├─464 "samba: tfork waiter process(465)"
├─465 "samba: task[wrepl] pre-fork master"
├─466 "samba: tfork waiter process(467)"
├─467 "samba: task[ldap] pre-fork master"
├─468 "samba: tfork waiter process(469)"
├─469 "samba: task[cldap] pre-fork master"
├─470 "samba: tfork waiter process(471)"
├─471 "samba: task[kdc] pre-fork master"
├─472 "samba: tfork waiter process(473)"
├─473 "samba: task[drepl] pre-fork master"
├─474 "samba: tfork waiter process(475)"
├─475 "samba: task[winbindd] pre-fork master"
├─476 "samba: tfork waiter process(477)"
├─477 "samba: task[ntp_signd] pre-fork master"
├─478 "samba: tfork waiter process(479)"
├─479 "samba: task[kcc] pre-fork master"
├─480 "samba: tfork waiter process(481)"
├─481 "samba: task[dnsupdate] pre-fork master"
├─482 "samba: tfork waiter process(483)"
├─483 "samba: task[kdc] pre-forked worker(0)"
├─485 "samba: tfork waiter process(488)"
├─488 "samba: task[kdc] pre-forked worker(1)"
├─489 "samba: tfork waiter process(490)"
├─490 "samba: task[kdc] pre-forked worker(2)"
├─491 "samba: tfork waiter process(493)"
├─493 "samba: task[kdc] pre-forked worker(3)"
├─494 "samba: tfork waiter process(495)"
├─495 /usr/local/samba/sbin/winbindd -D "--option=server role check:inhibit=yes" --foreground
├─496 "samba: tfork waiter process(497)"
├─497 "samba: task[rpc] pre-forked worker(0)"
├─498 "samba: tfork waiter process(499)"
├─499 "samba: task[rpc] pre-forked worker(1)"
├─500 "samba: tfork waiter process(501)"
├─501 "samba: task[rpc] pre-forked worker(2)"
├─502 "samba: tfork waiter process(503)"
├─503 "samba: task[rpc] pre-forked worker(3)"
├─506 "smbd: notifyd" "" "" "" "" "" "" "" "" "" "" "" "" .
├─507 "smbd: cleanupd" "" "" "" "" "" "" "" "" "" "" "" .
├─508 "winbindd: domain child [TESTE] "
├─510 "samba: tfork waiter process(511)"
├─511 "samba: task[ldap] pre-forked worker(0)"
├─512 "samba: tfork waiter process(513)"
├─513 "samba: task[ldap] pre-forked worker(1)"
├─514 "samba: tfork waiter process(515)"
├─515 "samba: task[ldap] pre-forked worker(2)"
├─516 "samba: tfork waiter process(517)"
└─517 "samba: task[ldap] pre-forked worker(3)"
samba[481]: [2023/11/06 22:53:09.608276, 0] ../../lib/util/util_runcmd.c:355(samba_runcmd_io_handler)
samba[481]: /usr/local/samba/sbin/samba_dnsupdate: ERROR(runtime): Record already exists; record could not be added. zone[teste.local]>
samba[481]: [2023/11/06 22:53:09.766503, 0] ../../lib/util/util_runcmd.c:355(samba_runcmd_io_handler)
samba[481]: /usr/local/samba/sbin/samba_dnsupdate: ERROR(runtime): Record already exists; record could not be added. zone[teste.local]>
samba[481]: [2023/11/06 22:53:09.924758, 0] ../../lib/util/util_runcmd.c:355(samba_runcmd_io_handler)
samba[481]: /usr/local/samba/sbin/samba_dnsupdate: ERROR(runtime): Record already exists; record could not be added. zone[teste.local]>
samba[481]: [2023/11/06 22:53:10.066396, 0] ../../lib/util/util_runcmd.c:355(samba_runcmd_io_handler)
samba[481]: /usr/local/samba/sbin/samba_dnsupdate: ERROR(runtime): Record already exists; record could not be added. zone[teste.local]>
samba[481]: [2023/11/06 22:53:10.191217, 0] ../../source4/dsdb/dns/dns_update.c:85(dnsupdate_nameupdate_done)
samba[481]: dnsupdate_nameupdate_done: Failed DNS update with exit code 26
/etc/bind# host -a SRV _kerberos._udp.srv-001.TESTE.LOCAL.
host: couldn't get address for '_kerberos._udp.srv-001.TESTE.LOCAL.': not found
/etc/bind# host -t SRV _ldap._tcp.TESTE.LOCAL
Host _ldap._tcp.TESTE.LOCAL not found: 3(NXDOMAIN)
/etc/bind# cat /etc/resolv.conf
search teste.local
domain srv-001.teste.local
nameserver 192.168.2.70
nameserver 192.168.2.254
nameserver 1.1.1.1
/etc# hostname
srv-001
/etc# cat network/interfaces
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug enp2s0
iface enp2s0 inet static
address 192.168.2.70
netmask 255.255.255.0
network 192.168.2.0
broadcast 192.168.2.255
gateway 192.168.2.254
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.2.70
dns-search teste.local