Difference between revisions of "Reset Amahi Password"

From Amahi Wiki
Jump to: navigation, search
Line 7: Line 7:
 
This capability is currently unavailable in Amahi 7 ([https://bugs.amahi.org/issues/1509 Amahi Bug 1509]), but a work around is available.
 
This capability is currently unavailable in Amahi 7 ([https://bugs.amahi.org/issues/1509 Amahi Bug 1509]), but a work around is available.
  
'''USE EXTREME CAUTION:''' Proceed at your own risk.  This should only be attempted if you do not have any admin access to the HDA dashboard.  If you corrupt the database, you will be forced to reinstall.</div>
+
'''USE EXTREME CAUTION:''' Proceed at your own risk.  This should '''ONLY''' be attempted as a last resort and you do not have any admin access to the HDA dashboard.  If you corrupt the database, you will be forced to reinstall.</div>
  
Perform the following steps to set the user password to '''admin''' (recommend changing it once logged into the dashboard):
+
Perform the following steps to reset the user password to '''admin''' (recommend changing it once logged into the dashboard):
* [[Open_Terminal_as_root|Open terminal as root user]] and enter the following (replace ''username'' in both command lines with the user whose password was forgotten):
+
* [[Open_Terminal_as_root|Open terminal as root user]] and verify the user name:
** passwd username
+
echo "select login from users" | mysql -uroot -phda hda_production
** echo "update users set crypted_password='f0b2344ac59b55ab5f52b2984a6d1c96838b3dbf13c6d01752cc60e228043a676fabec7a07ffe7cee763aa127bd4f34b3e267861829a88c1870a198e7a01cfa6', password_salt='Qt1VlDCmyCb8KBhpsuUW' where login='username'" | mysql -uroot -phda hda_production
+
* Enter the following (replace ''user name'' in both command lines with the user name whose password needs reset):
 +
passwd user name
 +
<pre style="white-space:normal;">echo "update users set crypted_password='f0b2344ac59b55ab5f52b2984a6d1c96838b3dbf13c6d01752cc60e228043a676fabec7a07ffe7cee763aa127bd4f34b3e267861829a88c1870a198e7a01cfa6', password_salt='Qt1VlDCmyCb8KBhpsuUW' where login='user name'" | mysql -uroot -phda hda_production</pre>
  
 
== Ubuntu 12.04.x ==
 
== Ubuntu 12.04.x ==

Revision as of 02:42, 22 January 2015

Warning.png WARNING
Ensure you know the root password before you use this method! See RULES below for more information.


Fedora 19

This capability is currently unavailable in Amahi 7 (Amahi Bug 1509), but a work around is available.

USE EXTREME CAUTION: Proceed at your own risk. This should ONLY be attempted as a last resort and you do not have any admin access to the HDA dashboard. If you corrupt the database, you will be forced to reinstall.

Perform the following steps to reset the user password to admin (recommend changing it once logged into the dashboard):

echo "select login from users" | mysql -uroot -phda hda_production
  • Enter the following (replace user name in both command lines with the user name whose password needs reset):
passwd user name
echo "update users set crypted_password='f0b2344ac59b55ab5f52b2984a6d1c96838b3dbf13c6d01752cc60e228043a676fabec7a07ffe7cee763aa127bd4f34b3e267861829a88c1870a198e7a01cfa6', password_salt='Qt1VlDCmyCb8KBhpsuUW' where login='user name'" | mysql -uroot -phda hda_production

Ubuntu 12.04.x

In the event that you can't get into the web with your username and password but can still get into terminal on Ubuntu (either by SSH or from the GUI) you can still reset your password.

Run the following command:

/var/hda/platform/html/script/reset-user-password -u <username>

This will allow you to login to the web with any password and will be forced to change your password.

RULES

  • This will only work if you only have one admin in Amahi. I do not know if it changes the Fedora/samba passwords for the user, but assume it does.
  • This will be a problem if you reset your password manually using command line passwd. Only add, change, or delete users and passwords via the Amahi Dashboard!
  • Need to do some additional testing to confirm but it seems as though using this method will take the user out of the wheel group and thus not be able to sudo. Again, ensure you know the root password before using this method!