Textpattern logo

Help?

Resetting Admin Password

From Textbook

Dear Editor(s), I have started this page but don't know how to batten it down. Help!


--Stef 00:50, 15 Oct 2009 (GMT). Is this a Tutorial or for Troubleshooting? i.e. would you want to know how to do this just for the sake of it, or would you only seek to do it if something went wrong? The content is replicated and slightly updated in Forgotten_password so if it is deemed to belong there, this topic may be deleted.


Resetting the administrators password (or any user password) is fairly straight forward. This presumes you have access to phpMyAdmin which is commonly installed on my webservers that use MySQL.

The Process

  1. Start phpMyAdmin. This may be done from shell or your control panel.
  2. At the opening screen, select the database for your Textpattern install (eg userid_textpattern).
  3. From the list of tables select txp_users. This should present a table structure and a selection of tabbed options.
  4. Select the Browse tab. This will display a query field and a list of users.
  5. Click on the small pencil (edit) icon next to the user ID entry you wish to edit. This will display a table for the record showing the fields and their current values. Note that only the password hash is displayed, not the plain text.
  6. In the function column for the pass field, select PASSWORD from the drop down box. You may then delete the hash and enter a plaintext password in the corresponding value field. Letters in this field should be all lowercase. Make sure the box at the lower left says 'save' and click on the GO button. You will be returned to the previous screen which will display the SQL query you just created. The hash displayed opposite the user ID you selected should have changed (unless you used the exact same password). Alternatively you can click on the Edit link for the SQL query field visible in step 5 and enter the following substituting the desired password for newpassword and the appropriate userID number : UPDATE `txp_users` SET `pass` = PASSWORD( ' newpassword ' ) WHERE `user_id` = number LIMIT 1;.
  7. Exit phpMyAdmin and login to Textpattern with your username and new password.

Changing to Higher Permission Status if Accidentally Set Incorrectly

It has happened to people before that while learning the nature of different permission settings in the xxx panel they accidentally set themselves at a lower permissions level than what they indended to have; for example as Managing Editor instead of Publisher.

You can fix this situation, but you have to have access to a database management program like phpMyAdmin for the database involved. Following is what you do:

  1. Open phpMyAdmin, select the appropriate database, and browse to the txp_users table.
  2. Look for the row with your Textpattern account username, and find the column named "privs".
  3. Change it to the number "1".

Translations [?]...

About Textbook