Linux – How to Join an Active Directory

active-directorylinux

I have a couple of CentOS 7.5 Linux servers that I need to get them to join an Active Directory 2012 R2 domain, I tried using Winbind and it tells me it cannot join as standalone server, then I tried using realm and even though it seems like it joined, when I run "id user@example.com" I get a message saying user does not exist, I even tried to use it as an LDAP Client (using Webmin), but when I hit Validate configuration it says it cannot find any users in the DN, Any ideas what should check to make sure everything is correct?

Thanks,

Best Answer

From my installation notes:

To join a domain with an RHEL 7-compatible server:

yum install sssd sssd-ad adcli realmd oddjob oddjob-mkhomedir samba-common-tools
realm join -U [admin account] [domain]
realm deny --all
realm permit --realm=[domain] --groups 'domain admins' '[other groups]'

To set the domain as the username suffix, add the following line to the [sssd] section of /etc/sssd/sssd.conf:
default_domain_suffix = [domain]

To allow AD groups to sudo, run visudo and add the following lines under the line that starts with %wheel:

%domain\ admins@[domain]        ALL = (ALL) ALL
%[other groups]@[domain]        ALL = (ALL) ALL