Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Your email address or password are not correct. #444

Closed
Blisk opened this issue Jan 27, 2021 · 28 comments
Closed

Your email address or password are not correct. #444

Blisk opened this issue Jan 27, 2021 · 28 comments

Comments

@Blisk
Copy link

Blisk commented Jan 27, 2021

I dida an upgrade to latest version of postfixadmin.
But whatever I do I get the same problem.
Your email address or password are not correct.

I have setup $CONF['setup_password'] =
but still the same

@Blisk
Copy link
Author

Blisk commented Jan 28, 2021

I also have checked mysql database and there is no users or admins in it

@studiowena
Copy link

Hi,

Did You setup exist / correct DB on config.inc.php or config.local.php? Maybe You make new DB while upgrade process? Can You generate new hash password and add superadmin on domain.com/setup.php?

@Blisk
Copy link
Author

Blisk commented Jan 28, 2021

Hi
Yes I did all of that more than 20 times and still the same.
I also nitice when I try to send me a new password as I forget it, it doesn't send any email.
Also I notice there is no user in database at all. And settings are ok I tested it.
Now I try to make a new setup on other server and I get white blank page.

@studiowena
Copy link

studiowena commented Jan 28, 2021

What PHP version R u using? and from what version Postfixadmin You make this upgrade? Check Web server error log for any info.
From Version 3.3 - 2021/01/09 - PostfixAdmin requires PHP 7.0 or greater.

Check yourdomain.com/setup.php if DB doesnt require to be updated with new version so new Postfixadmin to work properly.

Forget password feature works only when You setup "Other e-mail" (Used if the password is forgotten) on email account added to DB. Without it system doesnt know where to send reset code and dont do it.

@DavidGoodwin
Copy link
Member

Change your config.local.php to have :

$CONF['setup_password'] = '$2y$10$yr/WtC85Pqhv9s9Terc53.neCW7RVCfSfcV4mNiejQDqZBwM6X.yi';

(Note, it MUST use single quotes. The above is from using a password of topsecret )

then using that on http://yourserver/setup.php in order to add a new admin.

If that doesn't do anything, add a line like :

die(__FILE__);

do your config.local.php and refresh setup.php. If setup.php doesn't display a file name then you're editing the wrong config.local.php file!!

hope that helps.

@Blisk
Copy link
Author

Blisk commented Jan 28, 2021

What PHP version R u using? and from what version Postfixadmin You make this upgrade? Check Web server error log for any info.
From Version 3.3 - 2021/01/09 - PostfixAdmin requires PHP 7.0 or greater.

Check yourdomain.com/setup.php if DB doesnt require to be updated with new version so new Postfixadmin to work properly.

Forget password feature works only when You setup "Other e-mail" (Used if the password is forgotten) on email account added to DB. Without it system doesnt know where to send reset code and dont do it.

thank you for info.
my php version is 7.4
I did check that yourdomain.com/setup.php I manage to add admin
I also did a fresh installation, delete database use new files and always is the same.
I did also new installation on new server and it is the same.

Your email address or password are not correct.

@Blisk
Copy link
Author

Blisk commented Jan 28, 2021

die(FILE);

I did that and I get on web page
/var/www/html/postfixadmin/config.inc.php

@studiowena
Copy link

studiowena commented Jan 28, 2021

Try make this - from UPGRADE.txt

3. Change permissions
----------------------
Since the database password is stored in the config.inc.php it's a good idea
to have change the permissions for Postfix Admin.

  $ cd /usr/local/www/postfixadmin
  $ find -type f -print0 | xargs -0 chmod 640
  $ find -type f -print0 | xargs -0 chown root:www-data

(the last command assumes your Apache is running with group "www-data")

Since version 3.0 we use smarty templates. That means the templates_c directory
needs to be writeable for your webserver.

and
Check Web server error log for any info.

@DavidGoodwin
Copy link
Member

die(FILE);

I did that and I get on web page
/var/www/html/postfixadmin/config.inc.php

OK that's fine.

So you said :

I did check that yourdomain.com/setup.php I manage to add admin

Can you login as that admin ? If not, what to do you see? Any error message? Is there an error message in your webserver's log file(s) ( see https://github.com/postfixadmin/postfixadmin/blob/master/DOCUMENTS/FAQ.txt#L38 )

Is there a row in the database 'admin' table ?

Are you using dovecot for your $CONF['encrypt'] setting ?
(If so see #434 (comment) )

@studiowena
Copy link

Try to check mysql server logs while You trying to login and check encryption u setup on config.inc.php

$CONF['encrypt'] = '';

and set with Yours. Logs should tell You more

@SaraSmiseth
Copy link

You also get this error if doveadm pw tries to read your certificate and has no permissions. See #399 and #398.

@Blisk
Copy link
Author

Blisk commented Jan 28, 2021

studiowena
there is no related errors to to that problem

DavidGoodwin
No I can not login as admin I can setup admin but than login not possible I get this error
Your email address or password are not correct.
No error messages in log files for that.
I am not using dovecot encrypt if that is new installation. When upgrade didn't work I made fresh installation.

$CONF['encrypt'] = '';
if I set this than I get error
Invalid token! (CSRF check failed)

Where postfixadmin write admin user and password???

@studiowena
Copy link

$CONF['encrypt'] = '';
if I set this than I get error
Invalid token! (CSRF check failed)

I've gave You example with empty field - You have to choose one of the type of encryption postfixadmin used to encrypt passwords on Your system.

Where postfixadmin write admin user and password???

on config.inc.php You have:
$CONF['setup_password'] = 'generated_hash';
is setup password then u can add super admin which is added to postfiadmin DB table -> admin (Postfix Admin - Virtual Admins)

@Blisk
Copy link
Author

Blisk commented Jan 28, 2021

I don't kno what I am doing wrong I cant even get to login with setup password anymore.
I have setup new password and when I try to login I get error
$CONF['setup_password'] = '$2y$10$LvdKt1hrqI.Qs0zlz.3sK.z6JWDFs5APcD0uxlE.MAL51Y5ylQTA6';
Password verification failed.

@DavidGoodwin
Copy link
Member

@studiowena
Copy link

maybe You copy password from file with "empty space" and this is counted as one more character on password field. Yes this is stupid but possible :)

@Blisk
Copy link
Author

Blisk commented Jan 29, 2021

I have alčl the time
$CONF['encrypt'] = 'md5crypt';

maybe You copy password from file with "empty space" and this is counted as one more character on password field. Yes this is stupid but possible :)

I was carefull about that because yes I did that to in past. But now not.

@Blisk
Copy link
Author

Blisk commented Jan 29, 2021

I manage to make it work. It was not possible to add admin into mysql database with setup.php. So I have add admin via phpmyadmin. And now it work ok.

@studiowena
Copy link

I manage to make it work. It was not possible to add admin into mysql database with setup.php. So I have add admin via phpmyadmin. And now it work ok.

So, maybe Your mysql user used to read DB has no all privilages to make inserts to postfixadmin DB - check it.

btw good to hear You solve problem

@Blisk
Copy link
Author

Blisk commented Jan 29, 2021

I manage to make it work. It was not possible to add admin into mysql database with setup.php. So I have add admin via phpmyadmin. And now it work ok.

So, maybe Your mysql user used to read DB has no all privilages to make inserts to postfixadmin DB - check it.

btw good to hear You solve problem

I have checked that many times and it has all possible rights and still the same

@DavidGoodwin
Copy link
Member

I guess I need to add some sort of database read/write check to #445

@Blisk
Copy link
Author

Blisk commented Jan 29, 2021

I am trying to setup this on other server and it is the same.
But I can access setup.php
when I open login.php I get white blank page and no error in log files
any idea?

@Blisk
Copy link
Author

Blisk commented Jan 29, 2021

I guess I need to add some sort of database read/write check to #445

I can't get information page, no way.

@Blisk
Copy link
Author

Blisk commented Jan 29, 2021

Something here is not working ok. php files have no right access to database.
When I copied database from first server to second server and change domains than I can manage to acces login page and also login and add domain and users. Before that no way.

@bewam
Copy link

bewam commented Jan 30, 2021

Hi @Blisk
I have the same issue. I'm wondering if you, like me, use a kind of reverse proxy with fpm php, in fast-cgi.
It could cause my problem. I understood that it can't access ../common.php, because the file is located outside in the root directory. So authentication can't occur.
I'm trying to investigate further, but I'm pretty sure it's due to this fact.

EDIT: It was a postgres problem, apparently. I had to modify the authentication method "$CONF['encrypt'] = 'md5';".

@Blisk
Copy link
Author

Blisk commented Jan 30, 2021

Hi
No I don't have reverse proxy.
I manage to make it work with copying database from working server now a problem is because I can not login into roundcubemail

@DavidGoodwin
Copy link
Member

If you're feeling adventurous, try using either 'master' or the 'postfixadmin_3.3' branch. The setup.php page in either may now output some more helpful output (once you've authenticated using your setup_password).

@Blisk
Copy link
Author

Blisk commented Feb 5, 2021

thank you but right now I have too much to do to make my self more problems.
:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants