How can I log in to a Mac using an Active Directory account? I have an iMac running OS X 10.7.4. I successfully managed to get the Mac into my company's Active Directory forest using dsconfigad -add example.com -domain example.com ..

I am not, however, able to select a user from the AD to log in to the computer. I guess I missed something. Could someone please put my nose into the correct direction?
dsconfigad -preferred ads01.example.com -a COMPUTERNAME 
–domain example.com -u administrator -p "password"

For more information just check the manual (Integrating Active Directory)