[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: how to check uniqueness of uidNumber ?

Leonid Mamtchenkov wrote:

WONG_Jeffrey@seac.pf wrote:
WJsp> I'm thinking about to use openldap for users authentication. For that, I
WJsp> use person, posixAccount and shadowAccount objects to store user data
WJsp> (password, uid, ...). Now I want that no user have the same uidNumber (I
WJsp> know Unix allows multiple users to have the same uidNumber, but this is
WJsp> not compliant with my policy).
WJsp> WJsp> So how can I check uniqueness of uidNumber ?

I don't think it is possible to do.  I am used to think of it as a
feature though.  Consider that having multiple userPassword attributes
for the same object in posixAccount will allow your users to use
different passwords to login! ;)

the uidNumber attribute of the posixAccount objectClass is single valued; i.e. u cannot add more than one attribute of uidNumber to a dn that has a posixAccount. So the only solution I think to guarantee the uniqueness of ur customers' uidNumber is on ur client side.
1 - search for this uidNumber in ur tree
2 - if found then do not add
3 - if not found then add
I hope this helps


Sameh Attia
Senior System Engineer
T.E. Data
              __  __  _
  _________ _/ /_/ /_(_)___ _
 / ___/ __ `/ __/ __/ / __ `/
(__  ) /_/ / /_/ /_/ / /_/ /

"She who is in my mind and mouth, I love her with all my heart and blood"
We'll restore OUR Palestine