domotiga 1.0019 pasword hashing not working

Forum about Domotiga Open Source Home Automation for Linux.

Moderator: RDNZL

domotiga 1.0019 pasword hashing not working

Postby JohanVanDyck » Sun Dec 21, 2014 11:41 am

Hi

I installed domotiga 1.0019 on my cubieboard (cubian OS). I also installed domotiyii web front-end. Everything update to the latest version.
With the default auser admin and password admin, everything is working fine. However, when I change my password via the domitiga client, I can't login anymore.
I can't login to my domotiga client; I can't login to domotiyii.

When I manually alter the mysql users table with the original hash for admin/admin, everythink is working fine. --> either the users module in domotiga isn't working anymore or a charconversion is going wrong. Does someone has the same behaviour? How to debug?

Some info:
- cubie OS locals: cat /etc/locale.gen gives en_US.UTF-8 UTF-8
- the domotiga.users table in mysql is utf8_general_ci encoded. (but I have same result for latin1 encoding)
- versions on domotiyii:
JSON-RPC server 0.04
PHP 5.4.35-0+deb7u2
Yii framework 1.1.15
Yiistrap 1.3.0

Thanks

Johan.
JohanVanDyck
Starting Member
Starting Member
 
Posts: 3
Joined: December 2014
Location: Belgium

Re: domotiga 1.0019 pasword hashing not working

Postby emvee » Sun Dec 21, 2014 2:56 pm

Yes, from your description it looks like DomotiYii is not writing the right password hash to the database.

If you want to debug things, have a look at domotiyii/protected/models/Users.php
emvee
Starting Member
Starting Member
 
Posts: 24
Joined: January 2014

Re: domotiga 1.0019 pasword hashing not working

Postby uAlex73 » Sun Jan 04, 2015 7:53 pm

The hashing worked a while ago (i had it working in my pre-alpha Yii), but i will have a look why it isn't working anymore.
DomotiGa / Z-Wave / RFXCom / Visonic PowerMaster / Home Assistant / Zigbee2MQTT / DSMR Reader / Toon1 (rooted)
uAlex73
Member
Member
 
Posts: 217
Joined: January 2012

Re: domotiga 1.0019 pasword hashing not working

Postby JohanVanDyck » Mon Oct 05, 2015 7:46 pm

Hi

Via private message, I was asked where to find the user table. (I can't reply on that message in private) but:
- I use phpmyadmin to have a view on my database. But you can also use the hard way...
- I open the domotiga db, in the "users" table the columns "username" and "password" exist.
via mysql use this querry: (db name = domotiga in my case; name is choosen @ installation)
>mysql -u root -p
mysql> use domotiga
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> SELECT * FROM `users` WHERE `fullname`="admin";
+----+----------+-----------------------------------+----------+-------+----------+---------------------+--------------------+--------+
| id | username | password | fullname | admin | comments | lastlogin | emailaddress | cookie |
+----+----------+-----------------------------------+----------+-------+----------+---------------------+--------------------+--------+
| 1 | admin | MD5AQxbz2WH4CZ72Z4F5SvrJcKgkFJ8S1 | Admin | 1 | | 2008-11-06 14:12:13 | admin@mydomain.com | |
+----+----------+-----------------------------------+----------+-------+----------+---------------------+--------------------+--------+
1 row in set (0.00 sec)

mysql> quit


Regards

Johan.
JohanVanDyck
Starting Member
Starting Member
 
Posts: 3
Joined: December 2014
Location: Belgium

Re: domotiga 1.0019 pasword hashing not working

Postby JohanVanDyck » Mon Oct 05, 2015 8:31 pm

Hi

You can find the table users in your database (domotiga). I use phpmyadmin, but via mysql
$mysql -uroot -p
mysql> use domotiga
Database changed
mysql> SELECT * FROM `users` WHERE `fullname`="admin";
+----+----------+-----------------------------------+----------+-------+----------+---------------------+--------------------+--------+
| id | username | password | fullname | admin | comments | lastlogin | emailaddress | cookie |
+----+----------+-----------------------------------+----------+-------+----------+---------------------+--------------------+--------+
| 1 | admin | MD5AQxbz2WH4CZ72Z4F4SvrJcKgkFJ9S1 | Admin | 1 | | 2008-11-06 14:12:13 | admin@mydomain.com | |
+----+----------+-----------------------------------+----------+-------+----------+---------------------+--------------------+--------+
1 row in set (0.00 sec)

mysql> quit;
JohanVanDyck
Starting Member
Starting Member
 
Posts: 3
Joined: December 2014
Location: Belgium

Re: domotiga 1.0019 pasword hashing not working

Postby Edwin » Wed Oct 07, 2015 7:26 am

Thank u very much
For your help

Greetings
Edwin
Edwin
Member
Member
 
Posts: 447
Joined: October 2007
Location: Netherlands


Return to DomotiGa Forum

Who is online

Users browsing this forum: No registered users and 1 guest