domotiga 1.0019 pasword hashing not working

Forum about Domotiga Open Source Home Automation for Linux.

Moderator: RDNZL

Post Reply
JohanVanDyck
Starting Member
Starting Member
Posts: 3
Joined: Sun Dec 21, 2014 12:16 pm
Location: Belgium

domotiga 1.0019 pasword hashing not working

Post by JohanVanDyck »

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.
emvee
Starting Member
Starting Member
Posts: 24
Joined: Sat Jan 18, 2014 1:42 pm

Re: domotiga 1.0019 pasword hashing not working

Post by emvee »

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
uAlex73
Member
Member
Posts: 218
Joined: Sun Jan 01, 2012 3:42 pm
Contact:

Re: domotiga 1.0019 pasword hashing not working

Post by uAlex73 »

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)
JohanVanDyck
Starting Member
Starting Member
Posts: 3
Joined: Sun Dec 21, 2014 12:16 pm
Location: Belgium

Re: domotiga 1.0019 pasword hashing not working

Post by JohanVanDyck »

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: Sun Dec 21, 2014 12:16 pm
Location: Belgium

Re: domotiga 1.0019 pasword hashing not working

Post by JohanVanDyck »

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;
Edwin
Member
Member
Posts: 447
Joined: Sat Oct 20, 2007 6:37 am
Location: Netherlands

Re: domotiga 1.0019 pasword hashing not working

Post by Edwin »

Thank u very much
For your help

Greetings
Edwin
Post Reply

Return to “DomotiGa Forum”