Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Active Directory User Names
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01669941
Message ID:
01669997
Vues:
51
>>>>Hi,
>>>>
>>>>First, general AD question. Is each user name in the AD unique? That is, there is only one JOHN SMITH and next person with the same name would have to be somewhat different; e.g. JOHN SMITH2?
>>>>
>>>>Second question. Can you get ALL user names in the AD from a VFP 9 application? If yes, how?
>>>>
>>>>TIA
>>>
>>>For you second question this may help, it verifies the existence of a user, but you can easily change it to list all the users.
>>>
>>>
PROCEDURE verifyIfUserExists(tcUserID)
>>>LOCAL lcUserId
>>>lcUserId ='CN='+tcUserID
>>>objRootLDAP = Getobject("LDAP://RootDSE")
>>>strDNSDomain = objRootLDAP.Get("DefaultNamingContext") && Get the context
>>>strGroup = "CN=oeb-test,"
>>>strOU = "OU=Test,OU=OEB,OU=SAAS-users,"  && You correct specifications
>>>*' Prepare the OU and the Group
>>>objGroup = Getobject("LDAP://"+ strGroup + strOU + strDNSDomain)
>>>objOU =Getobject("LDAP://" +strOU + strDNSDomain)
>>>
>>>For Each objUser In objOU
>>>  If objUser.Class = Lower("User")
>>>    IF objUser.name = lcUserId
>>>      RETURN .T.
>>>    ENDIF
>>>  ENDIF
>>>Endfor
>>>RETURN .F.
>>>
>>>ENDPROC
>>
>>Mike,
>>
>>Are the following values something specific to the customer AD:
>>
>>RootDSE
>>"CN=oeb-test,"
>>"DefaultNamingContext"
>>
>>
>>And if so, what are the names of these parameters so that I can ask the customer IT?
>>
>>Thank you.
>
>Just to clarify RootDSE is not mine, it applies as is.

Thank you for clarifying.
What is the "CN=oeb-test,"? Is there a name for this parameter so I can ask the customer to provide it?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform