Illustration of connected portfolio elements

Portfolios for your
learning community

Try out Mahara

Create portfolios

Using Mahara, students and staff create their personal learning stories by uploading evidence of activities they have participated in, and embedding publicly accessible content they have previously put online. They can write reflections on their experiences that frame this evidence, map it to competencies or registration requirements, and provide necessary context.

Mahara can be used for many different portfolio purposes, such as study, professional development, work-integrated learning, assessment, showcase and presentation, and employability.

Learn about the portfolio options

Illustration of a person with their portfolio
Illustration of a paper airplane representing sharing

Share work

Mahara allows portfolios to be shared flexibly with one person, a specific group of people, or the entire world. Access can be further restricted to a particular time frame or just within an assessment task.

Find out about sharing portfolios

Engage with others

Mahara makes it easy to comment and give feedback. Portfolios can also be submitted to learning management systems via LTI (Learning Tools Interoperability) for marking.

Groups in Mahara allow people to create portfolios collaboratively and engage in forum discussions.

Learn about collaborating in Mahara

Illustration of a group of people collaborating
Illustration of a podcast logo

Listen to portfolio stories

In our podcast 'Create. Share. Engage.' portfolio practitioners, researchers, learning designers, and portfolio authors share their journey. Learn how they navigate the many different facets of portfolios in general, and Mahara specifically.

Listen on the podcast website or in your favourite app

Mahara Community

Can't Login after Transfer

anonymous profile picture
Account deleted
Posts: 2
12 June 2012, 4:29

I have just transfered  Mahara from a remote host  to a local server.

I have Altered the Config.php for the new database connections and ran the sql dump to bring over all the data from the remote site.

An have also copied the mahara data file over the the new local direcotory and changed the config to poin to this location.

As I don't know the manual login admin password H abe nulled the salt field and entered a plain string password in the password field

but when I try and login I get

"You have not provided the correct credentials to log in. Please check your username and password are correct."

 

Any Ideas on what I have missed for the transfer !!

any help wloud be much appreciated

 

thanks.

anonymous profile picture
Account deleted
Posts: 808
12 June 2012, 18:44

Re: Can't Login after Transfer

Hi Gerry, from Mahara 1.4 onwards you can no longer use cleartext passwords, but when you have access to the server and need to hack in to an account, you can temporarily install a little php script like this to reset someone's password, for example, for user 123:

<?php
define('INTERNAL', 1);
define('PUBLIC', 1);
require('init.php');
require_once('auth/lib.php');
$user = get_record('usr', 'id', 123);
$user->password = 'changeme';
reset_password($user);

Don't forget to remove the script afterwards!

anonymous profile picture
Account deleted
Posts: 2
13 June 2012, 0:33

Re: Can't Login after Transfer

Great thanks Richard
Dan Tina's profile picture
Dan Tina
Posts: 20
20 July 2012, 1:03

Re: Can't Login after Transfer

Hi Richard,

 

This sounds like a solution to my problem (I've forgotten the admin password and I don't know the email address used) ... but how do you install the script?

Dantina

anonymous profile picture
Account deleted
Posts: 197
20 July 2012, 3:54

Re: Can't Login after Transfer

Hi Dan,

To use the script, you make a new .php file called whatever you wish (example: resetpasswordscript.php) inside the htaccess directory.

Once you've done that, you type in your mahara url and add the filename to the end after a /. For our example filename and the example.com url, that would be example.com/resetpasswordscript.php

The script won't show anything on the screen, the screen will be empty. Once the browser has loaded it, you can go back to your mahara site and log in with the password you asked the script to set for you.

Immediately after logging in, delete the file you made. Scripts like this should never be left sitting around.

Hope this helps,
Melissa.

anonymous profile picture
Account deleted
Posts: 17
28 August 2012, 17:48

Re: Can't Login after Transfer

Hi Richard,

It seems that I also have the same problem.

I'm using Mahara 1.5.2 (upgrade it from 1.4) and PostgreSQL 8.4 on Ubuntu Linux.

I can't login using admin user, after I enable passwordsaltmain parameter in config.php . Before it, everything is OK. I tried to using your script below :

<?php
define('INTERNAL', 1);
define('PUBLIC', 1);
require('init.php');
require_once('auth/lib.php');
$user = get_record('usr', 'id', admin);
$user->password = 'my_new_password';
reset_password($user);
?>

 

I got error message like this :

Mahara: Site unavailable

A nonrecoverable error occured. This probably means you have encountered a bug in the system

Is the any other way to reset my admin user?

 

Thank you

 

--

Pungki Arianto

anonymous profile picture
Account deleted
Posts: 197
28 August 2012, 21:13

Re: Can't Login after Transfer

Hi Pungki,

The error you got is because the line "$user = get_record('usr', 'id', admin);" is invalid code.

The word admin there needs to be replaced with the user id, which is a number. In most cases, admin will be user 1, but you need to check in the database table.

Thanks,
Melissa

anonymous profile picture
Account deleted
Posts: 17
29 August 2012, 0:05

Re: Can't Login after Transfer

Hi Melissa,

Thanks You !!!! SmileSmileSmile

You saved my day. Now I can login as Admin and continue my work.

Anyway, I want to ask something. What should I put on passwordsaltmain parameter?

Can I put word like "Hello_this_is_mahara" or I have to put a random character which is generated from some tools?

Thanks

--

Pungki Arianto

anonymous profile picture
Account deleted
Posts: 197
29 August 2012, 5:37

Re: Can't Login after Transfer

Hi Pungki,

It can be anything really, but for best security, it should be something impossible to guess.

What I tend to do is type 'pwgen' into my linux terminal and use a whole line from that. It can have the spaces in there too.

Thanks,
Melissa.

anonymous profile picture
Account deleted
Posts: 72
14 January 2013, 15:15

Re: Can't Login after Transfer

Hi

We have also just transferred our Mahara/Moodle installation to an new server/url

I am having the same problem of not being able to login as admin but with the mahara database in maintenance mode.  Should this technique still work?  It doesn't seem to.

I used the admin page to change the auth instances of every user (including admin) because using SSO from Moodle was creating duplicate users instead of picking up the existing records.  This has triggered the cannot login plus maintenance mode messages.  

I have gone into the database to restore the admin users auth instance to 1 but still no joy.

Anything else I can try?

Thanks

Richard