How to add Ubuntu Server to a Windows Active Directory

Setup:

Server: Ubuntu 14.04.3 LTS 64-bit

pbis-open version: 8.3

First of all, install these packages:

  1. libpam-winbind (available in repository)
  2. nfs-common (available in repository)
  3. pbis-open (download latest version from http://download1.beyondtrust.com/Technical-Support/Downloads/PowerBroker-Identity-Services-Open-Edition/?Pass=True)

Now that you have all the necessary packages, you have to start the setup:

  1. “sudo pam-auth-update” (use –force option in case you have done some local modifications before, but take care that it will reset all your old settings and place them in a .old file)
  2. “sudo domainjoin-cli join DOMAIN_NAME DOMAIN_USERNAME
  3. Enter the password, then you should receive a SUCCESS message
  4. Reboot the server

Now you have joined the Active Directory!All what’s remaining now is allowing a group to have sudo access if needed:

  1. Edit the “/etc/sudoers” file
  2. In the line below “%admin ALL=(ALL) ALL”, add the following: “%DOMAIN_NAME\\DOMAIN_GROUP ALL=(ALL) ALL” (without the quotes)

That’s it! Now your user is a sudoer and you can login to the machine using “ssh DOMAIN_NAME\\DOMAIN_USERNAME@SERVER_NAME

Optional: If you wish Bash becomes the default shell for the user, just execute the following command “sudo  /opt/pbis/bin/config LoginShellTemplate /bin/bash”

About SoCRaT

Software Engineer, OSS & Linux Geek
This entry was posted in Ubuntu, Windows and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s