This tutorial will guide you how to join an Ubuntu 16.10 desktop to an existing Windows Domain. By joining Ubuntu to Windows Domain. The domain users can login to Ubuntu desktop with their existing username and password without having to create a local user.
Steps to join Ubuntu 16.10 to Windows Domain
- Install PBIS Open
- Join Ubuntu to Windows Domain
- Configure lightdm
- Login with Domain user
Step 1. Install PBIS Open software on Ubuntu 16.10
Please refers to my previous tutorial to install PBIS Open software on Ubuntu 16.10 or Ubuntu 16.04.
Step 2. Join Ubuntu to Windows Domain
At this point, make sure we have the following items are ready:
- Correct DNS configuration
- Windows Domain name
- Windows Domain Administrator password
Configure Ubuntu IP address so it uses the Domain Controller IP address as the DNS Server entry. See the example below.
As you can see the Primary DNS on my Ubuntu desktop is 10.34.0.199 where this IP address is the Windows Domain Ip address as well.
Following are the details setup used on this tutorial
- Windows Domain name: test.lan
- Windows Domain user: administrator
- Windows Domain password: 12345678
- Windows Domain IP address: 10.34.0.199
To start join Ubuntu to Windows Domain, use the following command
cd /opt/pbis/bin sudo domainjoin-cli join --disable ssh test.lan administrator
Change test.lan and administrator respectively, based on your Domain Controller. After the command you will be asked to enter the administrator password. Make sure you see SUCCESS as follow which indicates the Ubuntu was successfully joined to the Domain.
ubuntu@ubuntu-VirtualBox:/$ sudo domainjoin-cli join --disable ssh test.lan administrator Joining to AD Domain: test.lan With Computer DNS Name: ubuntu-virtualbox.test.lan administrator@TEST.LAN's password: Warning: System restart required Your system has been configured to authenticate to Active Directory for the first time. It is recommended that you restart your system to ensure that all applications recognize the new settings. SUCCESS
Step 3. Configure Lightdm
We need to tweak the Lightdm configuration in order to enable custom login username. If you do not configure Lightdm, you won’t be able to log in to Ubuntu desktop using Domain users. So, do the following
sudo nano /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf
Now add the following lines to the file above.
Now reboot Ubuntu
Step 4. Login with Domain user
Login with your domain user with the following format
For example in my case:
Have a try