Share ldappasswd code with user model and password_controller