prevent change password
Last Post 04/16/2011 12:03 PM by Joseph Craig. 3 Replies.
Author Messages
Rami
Nuke Active Member
Nuke Active Member
Posts:35


--
04/16/2011 1:10 AM  
Hi I want to prevent a user from changing his password, How I can do that ?
thanks
Joseph Craig
DNN MVP
Posts:11667


--
04/16/2011 8:47 AM  
You will find this in your web.config file:

        <!-- Configuration for DNNSQLMembershipProvider:
              connectionStringName="string"                          Name corresponding to the entry in <connectionStrings> section where the connection string for the provider is specified
              passwordAttemptThreshold="int"                      The number of failed password attempts, or failed password answer attempts that are allowed before locking out a user?s account
              passwordAttemptWindow="int"                         The time window, in minutes, during which failed password attempts and failed password answer attempts are tracked
              enablePasswordRetrieval="[true|false]"            Should the provider support password retrievals
              enablePasswordReset="[true|false]"                 Should the provider support password resets
              requiresQuestionAndAnswer="[true|false]"       Should the provider require Q &amp; A
	      minRequiredPasswordLength="int"		          The minimum password length
              minRequiredNonalphanumericCharacters="int"  The minimum number of non-alphanumeric characters
              applicationName="string"                                    Optional string to identity the application: defaults to Application Metabase path
              requiresUniqueEmail="[true|false]"                     Should the provider require a unique email to be specified
              passwordFormat="[Clear|Hashed|Encrypted]"   Storage format for the password: Hashed (SHA1), Clear or Encrypted (Triple-DES)
              description="string"                                              Description of what the provider does
        -->
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="SiteSqlServer" 
                 enablePasswordRetrieval="true"
                 enablePasswordReset="true"
                 requiresQuestionAndAnswer="false" 
                 minRequiredPasswordLength="7" 
                 minRequiredNonalphanumericCharacters="0" 
                 requiresUniqueEmail="true" 
                 passwordFormat="Encrypted" 
                 applicationName="DotNetNuke" 
                description="Stores and retrieves membership data from the local Microsoft SQL Server database" />


You can change enablePasswordRetrieval to "false." If you do that, you should probabaly also set enablePasswordReset to "false."

Joe Craig, Patapsco Research Group
Complete DNN Support
Rami
Nuke Active Member
Nuke Active Member
Posts:35


--
04/16/2011 9:38 AM  
hi, this will apply on all portals not just the one I need ?????
Joseph Craig
DNN MVP
Posts:11667


--
04/16/2011 12:03 PM  
Yes, that will apply to all portals.

You can remove the Forgot Password link from the Login page with a little bit of CSS. To do so, you will need to determine the Id of the Forgot Password element. I use Web Developers Toolbar in Firefox to do that, or you can look at the page source. In my case it is dnn_ctr1003_Login_tdPassword. This CSS addition makes it disappear:

#dnn_ctr1003_Login_tdPassword{display:none}

For the Manage Password link on the UserProfile page, the Id on my site is dnn_ctr_ManageUsers_cmdPassword.

You can put the CSS additions in portal.css (edit in the Admin Site Settings, Stylesheet Editor section) to make them apply just to that portal.

These CSS changes don't actually remove the functionality, and anyone who knows how to write the appropriate DotNetNuke URL to get to them can change their password. But, I would expect that the CSS changes would be 99% effective, or even more.

Joe Craig, Patapsco Research Group
Complete DNN Support


---