How to join an active directory using linux?

Posted on 2007-08-01
Last Modified: 2013-12-15
How do you join an active directory server using linux, i mainly looking for the command line or programs that i use?
Question by:netscalable
    LVL 8

    Accepted Solution

    Winbind can be used to keep a unified login:
    LVL 8

    Expert Comment

    Here's something to help you out:
    LVL 12

    Assisted Solution

    LVL 3

    Assisted Solution


    There are three (at least two) components you need to hook a Linux computer to active directory.
    1. Kerberos 5
    2. Samba
    3. Winbind (only if you want unified login).

    Kerberos is the authentication connecting link between AD and Linux. The file you need to modify is /etc/krb5.conf. A typical file looks like this:
    ========START OF CODE===================
     default = FILE:/var/log/krb5libs.log
     kdc = FILE:/var/log/krb5kdc.log
     admin_server = FILE:/var/log/kadmind.log

     default_realm = YOUR_DOMAIN_INCLUDING_THE_DOT
     dns_lookup_realm = true
     dns_lookup_kdc = false
     ticket_lifetime = 24h
     forwardable = yes

     EXAMPLE.COM = {
      kdc =
      admin_server =
      default_domain =

     NA.RTA = {

    [domain_realm] = EXAMPLE.COM = EXAMPLE.COM

     pam = {
       debug = false
       ticket_lifetime = 36000
       renew_lifetime = 36000
       forwardable = true
       krb4_convert = false
    ===============END OF CODE================

    Linux distros nowadays come with Samba out of the box so you don't really have to do anything there unless you want you join to the domain (which I found to be much difficult and not too useful). You can access most of the Windows services by default. The last part is to configure Winbind to authenticate yourself to linux using the Windows AD logon credentials. Again that is optional unless you want to make the users login using the Windows user names and passwords.

    Do you want your users login using AD credentials?

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension ( This reminded me of questions tha…
    The purpose of this article is to demonstrate how we can use conditional statements using Python.
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now