OwnCloud Password Change

Need to change the admin password of your owncloud install in the MySQL? It is actually quite easy.  Here are the steps I took to get it working:

  1. Log into the server hosting your owncloud installation
  2. Navigate to the sites directory (ie: /var/www/owncloud)
  3. Navigate to the ‘phppass’ 3rd party app (ie: /3rdparty/phpass)
  4. edit the test.php file and replace the following:
    • edit $t_hasher = new PasswordHash(8, FALSE); to –
       $t_hasher = new PasswordHash(8, CRYPT_BLOWFISH!=1);
    • edit $correct = ‘test12345’; to –
       $correct = 'yournewpass'.'yourconfigpasswordsalt';
  5. Run ‘php test.php’
  6. Copy the first line that has ‘Hash: $2a…’
  7. Log into your database (MySQL is the example)
    • mysql -u root -p
    • use owncloud;
    • select * from oc_user;
      • Note the password value, copy it just in case
    • update oc_user set password= ‘generatedhash’ where uid = ‘youruser’;

You should be good to go!

If you are having difficulty finding your ‘yourconfigpasswordsalt’, look in your config file from OwnCloud. In every OwnCloud setup you have a Password Salt configured in your config/config.php file, and that is what you need to use to get an accurate encryption value for your newly generated password.

Feel free to Share!Share on Facebook0Share on Google+0Tweet about this on TwitterShare on LinkedIn0