Bluhalo IT


Ubuntu and Active Directory in 10 Minutes

Posted in Active Directory, linux by Simon Green on October 6, 2008
Tags: , , , , , ,

This aims to be a short and simple step-by-step guide on how to get your blank box running Ubuntu server, joined to Active Directory and login to it with your AD credentials. Once installed, you can tailor this to your own environment easily. We use this on our local development servers to allow users to have their own home directories on each server with their own sites without having to juggle 6 different passwords. It also adds security in that once a user is locked out of AD, they are locked out of everywhere.

This article assumes you already have a functioning Windows 2003 server running AD.What is Ubuntu?

Ubuntu is a community driven distribution of Linux, with flavors suitable for both Desktops and Servers. It’s based on Debian, and uses the same .deb package system. In most cases, any Debian package will work on Ubuntu.

Download & Install Ubuntu

Installing Ubuntu

Installing Ubuntu

Download the server edition of Ubuntu from the official site. The site offers a selection of mirrors ot choose from. Once downloaded, assuming you are on a windows machine, burn the ISO to CD using something like the lightweight and free ISO Recorder.

Installing Ubuntu is pretty painless. It’s all basic options such as country, keyboard layout, and finally you are presented with a short list of generic server environments to choose from such as LAMP, Mail, DNS, etc. Out of these, the only one you should choose is OpenSSH Server.

What is Likewise Open?

Likewise Open allows you to integrate Linux, UNIX and Mac computers with Active Directory, without having to change your LDAP schema or mess around with NIS.

Download and Install Likewise Open

Joining the domain with Likewise

Joining the domain with Likewise

You can get the latest copy of Likewise Open from their site. Make sure you get the latest Debian package (32 bit or 64 bit to match your install). the package is self executing. After downloading, add execute permissions (chmod +x filename) and run it. It needs root privileges, so it will need to be run with sudo or as root. Once you’ve installed, a simple one line command will join you to the domain:

/opt/likewise/bin/domainjoin-cli join domainName ADjoinAccount

Ubuntu server visible in AD

Ubuntu server visible in AD

Configuring Likewise

Most configuration variables are set in the file “/etc/likewise/lsassd.conf". You can customise the login shell, the home directory template, set a character to replace spaces. Example:

login-shell-template = /bin/bash
homedir-template = /home/%D/%U
separator-character = ^

Login

And finally, you can login to your machine as a domain user. Remember to use the "DOMAIN\user" syntax, in the same way you would on a Windows machine. If you are connecting to it from a Linux command prompt remotely (eg via SSH), you will need to escape the backslash eg: "DOMAIN\\user".

Logged in using AD credentials

Logged in using AD credentials

Full guides are produced by Likewise in PDF form. There is a 10-minute setup guide and an Installation and Admin guide.

Leave a Reply