DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Force users to change password.

 3 Replies
 0 Subscribed to this topic
 40 Subscribed to this forum
Sort:
Author
Messages
New Around Here
Posts: 7
New Around Here

Is there a way to force password changes to the users that do not meet our new password requirements?

Thanks

Veteran Member
Posts: 349
Veteran Member
3 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
MVP
MVP
You're an MVP!
Engaged Reader
Engaged Reader
You are an engaged reader!
Avid Reader
Avid Reader
Avid Reader art thou!
The Users database table has an UpdatePassword column, I guess just setting it to true for all users would force all users to have to change their passwords on next login. That beeing said, I would test it first just to make sure my guess is right here...
Senior Member
Posts: 1607
Senior Member
MVP
MVP
You're an MVP!
New Poster
New Poster
Congrats on posting!

Hello!  

There currently isn't an easy way to just force this on all user accounts on the site, but you can user-by-user.  However, this won't help.  I don't often put in SQL for people to run, for all kinds of reasons.  However, it's the best way to help you in this instance.  

The query below is a great start for what you're looking for.  You simply want to change the <code>UpdatePassword</code> column value in the <code>Users</code> table from <code>0</code> to <code>1</code> to trigger a password reset the next time someone attempts to log in.  

<code>UPDATE &#91;Users&#93; <br /> SET &#91;UpdatePassword&#93; = 1 <br /> WHERE IsSuperUser = 0;</code>

The query above does not take anything into account, except for not updating any user account that is a superuser.  You may want to filter by the site (portal) using the <code>UserPortals</code> table, by security role (group) using the <code>Roles</code> table, etc.  

You can run this all from the SQL Console, without having to log into the database directly.  

New Around Here
Posts: 7
New Around Here

Thanks everyone, that's what I thought.

Doing an update on the UpdatePassword = 1 

 

 

These Forums are for the discussion of the open source CMS DNN platform and ecosystem.

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

  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
  3. 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.
  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  5. No Flaming or Trolling.
  6. No Profanity, Racism, or Prejudice.
  7. Site Moderators have the final word on approving / removing a thread or post or comment.
  8. English language posting only, please.

Would you like to help us?

Awesome! Simply post in the forums using the link below and we'll get you started.

Get Involved