Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • CodeMaster2008 151 posts 184 karma points
    Jun 23, 2010 @ 04:40
    CodeMaster2008
    0

    Change passwords outside umbraco

    I know how to use the API to change a user or member password.
    My problem here is that I will need to change it "outside umbraco".

    The reason is that I'm trying to create a script to automate the installation. Basically it will unzip a umbraco installation on a new website and create the database. After that, i'd like the script to change the admin password, so, it wont be identical on all sites.

    I believe I could write it directly to the database, just would like to know if somebody can point me on the right direction (which tables, etc) so i don't mess things up.

    Thanks in advance.

  • Daniel Burge 11 posts 31 karma points
    Jun 25, 2010 @ 23:14
    Daniel Burge
    0

    Hi,

    For users (rather than members), the correct table is umbracoUser. You can see the admin account is stored in that table. The password is in clear text within that table.

    Daniel

  • Steen Tøttrup 191 posts 291 karma points c-trib
    Jun 26, 2010 @ 10:52
    Steen Tøttrup
    0

    Well, whether or not the password is in clear text depends on a setting (look at the membership section in the web.config file), in the providers. If the <add> node has an passwordFormat attribute with the value "Hashed", the passwords wont be in clear text.

    I can't remember which method is used for hashing (MD5 + Base64 encoding?).

     

  • CodeMaster2008 151 posts 184 karma points
    Jun 30, 2010 @ 09:45
    CodeMaster2008
    0

    Thanks Steen,

    Well on one old installation the passwords are on plain text, however, on this new one base don 4.1 (latter upgraded to 4.5) the passwords are encripted.

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jun 30, 2010 @ 10:24
    Dirk De Grave
    0

    How about using webservices, which I'd prefer if you need to change "something" from "outside umbraco"?

     

    Cheers,

    /Dirk

  • CodeMaster2008 151 posts 184 karma points
    Jun 30, 2010 @ 13:20
    CodeMaster2008
    0

    webservice sounds good, my only concern is security since it will allow password changes but, looks like the easyer way to go.

  • CodeMaster2008 151 posts 184 karma points
    Jun 30, 2010 @ 16:18
    CodeMaster2008
    0

    Got stock in here, i spent the last 3 hours trying to figure out how to change a user (not member) password.
    The User.Password property will save the password as plain text on the database and since the provider is set to use a hashed password, it wont work,
    There was a helper class i noticed people use to encode the password but is missing from the new asseblies (see this post).

    Changing a member password looks easy as calling a "ChangePassword" method, what about the user?

Please Sign in or register to post replies

Write your reply to:

Draft