Persistently getting "Access denied" despite correct everything
Persistently getting "Access denied" despite correct everything
Hi all,
I had to restore the MySQL DB from a backup and change passwords for all MySQL user accounts. Previously I already used that very same backup, and everything worked fine.
Now I was able to bring up everything, which uses this MySQL instance (my web sites, jabber server, and a few other things - all of them happily took the new passwords and are working), but hMailServer. It is persistently giving me Access denied error for the specific user @'localhost', even though I can run mysql and log in with the same credentials.
I tried playing with localhost vs IP vs host name to no avail.
Sometimes I have to wait about 30 seconds to get this message, other times it pops up immediately.
Tried changing the password, allowing the user access from localhost, from this specific host name and from % on MySQL side, and still getting nothing but this message:
"Severity: 1 (Critical), Code: HM4354, Source: Application::OpenDatabase, Description: hMailServer failed to connect to the database server. Error message: Access denied for user 'hMailServer'@'localhost' (using password: YES)"
I had to restore the MySQL DB from a backup and change passwords for all MySQL user accounts. Previously I already used that very same backup, and everything worked fine.
Now I was able to bring up everything, which uses this MySQL instance (my web sites, jabber server, and a few other things - all of them happily took the new passwords and are working), but hMailServer. It is persistently giving me Access denied error for the specific user @'localhost', even though I can run mysql and log in with the same credentials.
I tried playing with localhost vs IP vs host name to no avail.
Sometimes I have to wait about 30 seconds to get this message, other times it pops up immediately.
Tried changing the password, allowing the user access from localhost, from this specific host name and from % on MySQL side, and still getting nothing but this message:
"Severity: 1 (Critical), Code: HM4354, Source: Application::OpenDatabase, Description: hMailServer failed to connect to the database server. Error message: Access denied for user 'hMailServer'@'localhost' (using password: YES)"
Re: Persistently getting "Access denied" despite correct everything
I guess, I am getting a bit further ahead:
I edited the INI file, turned password encryption off, and changed the encrypted password to the same plain text password, which I changed the MySQL user's password to. I am no longer getting the MySQL error.
Now when I am trying to run the admin UI, I am getting a message "the password is incorrect", then the password dialog.
But the admin password, which I am using for more than 10 years and know it for certain, is not working anymore.
Okay, I thought, probably the encryption of passwords applied not only to the MySQL password, but to the admin password too.
So I replaced the encrypted admin password with the plain text, thinking it would work. Nope. I am still getting the same message about invalid password.
How do I get my server back up?
Some things in the INI file and the dialog for DB connections, that comes up after the error message, do not make sense.
For instance, no matter what I enter in there: localhost, or the IP, or the host name, the INI only saves localhost.
And by the way, I just uninstalled, reinstalled and configured the DB, but now I am also seeing line #2 in the error message, about the RPC server unavailable.
What can be so horribly wrong in this simple INI file, that out of several softwares, only hMailServer absolutely cannot log into this DB?
I can log in from any host on the network, using any number of different SQL clients (MySQL workbench, PHPMyAdmin, Squirrel SQL) but hMailServer cannot log in. Why? Any ideas?
I edited the INI file, turned password encryption off, and changed the encrypted password to the same plain text password, which I changed the MySQL user's password to. I am no longer getting the MySQL error.
Now when I am trying to run the admin UI, I am getting a message "the password is incorrect", then the password dialog.
But the admin password, which I am using for more than 10 years and know it for certain, is not working anymore.
Okay, I thought, probably the encryption of passwords applied not only to the MySQL password, but to the admin password too.
So I replaced the encrypted admin password with the plain text, thinking it would work. Nope. I am still getting the same message about invalid password.
How do I get my server back up?
Some things in the INI file and the dialog for DB connections, that comes up after the error message, do not make sense.
For instance, no matter what I enter in there: localhost, or the IP, or the host name, the INI only saves localhost.
And by the way, I just uninstalled, reinstalled and configured the DB, but now I am also seeing line #2 in the error message, about the RPC server unavailable.
What can be so horribly wrong in this simple INI file, that out of several softwares, only hMailServer absolutely cannot log into this DB?
I can log in from any host on the network, using any number of different SQL clients (MySQL workbench, PHPMyAdmin, Squirrel SQL) but hMailServer cannot log in. Why? Any ideas?
Last edited by DrmCa on 2018-12-22 04:30, edited 1 time in total.
Re: Persistently getting "Access denied" despite correct everything
Set the Administrator password empty (just leave it blank) and login to hMailAdmin without a password
and in hMailAdmin set a new Adminstrator Password again.
and in hMailAdmin set a new Adminstrator Password again.
64-Bit builds of hMailserver
hMailServer-5.6.+ (HCD) https://github.com/hMailServer-ComDevs/hmailserver
hMailServer-5.6.+ (LTS) https://github.com/Dravion/hMailServer/releases
hMailServer-5.6.+ (HCD) https://github.com/hMailServer-ComDevs/hmailserver
hMailServer-5.6.+ (LTS) https://github.com/Dravion/hMailServer/releases
Re: Persistently getting "Access denied" despite correct everything
Did that.
"The specified user name or password is incorrect"
and then it prompts for the admin password.
And if I press Cancel, it takes me back to the DB connection dialog.
But strangely, the server seems to be up and running! I just got an email, but still cannot log into the admin UI.
"The specified user name or password is incorrect"
and then it prompts for the admin password.
And if I press Cancel, it takes me back to the DB connection dialog.
But strangely, the server seems to be up and running! I just got an email, but still cannot log into the admin UI.
Re: Persistently getting "Access denied" despite correct everything
Ok, follow this tutorial to reset your Admin password
viewtopic.php?f=21&t=31490
viewtopic.php?f=21&t=31490
64-Bit builds of hMailserver
hMailServer-5.6.+ (HCD) https://github.com/hMailServer-ComDevs/hmailserver
hMailServer-5.6.+ (LTS) https://github.com/Dravion/hMailServer/releases
hMailServer-5.6.+ (HCD) https://github.com/hMailServer-ComDevs/hmailserver
hMailServer-5.6.+ (LTS) https://github.com/Dravion/hMailServer/releases
Re: Persistently getting "Access denied" despite correct everything
where is your hmailserver.ini located?
Can you please show the contents of it (with passwords removed)
What version of hMailserver?
What Version of MySQL?
Can you please show the contents of it (with passwords removed)
What version of hMailserver?
What Version of MySQL?
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation
https://www.hmailserver.com/documentation
Re: Persistently getting "Access denied" despite correct everything
Solved those one, thanks for the tip about the blank admin password!
Once I used the combination of:
1. The "administrator" user name in the connection dialog (which I was mistaking for the DB connection and provided the DB password), and
2. The IP address in the INI file (localhost did not work)
the server came up w/o errors and I logged into the admin UI. So far so good, but!
One question: is there a way to return to using the encrypted DB password?
Also, there is a problem and a minor annoyance:
The problem is that SSL no longer works. It almost feels like the server is no longer listening on port 995 (Thunderbirds says no messages, error connecting to the server, it refused connection)
Last night I was getting these errors in the log:
But since late last night I am not getting them, after simply re-entering the same path.
And the annoyance is that every time I start the admin UI, it first alerts of invalid password, then pops up the password dialog.
Once I used the combination of:
1. The "administrator" user name in the connection dialog (which I was mistaking for the DB connection and provided the DB password), and
2. The IP address in the INI file (localhost did not work)
the server came up w/o errors and I logged into the admin UI. So far so good, but!
One question: is there a way to return to using the encrypted DB password?
Also, there is a problem and a minor annoyance:
The problem is that SSL no longer works. It almost feels like the server is no longer listening on port 995 (Thunderbirds says no messages, error connecting to the server, it refused connection)
Last night I was getting these errors in the log:
Code: Select all
"ERROR" 5836 "2018-12-21 21:34:46.157" "Severity: 2 (High), Code: HM5113, Source: SslContextInitializer::InitServer, Description: Failed to load certificate file. Path: D:\Program Files\Apache Software Foundation\Apache24\conf\ssl.crt\mydomain.crt, Address: 0.0.0.0, Port: 995, Error: use_certificate_file: No such process"
And the annoyance is that every time I start the admin UI, it first alerts of invalid password, then pops up the password dialog.
Re: Persistently getting "Access denied" despite correct everything
In hMailAdmin, you can setup a new Administrator password.
If your Pop3 SSL certificates has trouble,
delete it from the SSL-Section in hMailadmin
and set it up new, a reasign it to,port 110.
If your Pop3 SSL certificates has trouble,
delete it from the SSL-Section in hMailadmin
and set it up new, a reasign it to,port 110.
64-Bit builds of hMailserver
hMailServer-5.6.+ (HCD) https://github.com/hMailServer-ComDevs/hmailserver
hMailServer-5.6.+ (LTS) https://github.com/Dravion/hMailServer/releases
hMailServer-5.6.+ (HCD) https://github.com/hMailServer-ComDevs/hmailserver
hMailServer-5.6.+ (LTS) https://github.com/Dravion/hMailServer/releases
Re: Persistently getting "Access denied" despite correct everything
I know. I did that. When I set up a new password, I get this annoying popup about the wrong password. Then I click Ok, get the regular password prompt, enter the new password, and it logs me in. What am I missing?
This is sounding a bit cryptic to me. First of all, I do not want SSL on port 110, as I have clients, who can only connect over 110 in plain text.If your Pop3 SSL certificates has trouble,
delete it from the SSL-Section in hMailadmin
and set it up new, a reasign it to,port 110.
I want SSL to be on port 995.
What do you mean, delete it? There is a path to the cert, and that cert is shared among all services for this domain - Apache, jabber server, and several others including hMailServer. Only hMailServer is having a problem with it. So what exactly does it mean - delete and set up new?
Re: Persistently getting "Access denied" despite correct everything
You have an SSL Error for Port 995 and Port 995 is encrypted POP3
You dont need to look for Port 110 if your Problem is 995
You dont need to look for Port 110 if your Problem is 995
64-Bit builds of hMailserver
hMailServer-5.6.+ (HCD) https://github.com/hMailServer-ComDevs/hmailserver
hMailServer-5.6.+ (LTS) https://github.com/Dravion/hMailServer/releases
hMailServer-5.6.+ (HCD) https://github.com/hMailServer-ComDevs/hmailserver
hMailServer-5.6.+ (LTS) https://github.com/Dravion/hMailServer/releases
Re: Persistently getting "Access denied" despite correct everything
Cool! But what should I do if I have an SSL error on port 995?
I had to tell all users to temporarily switch off SSL for POP and SMTP, how do I troubleshoot to allow them to turn this back on?
So far, when I am trying to log in, connection is refused on 995. I only restored the DB, the certs and keys are the same for more than a year.
I had to tell all users to temporarily switch off SSL for POP and SMTP, how do I troubleshoot to allow them to turn this back on?
So far, when I am trying to log in, connection is refused on 995. I only restored the DB, the certs and keys are the same for more than a year.
Re: Persistently getting "Access denied" despite correct everything
That the wrong password is saved.
press cancel on the first messagebox, then a 'connect' dialogue appears, select localhost and press edit
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation
https://www.hmailserver.com/documentation
Re: Persistently getting "Access denied" despite correct everything
Run this and post the resultsDrmCa wrote: ↑2018-12-22 23:48Cool! But what should I do if I have an SSL error on port 995?
I had to tell all users to temporarily switch off SSL for POP and SMTP, how do I troubleshoot to allow them to turn this back on?
So far, when I am trying to log in, connection is refused on 995. I only restored the DB, the certs and keys are the same for more than a year.
http://www.hmailserver.com/forum/viewto ... 20&t=30914
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation
https://www.hmailserver.com/documentation
Re: Persistently getting "Access denied" despite correct everything
This is what I am getting:

Am I missing any software to be installed?

Am I missing any software to be installed?
- jimimaseye
- Moderator
- Posts: 7701
- Joined: 2011-09-08 17:48
Re: Persistently getting "Access denied" despite correct everything
Wrong password. You need the administrator password.
[Entered by mobile. Excuse my spelling.]
It's Christmas!
[Entered by mobile. Excuse my spelling.]
It's Christmas!
HMS 5.6.6 B2383 on Win Server 2008 R2 Foundation, + 5.6.7-B2415 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829
Re: Persistently getting "Access denied" despite correct everything
Right. Sounds like my admin password was left blank since I started getting the popup about it being invalid every time I opened the admin UI. I set it to some value, and here is the file.
- Attachments
-
- z.zip
- diags
- (3.25 KiB) Downloaded 5 times
Re: Persistently getting "Access denied" despite correct everything
What is your current issue?
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation
https://www.hmailserver.com/documentation
Re: Persistently getting "Access denied" despite correct everything
The problem is the SSL error from the post on 2018-12-22 09:09
Code: Select all
"ERROR" 5836 "2018-12-21 21:34:46.157" "Severity: 2 (High), Code: HM5113, Source: SslContextInitializer::InitServer, Description: Failed to load certificate file. Path: D:\Program Files\Apache Software Foundation\Apache24\conf\ssl.crt\mydomain.crt, Address: 0.0.0.0, Port: 995, Error: use_certificate_file: No such process"
Re: Persistently getting "Access denied" despite correct everything
right
so the user that the hMailserver SERVICE runs under doesn't have access to that file
Is D drive a mapped network drive or a local drive?
so the user that the hMailserver SERVICE runs under doesn't have access to that file
Is D drive a mapped network drive or a local drive?
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation
https://www.hmailserver.com/documentation
Re: Persistently getting "Access denied" despite correct everything
Genius! Thanks a lot, Matt!
POP3 worked right away, but then Thunderbird threw me to a loop, as when switching connection security on POP it changes 110 to 995, but when on SMTP it leaves it at 25 and for a while I was staring at the progress bar when sending. Then realized that, switched 25 to 465, and it is working.
POP3 worked right away, but then Thunderbird threw me to a loop, as when switching connection security on POP it changes 110 to 995, but when on SMTP it leaves it at 25 and for a while I was staring at the progress bar when sending. Then realized that, switched 25 to 465, and it is working.