Add Ubuntu Linux in Microsoft Active Directory Domain

Add Ubuntu Linux in Microsoft Active Directory Domain

Lets see how to add the Ubuntu workstation in Microsoft Active Directory Domain, in this article i am using Windows 2003 server but you can also use windows 2008 server as well

Let me just show you the configuration of my server

DNS Tricks

As you can see i have DNS installed on the same server and DHCP is not enabled

Now let us go to Ubuntu Workstation, on Ubuntu we have to edit some files to make sure that the Ubuntu Workstation is able to ping the server using the IP address and Fully qualified domain name (FQDN)

Ubuntu Workstation is my server IP address and i am able to ping it successfully

Ubuntu Workstation

But i cannot ping the FQDN computer2.domain.local

Ubuntu Workstation

To over come this problem we have to edit couple of files here

To do that click on Applications--Accessories--Terminal

Type in sudo gedit /etc/hosts and hit enter, put your sudo password

once the file opens up we are going to add the IP address and Host name in this file

Linux Ubuntu

Put the IP address of your server and FQDN, e.g  Computer2

Click on save and close the file

Next file we have to edit is sudo gedit /etc/nsswitch.conf

Linux Ubuntu

In this file there is a line as below

hosts: files mdns4_minimal (NOTFOUND=return) dns mdns4

Add # in the beginning of host to omit this out and type in the below line

hosts:    files dns mdns4

Click on save and close the file

Now try to ping the FQDN, in my case since i am not using DHCP so we need to edit 2 more files "resolv.conf" and "dhclient.conf"

Linux Ubuntu

Go to terminal and type in sudo gedit /etc/resolv.conf, in this add "#" in the begining of each line

#domain localdomain
#search localdomain

Add search and nameserver as below

search      domain1.local

Note : put your domain name and the DNS server IP

Save this file and close it

What happens is, the file resolv.conf is going to be overwritten as soon as we reboot the workstation, so to get rid of that problem we need to edit one more file "dhclient.conf"


open terminal and type sudo gedit /etc/dhcp3/dhclient.conf and hit enter

In this file we have to add below lines

supersede domain-name "domain1.local";
prepend domain-name-servers;

Note : Make sure you add your domain name and proper IP address not mine

Click on save and close the file

Now if you need your domain user to be an ADMIN, we need to edit one more file sudo visido

Linux workstation

Just below the line # User privilege specification -- Type your your domainnameusername ALL=(ALL) ALL

If you want to add a group go to line # member of the admin group may gain root privileges


Type %domainnamedomain^users ALL=(ALL) ALL

Press Ctrl Key and enter, it will write the changes and press ctrl+X to exit

Now all we have to do is go to Synaptic Package Manager


Type in likewise and look for likewise-open-gui

Choose the package likewise-open-gui and click Mark for installation


Mark additional required changes


Click on APPLY

package likewise-open-gui

Click on Apply again

package likewise-open-gui
package likewise-open-gui
package likewise-open-gui
Linux Ubuntu
Linux Ubuntu

Once likewise is installed, go in to SYSTEM you will see a new option--Active Directory Membership, click on it

Linux Workstation

Once it opens up, type your domain name and provide the active directory credentials

Linux Ubuntu

Restart the Ubuntu workstation ! Enjoy

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

We use cookies to give you the best online experience. By agreeing you accept the use of cookies in accordance with our cookie policy.