Howto authenticate redhat from Active Directory

Posted on January 3, 2014


My tested environment

Domain = Windows2008R2

Client OS = RHEL 6.2


  • samba and winbind must be installed.
  • Host file of windows domain (%windows%\system32\drivers\etc = host file path) and client RHEL OS (etc/hosts = host file path) must be configured   OR   DNS should be working.
  • RHEL client time must be sync with windows domain (ntpdate windows domain server ip)
  • run the system-config-authenticatation. See the below configuration must be configured. (AD = host/machine name, SCHOOL = Domain name, SCHOOL.COM.PK is complete domain name, AD.SCHOOL.COM.PK is FQDN name)



select create home directories on the first login.

  • Now select join domain and supply windows domain password.
  • Restart samba and winbind services
  • test connectivity with windows domain via applying the below command.

 #wbinfo -t
checking the trust secret for domain SCHOOL via RPC calls succeeded
# wbinfo -g
domain computers
domain controllers
domain admins
domain users

# wbinfo -g
domain computers
domain controllers
domain admins
domain users


  • Now login to domain from RHEL OS via Active Directory account

ssh administrator@oraclebe
administrator@oraclebe’s password:
Last login: Mon Feb  3 06:28:57 2014 from
[administrator@oraclebe ~]$

$ pwd

Test smb.conf file  (these entries are only for view. We did not touch any thing under smb.conf file. every thing was appended when we use the system-config-authenticatation above)

under global area of smb.conf file


workgroup = SCHOOL
password server = SCHOOL.COM.PK
security = ads
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
template shell = /bin/bash
winbind use default domain = true
winbind offline logon = false


Posted in: Linux