Installation > missing Admin user step

Installation > missing Admin user step

by Stéphane Buchmann -
Number of replies: 12
Following step-by-step the Installation Guide provided by Martin, I'm having problems during step 5.
The page asking for Moodle site parameters is ok but just after, the installation ends whithout asking me for the "top-level admin user" creation.
The only message I have on the screen (/admin/index.php) is "Activity since XXX - Full report of recent activity".
The result is that I can only connect using the Guest user and no Admin are present in the Users database (so the tip to connect using admin/admin does not work).

Does anybody have an idea of what is failing (permission lack somewhere?) ?

For information:
- I'm using the stable version 1.4.3 of Moodle,
- The config.php file is well created and populated.

Thanks a lot for any help provided.

Stephane

Average of ratings: -
In reply to Stéphane Buchmann

Re: Installation > missing Admin user step

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I've heard of this once before, but I have no idea what could be causing it, sorry.  sad
In reply to Martin Dougiamas

Re: Installation > missing Admin user step

by Stéphane Buchmann -
Oooch!

Any idea on the way to correct that ?
My last idea was to manualy create an admin user in the database.
Can you help me on the "clean way" to do that (which table/fields to modify) ?

Thank you in advance.

Stephane
In reply to Stéphane Buchmann

Re: Installation > missing Admin user step

by Shane Elliott -
Picture of Core developers Picture of Plugin developers
Can you create a normal user account from the login page?

If yes then:
1. Find the id for this account from the 'user' table
2. In the 'user_admins' table create an entry with id = 1, userid = [the id from the user table]

This account should now be the primary admin

In reply to Shane Elliott

Re: Installation > missing Admin user step

by Stéphane Buchmann -
Shane,

Your solution worked well and I now have a valid Admin.
The Administration panel appears now in the Frontpage with all its options.
They all work fine except the latest one, "Admin..." loading "/admin/index.php".
Now the page is not able to be displayed at all.
I can work around this problem by choosing all the Administrations functions one by one, but starting a website with this kind of problems is certainly not a good thing.

Martin, maybe you'll be able to reproduce this issue by deleting all users (except Guest - ID1) from the "users" table ?!

Any idea ?

Stephane
In reply to Stéphane Buchmann

Re: Installation > missing Admin user step

by Pablo Etcheverry -
Picture of Core developers
Hi, Stephane.

    I've found the same problem when hosting under cheap servers. They hang during the processes launched by admin/index.php during the first steps of the installation. Looks like they get ran out of PHP memory. I'd suggest increasing the amount of memory used for the PHP process.
    Luck,
       Pablo
In reply to Shane Elliott

Re: Installation > missing Admin user step

by Mike Erickson -
I encounted the same issue and it worked!
In reply to Mike Erickson

Re: Installation > missing Admin user step

by Rich Magee -

I also encountered the same problem, when creating a clean (new) install of Moodle 1.4.4 .  I followed Shane's suggestion, and was able to successfully establish my own account as admin.

Unfortunately, any time that I attempt to go to the "Administration" control panel page, I get an internal server (500) error....  I suspect that perhaps the problem lies with my web host, unless anyone might suggest something else.

In reply to Shane Elliott

Re: Installation > missing Admin user step

by Scott Smith -
Shane, how do you access the user_admins table?  I did not have an opportunity to create the admin user, but I can create a normal user.  Thanks.
In reply to Scott Smith

Re: Installation > missing Admin user step

by Shane Elliott -
Picture of Core developers Picture of Plugin developers
Hi Scott

I did see your other post but haven't had a chance to reply to it.

The easiest way to access the 'user_admins' table is to use phpMyAdmin. There is a customised version for moodle available via CVS or at:
http://download.moodle.org/download.php/sourceforge/moodle-mysql-admin-2.6.2.zip
Just unzip it into your moodle admin directory.

Otherwise you could just write a php script to do it for you. Something like:
<?php
require('config.php');
require_login();
add_admin($USER->id);
redirect($CFG->wwwroot);
?>
1. Put the above lines in a script (eg called addadmin.php)
2. Place it in your root moodle directory (the one with config.php in it)
3. Log in with the user you want to become an admin
4. Call the script eg http://your.moodle.site/addadmin.php
5. You should now be an admin
6. Delete the file - it is a BIG security risk!

HTH
In reply to Stéphane Buchmann

Re: Installation > missing Admin user step

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Shane posted the correct way to manually create the admin user.

What worries me though, is the string that appears on your admin/index.php (
Activity since XXX - Full report of recent activity").  There is nothing in the code that could make this appear on the admin page that I can see - it's in course/lib.php and only appears within the recent activity block.  It looks like something very wrong is going on in your server, but I can't imagine what ...
In reply to Martin Dougiamas

Re: Installation > missing Admin user step

by Stéphane Buchmann -
Martin,

I've detected what could be the cause of my problem: my ISP has enabled the SAFE MODE on the server !

I've seen an old thread where you speak about a possible solution to treat installation with SAFE MODE: http://moodle.org/mod/forum/discuss.php?d=1374

As this one is very old, do you have any news on how to deal with this option ?
Thanks in advance.

Stephane
In reply to Stéphane Buchmann

Re: Installation > missing Admin user step

by raju malav -
hi sir...
can u please send me ur config.php file as i am also facing same problem here...
i will be very thankful to you..
bye