473,774 Members | 2,176 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Obtaining the password of an active directory user

Hi people, Does anyone have some idea how to get the password of an active
directory user?

I tried using the DirectorySearch er object to find the user and the
DirectoryEntry. Password property to get the value, but always returns "null"
and I'm totally sure that the password is not null

thanks

Nov 22 '05 #1
10 22852
Mario,

You can not get someones password with code.

Ken
----------------
"Mario Rodriguez" <mr********@ava ntica.net> wrote in message
news:uF******** ******@tk2msftn gp13.phx.gbl...
Hi people, Does anyone have some idea how to get the password of an active
directory user?

I tried using the DirectorySearch er object to find the user and the
DirectoryEntry. Password property to get the value, but always returns "null" and I'm totally sure that the password is not null

thanks

Nov 22 '05 #2
Mario,

You can not get someones password with code.

Ken
----------------
"Mario Rodriguez" <mr********@ava ntica.net> wrote in message
news:uF******** ******@tk2msftn gp13.phx.gbl...
Hi people, Does anyone have some idea how to get the password of an active
directory user?

I tried using the DirectorySearch er object to find the user and the
DirectoryEntry. Password property to get the value, but always returns "null" and I'm totally sure that the password is not null

thanks

Nov 22 '05 #3
I am not 100% sure but I believe that the password is stored only after it
has been encrypted and the encryption is one way.

To validate a user it takes the password they enter in, encrypts it and then
compares the encrypted results to make sure they match.

This is why the only option an admin has for a person that forgot their
password it to rest it to something instead of telling the user what it is
currently set to.

"Mario Rodriguez" <mr********@ava ntica.net> wrote in message
news:uF******** ******@tk2msftn gp13.phx.gbl...
Hi people, Does anyone have some idea how to get the password of an active
directory user?

I tried using the DirectorySearch er object to find the user and the
DirectoryEntry. Password property to get the value, but always returns "null" and I'm totally sure that the password is not null

thanks

Nov 22 '05 #4
I am not 100% sure but I believe that the password is stored only after it
has been encrypted and the encryption is one way.

To validate a user it takes the password they enter in, encrypts it and then
compares the encrypted results to make sure they match.

This is why the only option an admin has for a person that forgot their
password it to rest it to something instead of telling the user what it is
currently set to.

"Mario Rodriguez" <mr********@ava ntica.net> wrote in message
news:uF******** ******@tk2msftn gp13.phx.gbl...
Hi people, Does anyone have some idea how to get the password of an active
directory user?

I tried using the DirectorySearch er object to find the user and the
DirectoryEntry. Password property to get the value, but always returns "null" and I'm totally sure that the password is not null

thanks

Nov 22 '05 #5
On Sat, 3 Apr 2004 12:39:01 -0600, "Mario Rodriguez" <mr********@ava ntica.net> wrote:

¤ Hi people, Does anyone have some idea how to get the password of an active
¤ directory user?
¤
¤ I tried using the DirectorySearch er object to find the user and the
¤ DirectoryEntry. Password property to get the value, but always returns "null"
¤ and I'm totally sure that the password is not null

The documentation is somewhat misleading. The Password property is used for validating user
credentials and not for retrieving a use's password from AD.
Paul ~~~ pc******@amerit ech.net
Microsoft MVP (Visual Basic)
Nov 22 '05 #6
On Sat, 3 Apr 2004 12:39:01 -0600, "Mario Rodriguez" <mr********@ava ntica.net> wrote:

¤ Hi people, Does anyone have some idea how to get the password of an active
¤ directory user?
¤
¤ I tried using the DirectorySearch er object to find the user and the
¤ DirectoryEntry. Password property to get the value, but always returns "null"
¤ and I'm totally sure that the password is not null

The documentation is somewhat misleading. The Password property is used for validating user
credentials and not for retrieving a use's password from AD.
Paul ~~~ pc******@amerit ech.net
Microsoft MVP (Visual Basic)
Nov 22 '05 #7
My situation is the following:

1- I need to change the user password programatically , without the Active
Directory Snap-in (MMC)
2- The application is going to be used by an administrator that shouldn't
know the users passowords
3- I tried with setting the Password property of the DirectoryEntry object
and doesn't throws any exception, but never really change the password, so I
tried
with directoryEntry. Invoke("ChangeP assword", new object[] {oldPwd,newPwd });

and works fine, but I have to give the current password

If someone can give any idea how to do that I'll thank you a lot
"Paul Clement" <Us************ ***********@sws pectrum.com> wrote in message
news:1s******** *************** *********@4ax.c om...
On Sat, 3 Apr 2004 12:39:01 -0600, "Mario Rodriguez" <mr********@ava ntica.net> wrote:
¤ Hi people, Does anyone have some idea how to get the password of an active ¤ directory user?
¤
¤ I tried using the DirectorySearch er object to find the user and the
¤ DirectoryEntry. Password property to get the value, but always returns "null" ¤ and I'm totally sure that the password is not null

The documentation is somewhat misleading. The Password property is used for validating user credentials and not for retrieving a use's password from AD.
Paul ~~~ pc******@amerit ech.net
Microsoft MVP (Visual Basic)

Nov 22 '05 #8
My situation is the following:

1- I need to change the user password programatically , without the Active
Directory Snap-in (MMC)
2- The application is going to be used by an administrator that shouldn't
know the users passowords
3- I tried with setting the Password property of the DirectoryEntry object
and doesn't throws any exception, but never really change the password, so I
tried
with directoryEntry. Invoke("ChangeP assword", new object[] {oldPwd,newPwd });

and works fine, but I have to give the current password

If someone can give any idea how to do that I'll thank you a lot
"Paul Clement" <Us************ ***********@sws pectrum.com> wrote in message
news:1s******** *************** *********@4ax.c om...
On Sat, 3 Apr 2004 12:39:01 -0600, "Mario Rodriguez" <mr********@ava ntica.net> wrote:
¤ Hi people, Does anyone have some idea how to get the password of an active ¤ directory user?
¤
¤ I tried using the DirectorySearch er object to find the user and the
¤ DirectoryEntry. Password property to get the value, but always returns "null" ¤ and I'm totally sure that the password is not null

The documentation is somewhat misleading. The Password property is used for validating user credentials and not for retrieving a use's password from AD.
Paul ~~~ pc******@amerit ech.net
Microsoft MVP (Visual Basic)

Nov 22 '05 #9
You should Invoke "SetPasswor d" to reset a password.

.....
directoryEntry. Invoke("SetPass word", new object[] {newPasswd});

Willy.

"Mario Rodriguez" <mr********@ava ntica.net> wrote in message
news:u1******** ******@tk2msftn gp13.phx.gbl...
My situation is the following:

1- I need to change the user password programatically , without the Active
Directory Snap-in (MMC)
2- The application is going to be used by an administrator that shouldn't
know the users passowords
3- I tried with setting the Password property of the DirectoryEntry object
and doesn't throws any exception, but never really change the password, so
I
tried
with directoryEntry. Invoke("ChangeP assword", new object[]
{oldPwd,newPwd });

and works fine, but I have to give the current password

If someone can give any idea how to do that I'll thank you a lot
"Paul Clement" <Us************ ***********@sws pectrum.com> wrote in message
news:1s******** *************** *********@4ax.c om...
On Sat, 3 Apr 2004 12:39:01 -0600, "Mario Rodriguez"

<mr********@ava ntica.net> wrote:

¤ Hi people, Does anyone have some idea how to get the password of an

active
¤ directory user?
¤
¤ I tried using the DirectorySearch er object to find the user and the
¤ DirectoryEntry. Password property to get the value, but always returns

"null"
¤ and I'm totally sure that the password is not null

The documentation is somewhat misleading. The Password property is used

for validating user
credentials and not for retrieving a use's password from AD.
Paul ~~~ pc******@amerit ech.net
Microsoft MVP (Visual Basic)


Nov 22 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1022
by: Mario Rodriguez | last post by:
Hi people, Does anyone have some idea how to get the password of an active directory user? I tried using the DirectorySearcher object to find the user and the DirectoryEntry.Password property to get the value, but always returns "null" and I'm totally sure that the password is not null thanks
11
31955
by: Jet Leung | last post by:
Hi all, How can I modify users in Active Directory ? Actually , I want to change the Active Directory user password . But how can I do that?
0
1959
by: S Lemen | last post by:
Hi, How are Active Directory user object attributes removed in VB .Net? The remove method succeeds but the CommitChanges errors with: "The attribute syntax specified to the directory service is invalid." 'code: ' oAdDirEntry is a Directory Services DirectoryEntry object, which is an AD user object.
0
1647
by: Kooki | last post by:
Hi, I am developing a small programme to add ACTIVE DIRECTORY users to another server. everything works fine .. I get the users from AD using LDAP but while adding users I need to get the user in the form of Domain\UserName. I get the domain name of our server but I face another problem which is our server name is "Preston" which I get it easily but user format in active directory is in the form of "Preston0\UserName" I have tried all...
0
1494
by: Kooki | last post by:
Hi, I am developing a small programme to add ACTIVE DIRECTORY users to another server. everything works fine .. I get the users from AD using LDAP but while adding users I need to get the user in the form of Domain\UserName. I get the domain name of our server but I face another problem which is our server name is "Preston" which I get it easily but user format in active directory is in the form of "Preston0\UserName" I have tried all...
2
10112
by: Daniel Knöpfel | last post by:
Hello all In our project we have been using the samAccount name to authenticate users against the active directory. As the samAccountName is limited to 20 characters, we are going to use the userPrincipalName. Unfortunately, i couldtnt make it work until now. I ve got a .Net programm that access the active directory through the third party dll "Interop.ActiveDs.dll" (namespace ActiveDs). The code to create the user with using the...
18
23792
by: Arthur | last post by:
Hi All, I would like to get the name of the user given their networkID, is this something Active Directory would be useful for?(For intranet users) If so, can you please point me to some sample code/examples? Thanks in advance, Arthur
2
1515
by: AxOn | last post by:
Hi, I'm trying to make a php message board on our company's Intranet that can only be edited by a specific user group. The group "writers" is managed in active directory. Is it possible to automatically check if the user that is logged in to windows and is watching the site is a part of the group "writers"? And if that user is a part of writers then an "Edit" button would be displayed on the site. The intranet site runs on Apache 2.2
3
2459
by: Chris Noble | last post by:
I need to be able to read and add to the collection of email addesses for an Active Directory User with a mailbox. I assume that this is a collection object. However I can't find any help on which technology to use. I can create and access the properties for a user using System.DirectoryServices.DirectoryEntry and then create a mailbox using CDOEXM.IMailboxStore which adds an e-mail address automatically. There is an email property on...
7
2781
by: Vio | last post by:
Hello everyone, i currently a beginner in php. I want to ask about Win2003 Active Directory users. Is it possible to retrieve Win2003 AD (just username & password) with php. I'm currenty developing web based application for my small office. I put my Apache+php+MySQL in Win2003 Server. My Clients using IE as default browser. What i want to do is to integrated active directory user with my application.
0
9621
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10106
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10040
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8939
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7463
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6717
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4012
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3611
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2852
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.