No errors in the http-error.log file.
The login page returns the forgot password page!
So that is all working ok.
But still no login.
It gets the password field wrong.
In my mysql.log file i have this:
tail -f /var/log/mysql/mysql.log | grep hen
18882 Query SELECT `uid`, `password` FROM `oc_users` WHERE LOWER(`uid`) = LOWER('j.h...@te...')
18883 Query SELECT password FROM mailbox WHERE username = 'j.h...@te...' AND active = '1'
18883 Query SELECT username FROM mailbox WHERE username = 'j.h...@te...' AND active = '1' AND password = '$1$$1$d7fc6$1kExrEkwxej2AGTE2FqEo.'
From mysql itsel i got this:
mysql> select password from mailbox where username = 'j.h...@te...';
+------------------------------------+
| password |
+------------------------------------+
| $1$d7fc6e81$n8xTB.YOtAv0VmBvhy/Xv0 |
+------------------------------------+
1 row in set (0.00 sec)
mysql>
thanks again
gr
Johan
-----Oorspronkelijk bericht-----
Van: Rudi Floren [mailto:rud...@go...]
Verzonden: dinsdag 13 november 2012 17:58
Aan: Johan Hendriks
Onderwerp: Re: [Postfixadmin-devel] Owncloud Authenticate against postfixadmin database
Am Dienstag, 13. November 2012 15:37:05 schrieb Johan Hendriks:
> We are getting close :D
>
> If i use the latest file i get the following.
>
> [Tue Nov 13 15:29:15 2012] [error] [client 192.168.50.102] PHP Notice:
> Undefined index: mail in
> /usr/local/www/owncloud/apps/user_postfixadmin/user_postfixadmin.php
> on line 67, referer: http://192.168.50.200/owncloud/ [Tue Nov 13
> 15:29:15 2012] [error] [client 192.168.50.102] PHP Notice: Undefined
> index: username in
> /usr/local/www/owncloud/apps/user_postfixadmin/user_postfixadmin.php
> on line 94, referer: http://192.168.50.200/owncloud/
>
> If i alter the code to
> # $sql = 'SELECT password FROM mailbox WHERE username = :uid AND active = :active';
> $sql = 'SELECT username FROM mailbox WHERE username = :uid AND active = :active';
> $sth = $this->db->prepare($sql);
> if ($sth->execute(array(':uid' => $uid, ':active' => 1))) {
> $row = $sth->fetch();
> if ($row) {
> $this->setEmail($uid);
> return $row['username'];
>
> Then it works.
> If i alter the code to
> $sql = 'SELECT password FROM mailbox WHERE username = :uid AND active = :active';
> # $sql = 'SELECT username FROM mailbox WHERE username = :uid AND active = :active';
> $sth = $this->db->prepare($sql);
> if ($sth->execute(array(':uid' => $uid, ':active' => 1))) {
> $row = $sth->fetch();
> if ($row) {
> $this->setEmail($uid);
> return $row['password']; Then it works also,
> except that my data directory is called $1$d7fc6e81$n8xTB.YOtAv0VmBvhy
> So i guess that the return $row['password'] line gives owncloud the
> username to use
>
> The problem is that it is not using the password field, i can use whatever password i want, owncloud will always let me in.
>
> thanks
>
> gr
> johan
>
>
>
> ________________________________________
> Van: Rudi Floren [rud...@go...]
> Verzonden: dinsdag 13 november 2012 15:05
> Aan: Johan Hendriks
> Onderwerp: Re: [Postfixadmin-devel] Owncloud Authenticate against
> postfixadmin database
>
> Am Dienstag, 13. November 2012 14:53:32 schrieb Johan Hendriks:
>> After that change i get the following.
>>
>> So the line 88 looks like :
>> if ($sth->execute(array(':uid' => $uid, ':active' => 1))) {
>>
>> [Tue Nov 13 14:50:49 2012] [error] [client 192.168.50.102] PHP
>> Notice: Undefined variable: sth in
>> /usr/local/www/owncloud/apps/user_postfixadmin/user_postfixadmin.php
>> on line 88, referer: http://192.168.50.200/owncloud/ [Tue Nov 13
>> 14:50:49 2012] [error] [client 192.168.50.102] PHP Fatal error: Call
>> to a member function execute() on a non-object in
>> /usr/local/www/owncloud/apps/user_postfixadmin/user_postfixadmin.php
>> on line 88, referer: http://192.168.50.200/owncloud/
>>
>> gr
>> Johan
>>
>>
>> ________________________________________
>> Van: Rudi Floren [rud...@go...]
>> Verzonden: dinsdag 13 november 2012 14:40
>> Aan: Johan Hendriks
>> CC: pos...@li...; Rudi Floren
>> Onderwerp: Re: [Postfixadmin-devel] Owncloud Authenticate against
>> postfixadmin database
>>
>> the second = should be =>
>>
>> Am Dienstag, 13. November 2012 14:39:50 schrieb Johan Hendriks:
>>> That gives me the following error.
>>>
>>> [error] [client 192.168.50.102] PHP Parse error: syntax error,
>>> unexpected '=', expecting ')' in
>>> /usr/local/www/owncloud/apps/user_postfixadmin/user_postfixadmin.php
>>> on line 88, referer: http://192.168.50.200/owncloud/
>>>
>>> line 88 is
>>> if ($sth->execute(array(':uid' => $uid, ':active' = 1))) {
>>>
>>> thanks
>>> gr
>>> Johan
>>> ________________________________________
>>> Van: Rudi Floren [rud...@go...]
>>> Verzonden: dinsdag 13 november 2012 14:33
>>> Aan: Johan Hendriks
>>> CC: pos...@li...; Christian Boltz
>>> Onderwerp: Re: [Postfixadmin-devel] Owncloud Authenticate against
>>> postfixadmin database
>>>
>>> I think the problem is the salt.
>>>
>>> try this. its untested.
>>>
>>>
>>> Am Dienstag, 13. November 2012 14:19:14 schrieb Johan Hendriks:
>>>> Thank you, that error is gone now, after that i got the same error on the hex2bin function.
>>>> Using the same method that error is gone also :D
>>>>
>>>> Then i did get a method error on to64, but i solved that also.
>>>>
>>>> So everything seems to function.
>>>>
>>>> I set the encrypt to md5crypt in postfixadmin, and reset the password for the test user.
>>>>
>>>> Then i log on to owncloud using my email adres with the new
>>>> password set through postfixadmin In the mysql log i see the following:
>>>>
>>>> Query SELECT username FROM mailbox WHERE username = 'j.h...@te...' AND password = '$1$6be349d6$tckNf.G6.uv2DqWG1XlpL0'
>>>>
>>>> So it look much more like the password that is used, but stil no match.
>>>> If i look from within mysql itself i get.
>>>>
>>>> mysql> select password from mailbox where username =
>>>> mysql> 'j.h...@te...';
>>>> +------------------------------------+
>>>> | password |
>>>> +------------------------------------+
>>>> | $1$d7fc6e81$n8xTB.YOtAv0VmBvhy/Xv0 |
>>>> +------------------------------------+
>>>> 1 row in set (0.00 sec)
>>>>
>>>>
>>>> The user_postfixadmin.php file is attached.
>>>>
>>>> Thanks you all for your time and patience with me!
>>>> regards
>>>> Johan
>>>>
>>>> ________________________________________
>>>> Van: Christian Boltz [pos...@cb...]
>>>> Verzonden: maandag 12 november 2012 21:31
>>>> Aan: pos...@li...
>>>> Onderwerp: Re: [Postfixadmin-devel] Owncloud Authenticate against
>>>> postfixadmin database
>>>>
>>>> Hello,
>>>>
>>>> Am Freitag, 9. November 2012 schrieb Johan Hendriks:
>>>>> It does not work, the error i get is [Fri Nov 09 09:32:00 2012]
>>>>> [error] [client 192.168.50.105] PHP Fatal
>>>>> error: Call to undefined function create_salt() in
>>>>> /usr/local/www/owncloud/apps/user_postfixadmin/user_postfixadmin.p
>>>>> hp
>>>>> on line 147
>>>>>
>>>>> I saw in the postfixadmin function.inc.php file the following
>>>>>
>>>>>
>>>>> function create_salt () {
>>>>> srand ((double) microtime ()*1000000);
>>>>> $salt = substr (md5 (rand (0,9999999)), 0, 8);
>>>>> return $salt;
>>>>> }
>>>>>
>>>>> So i thougt i add it at the end of the file, but i keep getting
>>>>> the error??
>>>>
>>>> You probably added the function inside the class, which means you
>>>> need to replace all calls of "create_salt" with
>>>> "OC_User_Postfixadmin::create_salt"
>>>>
>>>>
>>>> Regards,
>>>>
>>>> Christian Boltz
>>>> --
>>>> Der Tag hat 24 Stunden und wenn es sein muss, dann arbeiten wir
>>>> auch noch nachts!
>>>>
>>>>
>>>> -------------------------------------------------------------------
>>>> ----------- Monitor your physical, virtual and cloud infrastructure
>>>> from a single web console. Get in-depth insight into apps, servers,
>>>> databases, vmware, SAP, cloud infrastructure, etc. Download 30-day
>>>> Free Trial.
>>>> Pricing starts from $795 for 25 servers or applications!
>>>> http://p.sf.net/sfu/zoho_dev2dev_nov
>>>> _______________________________________________
>>>> Postfixadmin-devel mailing list
>>>> Pos...@li...
>>>> https://lists.sourceforge.net/lists/listinfo/postfixadmin-devel
>>>>
>>>>
>>>> -------------------------------------------------------------------
>>>> ----------- Monitor your physical, virtual and cloud infrastructure
>>>> from a single web console. Get in-depth insight into apps, servers,
>>>> databases, vmware, SAP, cloud infrastructure, etc. Download 30-day
>>>> Free Trial.
>>>> Pricing starts from $795 for 25 servers or applications!
>>>> http://p.sf.net/sfu/zoho_dev2dev_nov
>>>>
>>>>
>>>> _______________________________________________
>>>> Postfixadmin-devel mailing list
>>>> Pos...@li...
>>>> https://lists.sourceforge.net/lists/listinfo/postfixadmin-devel
>>>
>>>
>>
>>
>
>
|