Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like a way (PAM module?) to authenticate local Unix users by adding @domain.tld to the username and trying that with the password against an IMAP server. This way we could allow authentication to our Unix boxes for people who have email addresses with our Google Apps account. If a user did not exist locally on the box (that is, adduser had never been called) I would like for the user to be created (maybe using libpam-mklocaluser?)

Is there any way to do this?

share|improve this question
Did you try this: – Mark Wagner Nov 22 '10 at 19:47
up vote 1 down vote accepted

No personal experience with this, but it appears that someone else has gone down this path before. It looks like pam_imap supports the authentication piece, but you'll probably have to roll-your-own functionality to create a local user account if it doesn't already exist.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.