473,407 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

C# ADAM set userPassord Attribute

122 100+
I am having a weird problem.

I have used the following to set the userpassword with a byte array string and while I am not getting an error when I open adam it says the userPassword attribute for the user is <not set>

Can anyone help or guide me?


Expand|Select|Wrap|Line Numbers
  1. _PEnt.Properties["userPassword"].Clear();
  2. _PEnt.Properties["userPassword"].Value = myHexString;
  3.  
Sep 15 '08 #1
2 4274
DragonLord
122 100+
Any thoughts anyone?
Sep 17 '08 #2
DragonLord
122 100+
Well thanks for all the replies lol......

Since I had to figure this one out myself i thought I would be nice and share the answer to anyone else that might come across this same issue.

Expand|Select|Wrap|Line Numbers
  1.  
  2. public void SetPassword(DirectoryEntry _PEnt)
  3.     {
  4.         String UserPath = "LDAP://localhost:10389/CN= " + FirstName + " " + LastName + ",CN=GeneralUsers,cn=myapplication,c=CAN";
  5.         DirectoryEntry _PWDUser = new DirectoryEntry(UserPath);
  6.  
  7.         _PWDUser.Options.PasswordPort = 10389;
  8.         _PWDUser.Options.PasswordEncoding = PasswordEncodingMethod.PasswordEncodingClear;
  9.         _PWDUser.Invoke("SetPassword", new object[] { Password });
  10.         _PWDUser.Properties["msDS-UserAccountDisabled"].Value = false;
  11.  
  12.     }
  13.  
The key is the options part. for some reason without this it just wasn't saving the user password and because it is a read only property and not visible through ADAM it was a pain in my butt...
Sep 20 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: F. Eken | last post by:
Hi, Anyone tried or has any thoughts about using ADAM (active directory application mode) as a database for application objects ? In theory it seems like a good idea... but how much data and...
2
by: Frederick | last post by:
Hi, I am using ADAM as my Data Store for my web application and although this seems to be fine when using windows authentication with my local account when I try to create a new user and use...
3
by: Lekyan | last post by:
I have problem setting the password for an ADAM user using C#. I used the SetPassword code given in the Microsoft page, changed several parameters, but ran into an exception. I wonder if other...
1
by: Michael Herman \(Parallelspace\) | last post by:
In the thread below from microsoft.public.windows.server.active_directory, Joe Kaplan point out there is a ActiveDirectoryMembershipProvider for AD but there doesn't appear to be an AD/ADAM...
0
by: shikarishambu | last post by:
I am trying to get my ASP.NET web application to use ADAM as the membership provider. I have an ADAM instance setup on my machine (Windows 2003 server) running under Network Services account. And,...
3
by: Anthony | last post by:
I am looking for a ready-made contacts database, large scale, probably using ADAM as the backend and asp.net as the front end. Does anyone know of such a thing? Thanks, Anthony
1
by: datta.adsule | last post by:
How To acess Adam from IIS server service provider...
3
by: Brian McCullough | last post by:
Hello, I am trying to query ADAM using the ActiveDirectoryMembershipProvider in my ASP.NET 2.0 application, but have been unsuccessful. I have followed the steps in these blog posts, but still...
0
by: =?Utf-8?B?SmFzb24gUmljaG1laWVy?= | last post by:
Can someone provide me with a code snippet of how to retrieve the password policy for an instance of ADAM? I have found a few articles that explain how to do this in Active Directory but they...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.