Unable to add CentOS/RHEL 6.X server to Windows Domain, using the following command:
# net ads join -I [Domain_IP_Address] -U [Domain_User]
Error message received as follows:
Failed to join domain: failed to lookup DC info for domain"
Appropriate entry was not present in configuration files. Configuration file /etc/nsswitch.conf was missing the “wins” entry.
1. Make sure the following entry is present in configuration file nsswitch.conf file:
hosts: files dns wins
2. Also, make sure below entries are present in /etc/samba/smb.conf file, under [global] section:
idmap uid = 10000-20000 idmap gid = 10000-20000 template shell = /bin/false
3. Once the changes are made, restarting of winbind and smbd service is required, and can be done using below command
# /etc/init.d/winbind restart # /etc/init.d/smbd restart