kbradford has asked for the wisdom of the Perl Monks concerning the following question:

I'm writing a program that takes a password from one account and checks it against others to see if the accounts are in sync. The check passwords (&verify) sub works great, but I'm having trouble getting the initial password from the NT user. I'm trying to use AdminMisc to get the password, but it won't work. Is there any way to get the password value and pass it to the &verify sub? Thanks, Kevin.
Win32::AdminMisc::UserGetAttributes($server, $user_id, $full_name, $ck +_passwd, $passwordage, $privilege, $homedir, $comment, $flags, $scrip +tpath); %user_rec = ('name' => $user_id, 'password' => $ck_passwd, ); &Verify($server,$user_rec{'name'},$user_rec{'password'});

Replies are listed 'Best First'.
(tye)Re: Reading Password
by tye (Sage) on Jun 18, 2001 at 18:58 UTC

    The user password is not returned as plain text for security reasons, even if you aren't using Perl. The solution was given to you the last time you asked this.

            - tye (but my friends call me "Tye")
      I realize that I cannot get the plain text password. What I am asking is if there is a way to retrieve and check a password. I do not wish to display the password, simply compare it to another value. My previous post concerned checking the password when we already had another one to check against. Now this questions asks if we can check the password when we retrieve another password from a user. I do not want to use a transaction file that contains passwords (how I have it now) and was simply wondering if I could automatically get the users passwords. Thanks, Kevin.