How to reset Joomla admin password from the shell

database-administrationjoomla

any idea how I can reset/change Joomla admin password from the linux command line? I have root access to the box.

I don't think I can do it phpMyAdmid way.

I don't know where the Joomla db is located and how I can connect to it.

Update

I found configuration.php that tells me the db name, host (local) and db prefix. But I don't know the password. I am receiving ERROR 1045 (28000): Access denied for user 'edumate_joomla'@'localhost' (using password: NO)

Best Answer

I usually do this type of thing by inserting a known password hash directly into whatever database you're using with joomla. Assuming you have ample privileges on the database, you should be able to do this through either the CLI or phpMyAdmin.

I am not familiar with Joomla's database schema, but there should be something like a "users" table. Inside of that table, there should be a "password" column, containing password hashes, one for each user. You should be able to replace the password hash for your admin user with a known-good hash, either from a different Joomla install or from another Joomla user.

Related Topic