}
@Override
protected synchronized UserDetails authenticate(String username, String password) throws AuthenticationException {
try {
UnixUser uu = new PAM(serviceName).authenticate(username, password);
// I never understood why Acegi insists on keeping the password...
return new User(username,"",true,true,true,true, toAuthorities(uu));
} catch (PAMException e) {
throw new BadCredentialsException(e.getMessage(),e);