Add Ubuntu to AD for authentication

My guess is this would work about the same for Debian Squeeze as well.

Install likewise-open
apt-get install likewise-open

User that can join AD should be a valid user ID. The –ou option can also be used to place this in a Organizational Unit.
domainjoin-cli join domain.com UserThatCanJoinAD
domainjoin-cli join –ou path/organizationalUnitName domainName joinAccount

To remove the computer from the domain run:
domainjoin-cli leave

Edit sudoers to allow users to become elevated users.

root@box:~# visudo
# /etc/sudoers
#
# This file MUST be edited with the ‘visudo’ command as root.
#
# See the man page for details on how to write a sudoers file.
#

Defaults env_reset
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL) ALL
#To add just one user account add the line below with the correct EID.
DOMAIN\e0NNNNN ALL=(ALL) ALL

# Allow members of group sudo to execute any command
# (Note that later entries override this, so you might need to move
# it further down)
%sudo ALL=(ALL) ALL

#
#includedir /etc/sudoers.d

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
#To add an entire group use something like the line below
%Domain\AD_Group ALL=(ALL) ALL

After making changes in visudo restart sudo

/etc/init.d/sudo restart

I’m currently only adding single users. Then to login with SSH and your EID

ssh DOMAIN\E0NNNNN@hostname

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 )

Facebook photo

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

Connecting to %s

%d bloggers like this: