Talk About Network

Google





Software > ADSI General > Re: Adding user...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 3 Topic 5350 of 5437
Post > Topic >>

Re: Adding users from multiple domains to a local group

by "Richard Mueller [MVP]" <rlmueller-nospam@[EMAIL PROTECTED] > Aug 1, 2008 at 11:33 AM

Leo wrote:

> Environment: Web application adds users from multiple domains to a local
> group. The code that does this uses ADSI (WinNT provider) and runs in a 
> COM+
> component using the identity of an account that is part of the local
> administrator group. Server is windows 2003.
>
> Issue:
>   Set objAdsUser = GetObject("WinNT://" & sDomain & "/" & sUser)
>   is returning -2147024843 (path not found).
>
> The code that searches for the users before attemption the add is
working
> properly and returning the list of users. It uses the LDAP provider.
>
> If I log in to the server using the same account as the one that the
code
> runs under, I am able to select and add the users from that domain to a 
> local
> group using Computer Management. So it does not seem to be trust issues
or
> accessibility to the domain. Would anyone have an idea of what to look 
> for?
> Or perhaps how to code this feature, so that I won't run into this issue

> and
> have it behave similar to Computer Management?
>

Is sDomain the NetBIOS name of the domain and sUser the NT name of the
user 
(the pre-Windows 2000 logon name, the value of the sAMAccountName 
attribute). Note that sUser is not the Common Name of the user (the value
of 
the cn attribute).

If you are using the LDAP provider to find the user, then you can retrieve

the Distinguished Name (DN). I would use the NameTranslate object to
convert 
this to the NT format of the name, which is <domain>\<user>, where
<domain> 
is the NetBIOS name of the domain and <user> is the pre-Windows 2000 logon

name. See this link:

http://www.rlmueller.net/NameTranslateFAQ.htm

Number 11 gives VBScript code to convert a DN and then bind with the WinNT

provider.

-- 
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--
 




 3 Posts in Topic:
Adding users from multiple domains to a local group
=?Utf-8?B?TGVv?= <Leo@  2008-08-01 07:19:01 
Re: Adding users from multiple domains to a local group
"Richard Mueller [MV  2008-08-01 11:33:56 
Re: Adding users from multiple domains to a local group
=?Utf-8?B?TGVv?= <Leo@  2008-08-01 13:23:19 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Thu Jan 8 19:53:59 PST 2009.