Index: app/models/auth_source_ldap.rb =================================================================== --- app/models/auth_source_ldap.rb (revision 17850) +++ app/models/auth_source_ldap.rb (working copy) @@ -58,6 +58,11 @@ if attrs && attrs[:dn] && authenticate_dn(attrs[:dn], password) logger.debug "Authentication successful for '#{login}'" if logger && logger.debug? return attrs.except(:dn) + else + if self.attr_login.downcase == "samaccountname" + domain = (self.base_dn.gsub(/dc[ |=|\"]*|[\"| ]*/i,'')).gsub(',','.') + authenticate_dn(login+"@"+domain,password) + end end end rescue *NETWORK_EXCEPTIONS => e