Integrating a Linux Machine into Windows Active Directory Domain

The problem of integrating an Ubuntu workstation with Windows Active directory is quite common. Below we describe the required steps to help DataSunrise users accomplish this task:


1. Specify the name of the configured computer in the /etc/hostname file

Query the current host name:

cat /etc/hostname

If necessary, specify a new host name:

echo myhost > /etc/hostname

Note. Host name cannot be localhost, because localhost is the name for (specified in the /etc/hosts file when you install the operating system).


2. Specify full domain controller name in the /etc/hosts file

Add a static record with full domain controller name in the end of the file /etc/hosts. Translation between IP address and the name of the computer is required so that you could use hostname instead of the IP address.

echo hostname.db.local hostname >> /etc/hosts

3. Set a DNS server on the configured computer

Domain controller should be the first option for search (use nslookup command for check)

Non-authoritative answer:

4. Install a Kerberos client

sudo apt-get install krb5-user libpam-krb5 libpam-ccreds auth-client-config

5. Install Samba, Winbind and NTP

sudo apt-get install samba winbind ntp

6. Edit the /etc/kerberos/krb5.conf file to add full domain name, domain controller name and the realm parameter

    default_realm       =           DB.LOCAL    # domain specific parameter (full domain name)
    clockskew           =           300
    ticket_lifetime     =           1d
    forwardable         =           true
    proxiable           =           true
    dns_lookup_realm    =           true
    dns_lookup_kdc      =           true
        DB.LOCAL = {
        kdc            =       hostname.db.local   # domain specific parameter (domain controller name)
        admin_server   =       hostname.db.local   # domain specific parameter (domain controller name)
        default_domain =       DB.L