I was trying to set up CAS for authentication and LDAP for user information. I set up my LDAP and CAS servers, and I set CAS to import users from LDAP. I was stuck for a day trying to figure out the message
[CASAutoLogin]... Problem accessing LDAP server null
It turns out that my CAS server uses numeric usernames, and my Liferay was not allowed to have numeric screen names. I changed the configuration and it worked, but better error messages would have prevented my frustration. Please add appropriate messages to UserScreenNameException instantiations in UserLocalServiceImpl.validateScreenName(..).