Re: Can I reset a password or remove a username?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I wonder if you are remember correctly. You said you
"created a fairly simple admin page to reset a user's password"

Hard to believe. From what I've seen so far you need to write a custom
membership provider or else you have to know the existing password or the
answer to the passwordQuestion.

Maybe my "fairly simple" is simpler than yours :-)

Anyway, I think I can replace the default provider as shown below, but I
want to use the default values except when I change a password..

Can the code below be modified to produce a second provider without deleting
the default provider with requiresQuestionAndAnswer="true"?

Or do I actually have to produce a derived class?

If I do can I inherit from the default provider class?


Thanks a lot



<system.web>

?

<membership>

<providers>

<remove name="AspNetSqlMembershipProvider" />

<add name="AspNetSqlMembershipProvider"

type="System.Web.Security.SqlMembershipProvider"

connectionStringName="LocalSqlServer"

enablePasswordRetrieval="false"

enablePasswordReset="true"

requiresQuestionAndAnswer="false"

applicationName="/"

requiresUniqueEmail="false"

passwordFormat="Hashed"

maxInvalidPasswordAttempts="10"

minRequiredPasswordLength="7"

minRequiredNonalphanumericCharacters="0"

passwordAttemptWindow="10" />

</providers>

</membership






"Gregory A. Beamer" <NoSpamMgbworld@xxxxxxxxxxxxxxxxxx> wrote in message
news:BE10458B-D667-4325-9DB2-514AEBDAF5C3@xxxxxxxxxxxxxxxx
If you are using ASP.NET membership, you can exercise full cotrol over the
objects. You can even give the user full control to fix his problem,
although I would not recommend it if he forgot everything, as that is a
security hole wide enough for a novice hacker.

If you, as an admin, need to do this, Code against the Membership objects.
I will have to peruse my code base (now on DVD) and find a sample, as I
have already created a fairly simple admin page to reset a user's
password. Hopefully I can get to this in the next few days. Until then, I
would do a Google for ASP.NET Membership and start examining the objects.
It is where you will find the way to solve the problem.

One gotcha (may not apply to you, but this is a public forum). If you try
to create a common admin tool, be careful about how you instantiate the
user's object, as you can lock up their account for the duration of your
session (20 minutes after you log off).

--
Gregory A. Beamer
MVP: MCP: +I, SE, SD, DBA

Blog:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think Outside the Box! |
********************************************
"AAaron123" <aaaron123@xxxxxxxxxxxxxx> wrote in message
news:%23$KsyiOcJHA.5092@xxxxxxxxxxxxxxxxxxxxxxx
If a user gave an incorrect the email address or forgot the answer he
gave to the specified question, I like to be able to reset the password.

If that is not possible, I'd like to be able to remove the Username so he
can re-register and use the same name.

I know about System.Web.Security.Roles and am hoping there is something
like that for password or user but can't find it.




Thanks





.



Relevant Pages

  • Re: Can I reset a password or remove a username?
    ... If you are using ASP.NET membership, you can exercise full cotrol over the objects. ... I will have to peruse my code base and find a sample, as I have already created a fairly simple admin page to reset a user's password. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Can I reset a password or remove a username?
    ... it appears I must know the password answer to reset the ... passwordAnswer As String _ ... If you, as an admin, need to do this, Code against the Membership ... One gotcha. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Can I reset a password or remove a username?
    ... passwordAnswer As String _ ... "Gregory A. Beamer" wrote in message ... I will have to peruse my code base and find a sample, as I have already created a fairly simple admin page to reset a user's password. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: [Full-disclosure] WordPress <= 2.8.3 Remote admin reset password
    ... And the admin passwd would be reseted. ... WordPress is a state-of-the-art publishing platform with a focus on ... The way Wordpress handle a password reset looks like this: ... An attacker could exploit this vulnerability to compromise the admin ...
    (Full-Disclosure)
  • Re: Sign on/off problem
    ... Answers to A. its not on a network but I can add it to ... You can put the disk into an external USB disk case, ... Question 2 Can I use Safemode with command promt to reset the Admin. ...
    (microsoft.public.windowsxp.general)