Re: AD/ADAM Create User (VB.Net)
- From: will <will@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 14 Nov 2006 06:41:02 -0800
Hello Joe:
Thanks for the response. The values I used for the
strUser = "CN=lastname , firstname"
userPrincipalName = "tuser@xxxxxxxxxxxxxxxxx"
displayName = "lastname , firstname"
The objADAM a DirectoryEntry object. How do I know what schema is being
used? I'm confused about Active Directory and ADAM - they appear to be
interchangable terms yet with what I've read thus far there is a slight
difference. The target servers are Win 2003, developement box is WinXP Pro. I
installed ADAM adsiedit but I can't find the GAL entries.
When I look at the GAL via outlook, the far right column (Email) of the
address book shows the hierachy of the contact entry. An example,
/o=SIS/ou=First Group/cn=Recipients/cn=1test.
So while I'm in ADAM adsiedit I specify cn=Recipients and expect to get a
listing of the entries under that cn. In stead when I enter cn=Recipients
ADAm tool errors with "subref missing". Sorry for the off-topic ADAM issue
but I was hoping that a tool could provide me with some insight to the
AD/ADAM. I'm going to buy your book today. I did use the code fragments to
create a user for what I have now but I'm lacking the basic AD/ADAM knowledge.
Thanks again,
-Will
I
"Joe Kaplan" wrote:
You might like ch 10 of our book to help with some of this stuff. It is.
free from the website in my sig. There is also free VB.NET code on the site
from the book.
There are also a few ADAM specific things to do here. You need to specific
the application partition NC Name in your binding string in order for LDAP
to know where in ADAM to put the user:
LDAP://adamdnsname/OU=Users,O=myadampartition
(or whatever you created there)
Also, what is the value of strUser in the code below? It needs to be in
"RDN" format, ie "cn=someuser", assuming that you are creating an object
with the ADAM user schema and not something else.
Joe K.
--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"will" <will@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8C425E14-D43A-442F-A500-863F6DC68EE0@xxxxxxxxxxxxxxxx
I'm receiving the following error when attempting add a new user to the
AD.
The user account used have enterprise level rights. Any help would be
greatly
appreciated. Thanks! - Will
An invalid dn syntax has been specified. (Exception from HRESULT:
0x80072032)"
CODE:
Try
objADAM = New DirectoryEntry("LDAP://<domain>.com, "userid",
"password",
AuthenticationTypes.Secure)
objADAM.RefreshCache()
'
objUser = objADAM.Children.Add(strUser, "user")
objUser.Properties("displayName").Add(strDisplayName)
objUser.Properties("userPrincipalName").Add( _
strUserPrincipalName)
objUser.CommitChanges()
Catch ....
Dim lastname As String = "test"
Dim firstname As String = "user"
Dim email As String = "tuser@xxxxxxxxxxxxxxxxx"
'
strUser = "CN=" & lastname & "," & firstname
strDisplayName = lastname & "," & firstname
strUserPrincipalName = email
- Follow-Ups:
- Re: AD/ADAM Create User (VB.Net)
- From: Joe Kaplan
- Re: AD/ADAM Create User (VB.Net)
- References:
- Re: AD/ADAM Create User (VB.Net)
- From: Joe Kaplan
- Re: AD/ADAM Create User (VB.Net)
- Prev by Date: win 2000/2003 disk quotas - moving files
- Next by Date: Re: ADAM - group membership
- Previous by thread: Re: AD/ADAM Create User (VB.Net)
- Next by thread: Re: AD/ADAM Create User (VB.Net)
- Index(es):
Relevant Pages
|