web-dev-qa-db-fra.com

Kerberos - Échec de domaine Active Directory (Ubuntu)

J'essaie de rejoindre Active Directory et Samba 4 dans Ubuntu 12.04.05.
Quand je lance Host -t SRV _kerberos._udp.test.sg j'obtiens l'erreur:

Host _kerberos._udp.test.sg not found: 3(NXDOMAIN)

pendant ce temps

$# Host -t SRV _ldap._tcp.test.sg 
_ldap._tcp.test.sg has SRV record 0 0 389 4ecapsvsg6.test.sg.
$# Host -t A 4ECAPSVSG6.test.sg
4ECAPSVSG6.test.sg has address 10.153.64.5

Mon /etc/samba/smb.conf:

# Global parameters
[global]
   workgroup = TEST
   realm = TEST.SG
   netbios name = 4ECAPSVSG6
   server role = Active Directory domain controller
   dns forwarder = 10.153.64.5
   security = ads
   use kerberos keytab = true
   password server = 4ecapsvsg6.test.sg
   allow dns updates = nonsecure and secure
   bind interfaces only = no
   server services = +smb -s3fs
   dcerpc endpoint servers = +winreg +srvsvc
   passdb backend = samba4
   server services = smb, rpc, nbt, wrepl, ldap, cldap, kdc, drepl, winbind, ntp_signd, kcc, dnsupdate, dns 

Mon /etc/krb5.conf:

[libdefaults]
    default_realm = TEST.SG
    krb4_config = /etc/krb.conf
    krb4_realms = /etc/krb.realms
    kdc_timesync = 1
    ccache_type = 4
    forwardable = true
    proxiable = true
[realms]
     4ECAP.SG = {
          kdc = 4ecapsvsg6.test.sg:88
          admin_server = 4ecapsvsg6.test.sg:749
          default_domain = test.sg
    }
[domain_realm]
    .test.sg = TEST.SG
    test.sg = TEST.SG
[login]
    krb4_convert = true
    krb4_get_tickets = false

Mon /etc/hosts:

  127.0.0.1       localhost
  127.0.1.1       4ecapsvsg6
  # The following lines are desirable for IPv6 capable hosts
  ::1     ip6-localhost ip6-loopback
  fe00::0 ip6-localnet
  ff00::0 ip6-mcastprefix
  ff02::1 ip6-allnodes
  ff02::2 ip6-allrouters
  10.153.64.5     4ecapsvsg6.test.sg     4ecapsvsg6

Quelle est la solution? Sans cela, je ne peux pas joindre de domaine avec la commande:

Sudo net ads join

qui sort erreur comme

Failed to join domain: failed to lookup DC info for domain 'TEST' over rpc: Logon failure

J'ai fait kinit administrator et klist, résultat:

   Ticket cache: FILE:/tmp/krb5cc_0
   Default principal: [email protected]
    Valid starting       Expires              Service principal
    26/03/2015 14:29:04  27/03/2015 00:29:04  krbtgt/[email protected]
    renew until 27/03/2015 14:29:00

en attendant j'inclus mon /etc/resolv.conf

   # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
   #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

   nameserver 10.153.64.5
   search test.sg
   domain test.sg
1
AdhiDazz

Après avoir consulté Google la semaine dernière, j'ai eu la chance de trouver ce site http://edoceo.com/howto/samba4

Il me faut modifier mon Dnsmasq (/etc/dnsmasq.conf), ajoutez cette ligne:

srv-Host = _kerberos._tcp.test.sg, 4ecapsvsg6.test.sg, 88 srv-Host = _kerberos._tcp.dc._msdcs.test.sg, 4ecapsvsg6.test.sg, 88 srv-Host = _kerberos._udp. test.sg, 4ecapsvsg6.test.sg, 88

srv-Host = _kpasswd._tcp.test.sg, 4ecapsvsg6.test.sg, 464 srv-Host = _kpasswd._udp.test.sg, 4ecapsvsg6.test.sg, 464

et désactivez Bind9 (installé avec Samba4 par défaut)

Maintenant les problèmes sont partis :)

Reste un problème, comment se connecter à AD (je vais ouvrir un autre thread pour ça)

1
AdhiDazz