← Back to team overview

mahara-contributors team mailing list archive

[Bug 1396564] Re: Add password recovery with CLI

 

Testing instructions:

1. Install Mahara
2. Set up an institution with the "Persona" (aka BrowserID) authentication method.
3. Create a user "user1" who is using the Persona auth method.
4. At the command-line, execute the script. As with any Mahara CLI script, depending on your filesystem permissions you will probably need to run it as the same user as Apache in order to avoid permission warnings:

cd /path/to/mahara
sudo -u www-data htdocs/admin/cli/pwreset.php

5. Running the script without any arguments should simply display a help
message.

6. Running the script for "user1" should prompt you for a password, then
give you a message about how the user's password could not be changed
because they're not an the internal auth:

sudo -u www-data htdocs/admin/cli/pwreset.php -u=user1

7. Run it again with the -i flag, to force their auth method to be
changed:

sudo -u www-data htdocs/admin/cli/pwreset.php -u=user1 -i

8. You should now be able to log in to your Mahara install as user1,
using the password you entered at the command line.

9. Run it again, providing the password on the command-line:

sudo -u www-data htdocs/admin/cli/pwreset.php -u=user1 -p=password

10. Log in again as user1, with password "password". You should be
forced to reset your password after you log in.

11. Run it again, with the "-f=false" flag.

sudo -u www-data htdocs/admin/cli/pwreset.php -u=user1 -p=password
-f=false

12. Log in again as user1, with password "password". You should not be
forced to reset your password after you log in.

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1396564

Title:
  Add password recovery with CLI

Status in Mahara ePortfolio:
  In Progress

Bug description:
  Moodle offers many services accessible by CLI in the admin/cli folder
  and also in individual modulename/cli folders.

  One of the cli service provides a way for admin to change user's
  password, which is very convenient to do it quickly for one user or
  for many users, with some unix programming.

  I would like  to suggest you to adding such a cli service into the
  admin/cli folder for Mahara.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1396564/+subscriptions


References