Forums | Mahara Community

Support /
Can't Login after Transfer


Kristina Hoeppner's profile picture
Posts: 4734

15 January 2013, 7:52

Hello Richard,

Can you please check that there is no remote username in the remote_user table for the admin account? I'm not quite sure if that might be part of the problem, but checking doesn't hurt. Please also check that the auth instances in the usr table and the remote_user table match the new one. On one of our installations we've had the issue that after changing the auth instance on the frontend, the two tables got out of sync. We still have to check that on a plain Mahara site to see if it is a general bug or not.

Cheers

Kristina

anonymous profile picture
Account deleted
Posts: 72

15 January 2013, 11:39

Hi Kristina

The auth_remote_user table is empty.  I have set all of the auth_instance fields in the usr table to internal/1 (via the admin page).  I managed to log on by setting up a parallel install and copying the admin password and salt across :).  

I was then able to remove the existing xmlrpc auth instances from the site since they now had no users.

However, in trying to establish a new xmlrpc connection I'm hitting issues with Moodle.  

Part of the problem seems to be that the Moodle url has also changed and I can't seem to set Moodle networking back to it's initial state.  Mahara is picking up the wrong certificate info out of the Moodle db I think, despite the fact that I deleted those instances.

Still trying to resolve this.  

I set up a new xmlrpc auth instance on the parallel Mahara which fetched the certificate correctly.  However, the Manage Peers failed on a Moodle error - Moodle seems to be retaining the old records and refusing to insert a new one (some kind of null problem related to ms sql - oh yeah we migrated the Moodle database as well just to make things interesting :)

I thought as a backup strategy we could do a completely new Mahara and manually export/import the existing content as we have a relatively small install.

I'm going to post across to the Moodle mnet forum to see if there is anyway to unset networking and start it from scratch on that side.

Cheers

Richard

anonymous profile picture
Account deleted
Posts: 72

15 January 2013, 13:59

Hi Kristina

Nearly there!  We have a connection, another problem was the server times which has been reported elsewhere on these forums (discrepancy of 27 seconds). Now fixed.

However, even though I have used the admin page to set all the existing users back to the new auth instance, Mahara creates a new record when existing users log on.

I can fix this by adjusting the auth_remote_user table to point to the existing record but this will be time-consuming.

I wonder if I can insert existing users directly into this table such that it points to their existing records?  I guess a select from usr and an insert into auth_remote_user with the same id would do it - I'll make a copy of the table and let you know (!).

Cheers

Richard

anonymous profile picture
Account deleted
Posts: 72

15 January 2013, 14:48

It worked.

We also had a proxy server change over the holiday (I wasn't aware) so that's why the initial attempt to add the xmlrpc instance failed at getting the public key from Moodle.

I might have time to write that article now ;)

Cheers

Richard

Kristina Hoeppner's profile picture
Posts: 4734

20 January 2013, 20:21

Hello Richard,

Oh my. What an odyssey. I'm happy to read that you are back to one account per user taking the existing user accounts. Let's hope you'll not have to change locations  and proxies again.

Cheers

Kristina

Dirk Meyer's profile picture
Posts: 425

15 January 2013, 18:59

The other day I transferred a moodle and was only able to login after I had tweaked the permissions in the moodledata folder. Perhaps that is relevant in mahara also?

Brian Merritt's profile picture
Posts: 2

18 February 2017, 1:54

The script is great, but may not work if there are other auth systems such as saml are in use.

The following enhancement may help someone:

 

    <?php

    define('INTERNAL', 1);
   define('PUBLIC', 1);
   require('init.php');
   require_once('auth/lib.php');
    $user = get_record('usr', 'id', 1);
    $internalauth = get_field('auth_instance', 'id', 'institution', 'mahara', 'authname', 'internal');
    set_field('usr', 'authinstance', $internalauth, 'id', $user->id);
    $user->authinstance = $internalauth;
    $user->password = 'brian12345';
    reset_password($user);

17 results