My guess is this would work about the same for Debian Squeeze as well.
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:
Edit sudoers to allow users to become elevated users.
# This file MUST be edited with the ‘visudo’ command as root.
# See the man page for details on how to write a sudoers file.
# 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
# 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
I’m currently only adding single users. Then to login with SSH and your EID