New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...SQL and SQL Ser...SQL and SQL Ser...Reset Passwords scriptReset Passwords script
New Post
5/30/2012 2:46 PM

I need to see if there is a stored procedure or code I can write to reset a large number of passwords at one time.

I have an old portal that stores the username and passwords(unencrypted).  I used a script to migrate all these users to a DEV Dotnetnuke site by having it copy a 'MigrationUser' account with the Password and PasswordSalt.  So, now all my users have the same password.  Great for testing, but not so good to ask 1200+ users (spread out across the state) to all reset their passwords at once during go-live.

Since I have a list of all their passwords, is there a script or program I can write to change the password of each user on the DEV site to their existing password?  I just need some code that can change a user's password. I've tried some aspnet_Membership stored procedures, but they do not encrypt the password.  It just writes the password to the aspnet_membership table in cleartext.



New Post
5/31/2012 3:15 AM
password in DNN is managed by MS membership component, I would use a .Net script to update password instead of trying to set it in SQL directly. There are modules for mass updates in the store like PHDobson BulkUserManager, which might be used for this purpose as well.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
New Post
5/31/2012 3:50 AM
I agree with Sebastian e.g. code such as could be adapted easily to read in username/passwords from a database/file and build up the list of required users with their correct passwords (and by using the API methods DotNetNuke ensures all other relevant data is updated and database referential integrity is preserved)

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
New Post
6/1/2012 11:06 AM
Thanks! This got me on the right path and led me to something like this:

MembershipUser mu = Membership.GetUser(user);
string oldPass = mu.GetPassword();

if (Newpw.Length > 0)
success = mu.ChangePassword(oldPass, Newpw);
resetPW = mu.ResetPassword();
success = true;
HomeHomeDevelopment and...Development and...SQL and SQL Ser...SQL and SQL Ser...Reset Passwords scriptReset Passwords script

These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out