OVH Cloud OVH Cloud

Add a user into a Organisationnel Unit (OU)

2 réponses
Avatar
manu
Hi everybody !

I know how to create a user, with NetUserAdd, and put it into a group, with
NetGroupAddUser.

But I would like to add the user into an OU.
The only API I found out, about OU, is: NetGetJoinableOUs, into the
'Directory Service Functions'
located in:
ms-help://MS.MSDNQTR.2003FEB.1036/netmgmt/netmgmt/directory_service_function
s.htm


but, why can't i find an API which name is NetOUAddUser ? (like
NetGroupAddUser)

and else, how to put a user into an OU ?

thanks

2 réponses

Avatar
adebaene
"manu" wrote in message news:...
Hi everybody !

I would like to add the user into an OU.



Use ADSI.
See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adsi/adsi/creating_and_deleting_objects.asp
for an example.

You can also use the LDAP protocol directly : See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ldap/ldap/lightweight_directory_access_protocol_ldap_api.asp?frame=true

Arnaud
MVP - VC

Avatar
manu
thanks a lot !


"Arnaud Debaene" a écrit dans le message de
news:
"manu" wrote in message
news:...

Hi everybody !

I would like to add the user into an OU.



Use ADSI.
See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adsi/adsi/creating_and_deleting_objects.asp

for an example.

You can also use the LDAP protocol directly : See

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ldap/ldap/lightweight_directory_access_protocol_ldap_api.asp?frame=true


Arnaud
MVP - VC