473,249 Members | 1,761 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,249 software developers and data experts.

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 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

Nov 22 '05 #1
10 22727
Mario,

You can not get someones password with code.

Ken
----------------
"Mario Rodriguez" <mr********@avantica.net> wrote in message
news:uF**************@tk2msftngp13.phx.gbl...
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

Nov 22 '05 #2
Mario,

You can not get someones password with code.

Ken
----------------
"Mario Rodriguez" <mr********@avantica.net> wrote in message
news:uF**************@tk2msftngp13.phx.gbl...
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

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********@avantica.net> wrote in message
news:uF**************@tk2msftngp13.phx.gbl...
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

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********@avantica.net> wrote in message
news:uF**************@tk2msftngp13.phx.gbl...
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

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

¤ 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

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******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 22 '05 #6
On Sat, 3 Apr 2004 12:39:01 -0600, "Mario Rodriguez" <mr********@avantica.net> wrote:

¤ 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

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******@ameritech.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("ChangePassword", 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***********************@swspectrum.com> wrote in message
news:1s********************************@4ax.com...
On Sat, 3 Apr 2004 12:39:01 -0600, "Mario Rodriguez" <mr********@avantica.net> wrote:
¤ 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

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******@ameritech.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("ChangePassword", 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***********************@swspectrum.com> wrote in message
news:1s********************************@4ax.com...
On Sat, 3 Apr 2004 12:39:01 -0600, "Mario Rodriguez" <mr********@avantica.net> wrote:
¤ 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

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******@ameritech.net
Microsoft MVP (Visual Basic)

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

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

Willy.

"Mario Rodriguez" <mr********@avantica.net> wrote in message
news:u1**************@tk2msftngp13.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("ChangePassword", 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***********************@swspectrum.com> wrote in message
news:1s********************************@4ax.com...
On Sat, 3 Apr 2004 12:39:01 -0600, "Mario Rodriguez"

<mr********@avantica.net> wrote:

¤ 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

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******@ameritech.net
Microsoft MVP (Visual Basic)


Nov 22 '05 #10
You should Invoke "SetPassword" to reset a password.

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

Willy.

"Mario Rodriguez" <mr********@avantica.net> wrote in message
news:u1**************@tk2msftngp13.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("ChangePassword", 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***********************@swspectrum.com> wrote in message
news:1s********************************@4ax.com...
On Sat, 3 Apr 2004 12:39:01 -0600, "Mario Rodriguez"

<mr********@avantica.net> wrote:

¤ 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

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******@ameritech.net
Microsoft MVP (Visual Basic)


Nov 22 '05 #11

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

Similar topics

5
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...
11
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
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...
0
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...
0
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...
2
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...
18
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...
2
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...
3
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...
7
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...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.