473,379 Members | 1,533 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,379 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 22745
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.