Kevin
Kevin

Reputation: 31

Net ads join not working, How can I configure properly dns to make it work?

Currently working on a project for work. I have to connect my FreeRadius (RHEL 8.10) to the AD in order to implement MFA through my Bastion. To do so, we need to use Samba first for domain join operations. However, while trying to join the domain, I am encountering several errors

When I enter the command : net ads join -U administrator in order to join radius server to dc, I encounter this error :

sitename_fetch: No stored sitename for realm '<domain>'

namecache_fetch: no entry for <domain>#1C found.

resolve_lmhosts: Attempting lmhosts lookup for name <domain><0x1c>

getlmhostsent: lmhost entry: 127.0.0.1 localhost

resolve_wins: WINS server resolution selected and no WINS servers listed.

name_resolve_bcast: Attempting broadcast lookup for name <domain><0x1c>

libnet_Join:

    libnet_JoinCtx: struct libnet_JoinCtx

        out: struct libnet_JoinCtx

            odj_provision_data       : NULL

            account_name             : 'VM-01$'

            netbios_domain_name      : NULL

            dns_domain_name          : NULL

            forest_name              : NULL

            dn                       : NULL

            domain_guid              : 00000000-0000-0000-0000-000000000000

            domain_sid               : NULL

                domain_sid               : (NULL SID)

            modified_config          : 0x00 (0)

            error_string             : 'failed to find DC for domain <domain> - The object was not found.'

            domain_is_ad             : 0x00 (0)

            set_encryption_types     : 0x00000000 (0)

            krb5_salt                : NULL

            dcinfo                   : NULL

            account_rid              : 0x00000000 (0)

            result                   : WERR_NERR_DCNOTFOUND

Failed to join domain: failed to find DC for domain <domain>- The object was not found.

The errors indicate that my radius is unable to resolve the domain and locate the DC. This is likely due to DNS misconfiguration, although nslookup is working fine, resolv.conf too, can ping DC

I don't understand the error : Object not found

My work :

-Installed Samba and winbind with :

dnf install samba samba-client samba-common samba-winbind

dnf install winbind

Configured smb.conf :

[global]
    workgroup = <domain>
    password server = *
    realm = <FQDN>
    security = ads
    kerberos method = system keytab
    idmap uid = 10000-20000
    idmap gid = 10000-20000
    template shell = /bin/bash
    winbind use default domain = false
    winbind enum users = yes
    winbind enum groups = yes
    winbind offline logon = true
    idmap_ldb:use rfc2307 = yes
    log level = 1

    # For better logging and debugging
    log file = /var/log/samba/%m.log
    max log size = 50

    passdb backend = tdbsam

    load printers = yes
    cups options = raw

ollowed this tutorial but doesn't seem to work :

https://cloudinfrastructureservices.co.uk/setup-freeradius-active-directory-authentication-integration/

TLDR :

-Configured localhost DNS -Installed Samba and Configure AD -Setup Kerberos Authentication for AD -Join Linux Server to AD (kinit administrator ticket)

Thanks all !!!

Upvotes: 0

Views: 29

Answers (0)

Related Questions