Besides questioning the logic of allowing somebody else to have the permissions to do what you're talking about, there are several ways to do this.
DS* tools come to mind, as does joeware.net (there's always something there if you look).
If you intend to script it, you'll want to use sAMAccountName (you can easily know that) and possibly the domain if you have multiple domains, and derive DN from that. Basically, you'll attach to the directory, search for the sAMAaccountName, return the DN from that and use that to change the password.
If you search for it, you're very likely to find that code already written and posted on the net. ;)
Al
On 4/11/06, Oliver Marshall <[EMAIL PROTECTED]> wrote:
Hi,
I want to create a script that will allow a user here to change the
password of any other user.
I have found several examples, most based on the examples on the MS
site. Thing is, they all depend on knowing the Distinguished Name of the
user, and the poor old receptionist wont have a clue what that is.
Can anyone help me with a script that will change the password of a user
just knowing the username of the user ? At the least I'm after some code
to find the DN of a user from their username, and I can then use that
with the code I already have (I think).
Thanks
Olly
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
