login/password

login/password

by Steven Day -
Number of replies: 30
Oops, I seem to have not recorded my admin name and password. Any way to reset it?
Average of ratings: -
In reply to Steven Day

Re: login/password

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
Use the "Forgotten Password" button on the login page to have a new one mailed to you.
In reply to Martin Dougiamas

Re: login/password

by Steven Day -
Thanks for your help Martin. It seems that I didn't set things up properly first time around during installation. I already tried the email password feature, but that failed too. Is re-installation the only option left? Or would it be possible to find the login name/password on one of the files? Oh, I don't recall setting/changing the password either (though it was very late at night); might it still be the default by chance? My Safari browser thinks it knows both and autofills the name/password windows. But alas, they are wrong.

Thanks again.
In reply to Steven Day

Re: login/password

by John Gone -
Possibly the easiest, and quickest, way to fix this is to access your database and copy the guest password (hashed) into the admin password field

Remember to then login as admin and change your admin password to something a little more original.
In reply to John Gone

Re: login/password

by Steven Day -
Thanks John.

I get the basic idea but am not sure about the specifics. Do you mean access the mysql database on the webhost and change the password there? Or does it need to be changed in one of the text files? That's where I've been looking, in vain, for a solution.

I really appreciate your help.

Steven

In reply to Steven Day

Re: login/password

by John Gone -
Thank you Steven, I really appreciate the opportunity this presents to be of assistance.

Yes, you'll have to access your db and make the changes. There is a strong caveat involved in under-taking this sort of activity but I will not include it unless it's requested.

All the best,
John
In reply to John Gone

Re: login/password

by Steven Day -
Now that I've got Moodle up and running, I'm pretty excited. It is much easier to use than WebCT, and I applaud an open-source project for education that is so outstanding. Now I just need to become more familiar with what it can do and how to apply that to pedagogic ends.

Thanks again for your prompt assistance John.

Best,

Steven
In reply to John Gone

Re: login/password

by Mark Galgsdies -

Hi John

I might need that caveat! I've not been able to use my admin account/username either - I too forgot them as part of the set up procedure.

I've tried accessing the db (mysql via phpadmin) and making changes to the admin password but to no avail.

I'm not able to use the "forgot password" button on the screen because I've got everything on my PC (it's not a server) and everything else has been working fine...except my admin login.

Cheers

Mark

In reply to Mark Galgsdies

Re: login/password

by Mark Galgsdies -

Have sorted it out now. I went in to mySQL, copied and pasted another known password in to the admin password table entry.

Mark

In reply to John Gone

Re: login/password

by Steven Day -
D'oh! Now you can understand why I selected Homer as avatar photo. The solution was, in the end, too simple: the default login name/password is admin/admin!

Now everything is up and running. Thanks again for your help.

Best,

Steven
In reply to Steven Day

Re: login/password

by Timothy Takemoto -

I have forgotten my password too. I have too many Moodle installations.

When I click on "forgotten my password" link the page is dead (the link broken). This may be because I am using IMAP authentication for all but the administrators passwords and my universities IMAP does not offer the service of  sending out forgotten passwords. So perhaps the button takes me to a non existant would-be-IMAP-supported page. It would be nice if the administrators (whose authentication is NOT IMAP) could have their passwords sent to them. (As mentioned before it is nice to have too methods of authentication since I can set up users so long as they administrators.)

The Moodle is not on a local server so I cannot access the database using command line mysql commands. I do not have mysql-admin installed so I cannot get at the database that way.

I can only log in as a student. 

Oops.

Tim 

In reply to Timothy Takemoto

Re: login/password

by Timothy Takemoto -

I uploaded mysql admin into the moodle admin directory but, of course, when I try and go there I get "you have to be admin to access this page." So I guess that everyone else that lost their administrator password must have access to the command line or other MYSQL access tools on their computer.

Perhaps I can figure out a way to h4ck mysql admin so that I can put it somewhere outside of the moodle directory. If it were that easy though, there would be break-ins to Moodles everywhere.

 

In reply to Timothy Takemoto

Re: login/password

by Kevin Lawry -

That will work, that is what happens effectivly when you use the full version of the mySQL admin client, and in theory it need not even be on the same machine.  However the mySQL security is then the limiting factor, the username/password combo for the moodle database and the IP addresses that are allowed access will be your next stumbling block (or not of course if you know them which I guess is what you are hoping smile )

Good luck,

Kevin

In reply to Martin Dougiamas

Re: I cannot login - I am stuck in login screen

by Altin Mahili -

Hi

i installed moodle in my website but i am stuck in login screen as i cannot log in. i enter the username and the password provided for me but when i try to login nothing happens still i remain in login page telling me to login.

my moodle software was instaled on my wesite from Lycos OneClickSite software, also the tables and the php was configured from them.

i want ot modify my site but i can not as i can not login. any help would be apreciated.

thank you very much

In reply to Steven Day

Re: login/password

by Timothy Takemoto -

Thanks Kevin Lawry,

Fortunately since I still have ftp access I know my mysql database passwords/username.
So I did as you say and got back into my Moodle! Thank you thank you!

This is how to get into your moodle if you lose or forget your password but still have ftp access to your server.

1) Copy the following information in your config.php in your moodle director.

//$CFG->dbhost    = 'very_private';   // eg localhost or db.isp.com
//$CFG->dbname    = 'very_private';      // database name, eg moodle
//$CFG->dbuser    = 'very_private';    // your database username
//$CFG->dbpass    = 'very_private';    // your database password

2) Uploaded mysql admin in the base directory of my server (away from Moodle's login control) mysql admin is available here
http://prdownloads.sourceforge.net/moodle/moodle-1.2-mysql-admin.zip
3) replaced the config.inc.php with the config.inc.php from
http://cvs.sourceforge.net/viewcvs.py/phpmyadmin/phpMyAdmin/config.inc.php
    (I could have downloaded a complete phpmyadmin from http://phpmyadmin.net
, but the only difference seems to be the config file which, in the moodle release references the database information in moodle's config.php, of course, and I had already downloaded a copy of the moodle version of phpmyadmin.)
4) Type in the host, user, database, password as per the instructions at phpmyadmin, using the information from the moodle config.php. This is near the top of config.inc.php. Change the areas marked very_private.

$cfg['Servers'][$i]['host']          = 'very_private'; // MySQL hostname or IP address
$cfg['Servers'][$i]['port']          = '';          // MySQL port - leave blank for default port
$cfg['Servers'][$i]['socket']        = '';          // Path to the socket - leave blank for default socket
$cfg['Servers'][$i]['connect_type']  = 'tcp';       // How to connect to MySQL server ('tcp' or 'socket')
$cfg['Servers'][$i]['extension']     = 'mysql';     // The php MySQL extension to use ('mysql' or 'mysqli')
$cfg['Servers'][$i]['compress']      = FALSE;       // Use compressed protocol for the MySQL connection
                                                    // (requires PHP >= 4.3.0)
$cfg['Servers'][$i]['controluser']   = '';          // MySQL control user settings
                                                    // (this user must have read-only
$cfg['Servers'][$i]['controlpass']   = '';          // access to the "mysql/user"
                                                    // and "mysql/db" tables).
                                                    // The controluser is also
                                                    // used for all relational
                                                    // features (pmadb)
$cfg['Servers'][$i]['auth_type']     = 'config';    // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user']          = 'very_private';      // MySQL user
$cfg['Servers'][$i]['password']      = 'very_private';          // MySQL password (only needed
                                                    // with 'config' auth_type)
$cfg['Servers'][$i]['only_db']       = very_private';          // If set to a db-name, only
                                                    // this db is displayed in left frame

5) Go to 
http://yourdomain/mysql/
(the instructions at phpmyadmin.net say go to http://yourdomain/mysql/index.php but that did not work for me. Perhaps this is something else that has changed in the Moodle-ized version of phpmyadmin )
6) I go to the users table entry (not to the users_admin screen) and there you will see the users and their encoded passwords.
7) Copy the guest password to the admin password. I am pretty sure that the guest password is "guest". (Fortunately I had created another test student password that I remember so I copied that instead.)
8) Log into your moodle with the guest password.
9) Change your password.
10) Delete myphpadmin or at least password protect its folder.

Thanks again,
Tim
Takemoto

In reply to Timothy Takemoto

Re: login/password

by Timothy Takemoto -

Thanks Tim of the past, I had forgotten the above so it is a good thing you wrote it down.
I think that the above should go in a FAQ somewhere, if I say so myself.
Tim

In reply to Timothy Takemoto

Re: login/password

by Timothy Takemoto -
Now that i have seen the light of Navicat
http://moodle.org/mod/forum/discuss.php?d=34419
the first 5 of the stepts above are unecessary. If you install navicat you can set up a connection to your moodle database rather like setting up a FTP connection with address, username and password. Then you can copy and pasted the guest user password to the admin user password as if you were using Excel. Navicat looks a lot like Excel.
Tim
In reply to Timothy Takemoto

Re: login/password

by Lev Abramov -

Tim (and anyone else who comes across this posting!) -

I need help.

Due to some strange glitch (I assume it's a glitch in the host's mailserver even though they deny it) I cannot retrieve my admin password: my attempts to retrieve it using the "Send it to me via e-mail" button yield a failure e-mail:

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

 lev.abramov @ gmail.com
   unrouteable mail domain "gmail.com"

The irony of the matter is that this error message is delivered to the very address that is reported undeliverable!

Never mind, we'll sort it out.

What I need now is a way to recover my admin password. I already understand I have to edit a DB table. I have access to the DB via PHPmyAdmin in the cPanel provided by the host. But I have no idea how to do that - I've never touched any DB of mine.

Can you pleeeeeeeeeeeze hold my hand while I'm doing it? Both in terms of WHAT to do and HOW to do it?

TIA!

In reply to Lev Abramov

Re: login/password

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Lev,

Please follow the instructions for changing the admin password in MoodleDocs Administration FAQ. If you require further explanation, please say so. smile
In reply to Helen Foster

Re: login/password

by Jon Roland -
I installed Moodle at my site http://www.nomocracy.org/index.php? using the Fantastico one-click install and created a username of jonroland, but now I don't seem to have admin access to create courses,. configure the site, etc. Does anyone know how that one-click install sets up Moodle and what one does next?
In reply to Jon Roland

Re: login/password

by Nugroho Widi -
I install Moodle 1.9.7+ in a webserver. Afrer succesful install, i cannot login using my id and password. I think it is a serious problem. I tried everything including check mysql and copy paste password etc, but no avail. I cannot login at all. My friend who is a web programmer also wonder what happened.

In reply to Steven Day

Re: login/password

by La Tarsha Hampton -

I apologize if there is an answer to this previously posted.

I need help Please. I cannot locate my admin password.

I have sent the email request and never received an email.

I have also tries accessing the phpMyAdmin database. I tried to change the password in the mdl_user table and it still does not work. I've copied other encrypted passwords that work and it still does not work.

I think i disable the feature to log on as a guest but i tried to copy that info in the mdl_user table as well.

Please help me! Thank you

In reply to La Tarsha Hampton

Re: login/password

by Guillermo Madero -

If you copied md5 hashed passwords from accounts that are working (and you are completely sure of this), then you should be able to login... unless the admin account is:

* marked as deleted, in which case you need to set the deleted field to 0 (zero) and the username field to admin.

* using an authentication method other than manual, in which case you need to set the auth field to manual.

In reply to Guillermo Madero

Re: login/password

by La Tarsha Hampton -

hello thank you for responding. 

i have tried coping the hashed passwords from every account that works and it does not work and nothing works. I checked to see if the admin account had been deleted and it also does not work.  I tried to passchange.php and the resetuser.php.

Any other suggestions? 

Is there anything else that I may try?

In reply to La Tarsha Hampton

Re: login/password

by Guillermo Madero -

Do you get any error messages? Can you enable the debugging system?

http://docs.moodle.org/22/en/Debugging

Take note that you can enable it by modifying config.php.

I would also try to take a look at the server error log.

In reply to Guillermo Madero

Re: login/password

by La Tarsha Hampton -

I am not sure what is going on, but I tried degugging as suggested and nothing!

I don't know what else to do but uninstall Moodle and start all over.

 

I appreciate you!!

In reply to La Tarsha Hampton

Re: login/password

by La Tarsha Hampton -

i have another account where I am the student or teacher. is there anyway for me to make that user account the admin?

In reply to La Tarsha Hampton

Re: login/password

by Guillermo Madero -

Hi,

For M 2.2

** Get your other account user's id.

Go to Administration > Users > Accounts > Browse list of users

Select your user account; the URL will then show the user's id:

yoursite.com/moodle/user/profile.php?id=74

** Open your phpMyAdmin, select your mdl_config table and run the following SQL command:

SELECT *
FROM `mdl_config`
WHERE `name` = "siteadmins";

Take note of the value(s) at the value field, for example: 2,6

* Now run the following SQL command (use your own values at the SET `value` line):

UPDATE `mdl_config`
SET `value` = '2,6,74'
WHERE `name` = "siteadmins";

For M 1.9

* Get your other account user's id.

Go to Administration > Users > Accounts > Browse list of users

Select your user account; the URL will then show the user's id:

yoursite.com/moodle/user/view.php?id=74&course=1

* Now run the following SQL command (use your own value for the userid column):

INSERT INTO `mdl_role_assignments` ( `roleid`, `contextid`, `userid`, `hidden`,
`timestart`, `timeend`, `timemodified`, `modifierid`, `enrol`, `sortorder` )
VALUES ( 1, 1, 74, 0, 1334293200, 0, 1334351421, 2, 'manual', 0 );