Jump to content


Photo

forgot backend password, how do you reset?!

password backend reset password reset backend password forgot password

  • Please log in to reply
14 replies to this topic

#1 danielholanda

danielholanda

    Full Member

  • Members
  • PipPipPip
  • 53 posts
  • 1

Posted 03 September 2012 - 04:20 PM

Hello,

I see that the backend of processwire is simple. I like that but... I've forgotton my email for my backend project I'm creating locally with MAMP. Simple but... where is the button such as, "forgot password". I suppose I missing something obviuos but I cannot find it in the display neither in google or in these forums.

So,

How do you reset/retieve your password from you backend of processwire?

Greetings,

Dani

#2 diogo

diogo

    Hero Member

  • Moderators
  • 1,996 posts
  • 1073

  • LocationPorto, Portugal

Posted 03 September 2012 - 04:38 PM

Have a look at this thread http://processwire.c...orgot +password

#3 Soma

Soma

    Hero Member

  • Moderators
  • 3,188 posts
  • 1745

  • LocationSH, Switzerland

Posted 03 September 2012 - 04:41 PM

There's a Password Forgot module but not installed by default.

I think only solution would be to install new, or do this:

Create a /tool.php in the same directory as the /index.php in the root of PW install.

Paste in this code:

<?php
include("index.php");
wire("modules")->get("ProcessForgotPassword");

Save it and if necessary upload it to your server. Remember the file as you'll need it shortly.

Now call it from the browser http://yourdomain.com/tool.php and the Module will get installed and a Password forgot link should show up on the login screen.

Delete the tool.php.

Edit: You can, using this technique, also set a new password for the admin, see on the link Diogo posted.

@somartist | modules created | support me, flattr my work flattr.com


#4 danielholanda

danielholanda

    Full Member

  • Members
  • PipPipPip
  • 53 posts
  • 1

Posted 03 September 2012 - 04:55 PM

Thanks... Luckily I dodnt do too much, I will resintall and activate module. There should be a PDF with instructions and one of the first should be reset password module. If you have a lot of work already done... ufffff I would get mad. Thanks for your answers

#5 Soma

Soma

    Hero Member

  • Moderators
  • 3,188 posts
  • 1745

  • LocationSH, Switzerland

Posted 04 September 2012 - 03:07 AM

As being said you can set a new password through a script, install the module through the php script or if nothing helps reinstall (of course only if you haven't done anything yet). So no biggy at all if you have access to your files, which I assume you should have. This would be a matter of 1 minute and no need to reinstall.

So no need to going mad even if you developed for days on it.

The password is something you shouldn't forget, and the forgot password module isn't installed by default for security reasons.

@somartist | modules created | support me, flattr my work flattr.com


#6 ryan

ryan

    Hero Member

  • Administrators
  • 5,773 posts
  • 3116

  • LocationAtlanta, GA

Posted 04 September 2012 - 08:23 AM

You can always reset your password just by pasting this temporarily into any one of your templates, and then viewing a page that uses the template:

$u = $users->get('admin'); // or whatever your username is
$u->of(false); 
$u->pass = 'your-new-password';
$u->save();


#7 mike77

mike77

    Jr. Member

  • Members
  • PipPip
  • 31 posts
  • 5

  • LocationWarsaw, Poland

Posted 25 October 2012 - 02:27 AM

BTW, what is the location of login/password in the database? I didn't go into it but it would be practical to know.

#8 Pete

Pete

    Administrator

  • Administrators
  • 1,756 posts
  • 658

  • LocationChester, England

Posted 25 October 2012 - 09:37 AM

I think from memory that the table is called users (can't check from my phone) but the password would of course be encrypted so that wouldn't do you much good if you we're intending to reset it there.

#9 ryan

ryan

    Hero Member

  • Administrators
  • 5,773 posts
  • 3116

  • LocationAtlanta, GA

Posted 26 October 2012 - 10:35 AM

Passwords are in a table called field_password. They are hashed and salted, and not reversible, so no way to set or change them without going directly through the API.

#10 apeisa

apeisa

    Hero Member

  • Moderators
  • 2,525 posts
  • 851

  • LocationVihti, Finland

Posted 26 October 2012 - 02:22 PM

Little OT: is it possible to use password field on other templates?

#11 Soma

Soma

    Hero Member

  • Moderators
  • 3,188 posts
  • 1745

  • LocationSH, Switzerland

Posted 26 October 2012 - 02:30 PM

Where getting a little old!

It's field_pass not field_password

And yes you can put a "password" field in other templates :P

@somartist | modules created | support me, flattr my work flattr.com


#12 apeisa

apeisa

    Hero Member

  • Moderators
  • 2,525 posts
  • 851

  • LocationVihti, Finland

Posted 26 October 2012 - 02:32 PM

Soma: through API or with advanced mode?

#13 Soma

Soma

    Hero Member

  • Moderators
  • 3,188 posts
  • 1745

  • LocationSH, Switzerland

Posted 26 October 2012 - 02:38 PM

Add new field, select "password" field and enter name..

Ahhh you mean so it get's used as a real password field with encryption? I don't think but should be possible to add functionality through a module?

Edit: look normal so far, it works without anything!

@somartist | modules created | support me, flattr my work flattr.com


#14 apeisa

apeisa

    Hero Member

  • Moderators
  • 2,525 posts
  • 851

  • LocationVihti, Finland

Posted 26 October 2012 - 03:20 PM

Ah, brilliant! I tried to add the existing password field into a template without any luck on that :) Never realized that I could create new password fields, but it is indeed possible! Thanks Soma! Of course need to know how to calculate the password hash (to compare the one that gets added into a db), but that should be easy enough.

#15 Soma

Soma

    Hero Member

  • Moderators
  • 3,188 posts
  • 1745

  • LocationSH, Switzerland

Posted 26 October 2012 - 03:39 PM

you can use the $page->passwordfield->match("somepasswordstring") function to compare hashs.

@somartist | modules created | support me, flattr my work flattr.com






Also tagged with one or more of these keywords: password, backend, reset, password reset, backend password, forgot password

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users