while a bit artificial, this command line script now fairly closely mirrors the codepath that the server takes to canonicalize (resolve aliases) then authenticate a user against LDAP.