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 am newbie with openldap, i would like to store user name and password a in ldap system. How can i ensure that each login can be only login on one machine at any one time?

"my application should limit the number of user sessions to one"


share|improve this question

This is a feature of the Operating System (typically PAM if you are talking Linux), not the LDAP service.

Please tell us what O/S and service you are trying to limit.

share|improve this answer

OpenLDAP, by itself, isn't going to do that. It is a read-optimized database for storing metadata.

You may be able to craft something that would work though. I would look to PAM, but you may be able to do something with just a login script that updates an attribute that says if you are logged in or not.

This will likely be an administrative nightmare though, as people who don't logout correctly will never get the flag reset and you'll have to manually do it. Or have another process that cleans up stale logins.

share|improve this answer

That's not traditionally the job of the directory service, and there's no built-in mechanism in OpenLDAP to do what you're trying to do.

You need to define what you mean by "logged-in" (SSH session, "mapped" "drive" with the SMB protocol, HTTP-based access to an application, etc) first, then configure either built-in functionality in the operating system (PAM, for example) or application you're using to limit the number of user sessions, or have something written to do what you want.

share|improve this answer
i would choose 'application you're using to limit the number of user sessions' – user11599 Jul 6 '09 at 16:28

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.