1

Topic: URGENT Fai login to iredadmin

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):
- Deployed with iRedMail Easy or the downloadable installer?
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
1.7.1
Download
Ubuntu 22.04
Mariadb
Nginx
No Pro

Our iredmail has been up and running without any issues fore more than 6 months. Yesterday I logged in to iredadmin as usual and added a mail account. When I was logged in we had a powercut at home and my internet connection disappered. It lasted many hours so I did not try to login again until today. And I cant login to iredadmin. When I try the same with roundcube I cant login either So it seems that the password has got corrupted.
Is there any way create a new password for that account using SSH, or I should test to restore a backup for iredadmin db. Or is the password stored somewhere else
Please advise before I do anything

Regards

Anders

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: URGENT Fai login to iredadmin

I get this
https://mail.mxmail.pro/iredadmin/login … REDENTIALS

3

Re: URGENT Fai login to iredadmin

#!/usr/bin/env bash
if [ X"$#" != X'2' ]; then
    echo "Invalid"
    echo "bash ./mailboxpw.sh user@domain.tld password"
    exit 255
fi

# Read input
mailbox="$1"
password="$2"

#Crypt Password
CRYPT_PASSWD="$(doveadm pw -s 'ssha512' -p ${password})"

cat <<EOF
UPDATE mailbox SET password = '${CRYPT_PASSWD}' WHERE username = '${mailbox,,}';
EOF

exit 0

This creates you a SQL statement where you can change the password for a specific mailbox via console

4

Re: URGENT Fai login to iredadmin

@Cthulhu

New turf for me. Can you please rewrite it so I can change the password for postmaster@mxmail.pro. I see that the account is there.
Can I also check somewhere if this account is the login account for iredadmin?


Cthulhu wrote:
#!/usr/bin/env bash
if [ X"$#" != X'2' ]; then
    echo "Invalid"
    echo "bash ./mailboxpw.sh user@domain.tld password"
    exit 255
fi

# Read input
mailbox="$1"
password="$2"

#Crypt Password
CRYPT_PASSWD="$(doveadm pw -s 'ssha512' -p ${password})"

cat <<EOF
UPDATE mailbox SET password = '${CRYPT_PASSWD}' WHERE username = '${mailbox,,}';
EOF

exit 0

This creates you a SQL statement where you can change the password for a specific mailbox via console

5

Re: URGENT Fai login to iredadmin

Is MariaDB service running? Are the databases damaged during power outage?

6

Re: URGENT Fai login to iredadmin

The power cut was at my office and the iredmail server is in a datacenter. Everything runs normal, it seems that all allcounts is working, except the one created during installation and used to login to iredadmin. It does not work for login to iredadmin or roundcube

Can I restore the db where the account passwords are stored to see if that is a problem. Is it the vmail db?

ZhangHuangbin wrote:

Is MariaDB service running? Are the databases damaged during power outage?

7

Re: URGENT Fai login to iredadmin

I'd suggest you try login postmaster@yourdomain.com to roundcube as a mail user first.

It seems you just lost your postmaster password in your browser password manager....

Try to login your server through ssh and look at ./iRedMail-1.7.1/iRedmail.tips to recover that ....if you haven't change it after installation.

8

Re: URGENT Fai login to iredadmin

Its not possible to login to RC, I get wrong user/password
I am logged in using ssh and that is no problem
I have the tips file downloaded and it say the password I choose during install but i Get invalid credentials.
I assume it is the same if I take down the file again

Have no clue what to do now

9

Re: URGENT Fai login to iredadmin

I have also tested with another browser that I have never used before and it is the same
This password must be stred in a db somewhere. Which? I f I restore it from a date 1 day before this happend it should be back to normal
There is another strange thing. If I look in the vmail db sql dump there is a table called deleted accounts. postmaster@mxmail.pro is isted there but it has been the same as long as I can see 06-08-2024 and I use it once per day

10

Re: URGENT Fai login to iredadmin

A wild question. In the main settings file, settings.py, there is a setting for webmasters email address. Is this also the login for the iredadmin? if so Can it be change to one of my mail accounts that I know is working?

11

Re: URGENT Fai login to iredadmin

dude, i gave you a script, super easy to use
just change the password via command line and login

12

Re: URGENT Fai login to iredadmin

Cthulhu wrote:

dude, i gave you a script, super easy to use
just change the password via command line and login

Sorry its way out of my leage so I asked you to change it so it changes the password for the postmaster@mxmail.pro. Can you please do that for me

TIA

Anders

13 (edited by Cthulhu 2024-11-05 13:01:58)

Re: URGENT Fai login to iredadmin

sorry, i won't use that much time on this, aswell it would need your login credentials for mysql root user, if you are unable to run a SQL command then do some research, there are uncountable pages where you can find guides for this

14 (edited by chris.23lo 2024-11-05 10:43:23)

Re: URGENT Fai login to iredadmin

I can see there are a few choices

- you can restore - if your mail users allow lost of new emails since last "working" backup and you know exactly your backup is healthy and complete and restorable.

- you can run the script which outputs a sql command and then you can update your mail admin password via mysql CLI, yes, it is unknown to you but you can test it if you have a few testing accounts around. These open source scripts are not maintain by iRedmail, so you take the risk (yes, as an administrator role).

- you can, may be, pay iRedmail maintainer for tickets and assistance if this is a business and have to be fixed.

last but not least, check out https://docs.iredmail.org/reset.user.password.html
Cheers.

15 (edited by anders.yuran 2024-11-05 13:31:02)

Re: URGENT Fai login to iredadmin

When I look further I realize that it must be something else. I also have the same user and pw for netdata and there it works flawless. So why not in iredadmin and roundcube



chris.23lo wrote:

I can see there are a few choices

- you can restore - if your mail users allow lost of new emails since last "working" backup and you know exactly your backup is healthy and complete and restorable.

- you can run the script which outputs a sql command and then you can update your mail admin password via mysql CLI, yes, it is unknown to you but you can test it if you have a few testing accounts around. These open source scripts are not maintain by iRedmail, so you take the risk (yes, as an administrator role).

- you can, may be, pay iRedmail maintainer for tickets and assistance if this is a business and have to be fixed.

last but not least, check out https://docs.iredmail.org/reset.user.password.html
Cheers.

16 (edited by chris.23lo 2024-11-05 12:26:56)

Re: URGENT Fai login to iredadmin

anders.yuran wrote:

When I look further I realize that it must be something else. I also have the same user and pw for netplan and there it works flawless. So why not in iredadmin and roundcube



chris.23lo wrote:

I can see there are a few choices

- you can restore - if your mail users allow lost of new emails since last "working" backup and you know exactly your backup is healthy and complete and restorable.

- you can run the script which outputs a sql command and then you can update your mail admin password via mysql CLI, yes, it is unknown to you but you can test it if you have a few testing accounts around. These open source scripts are not maintain by iRedmail, so you take the risk (yes, as an administrator role).

- you can, may be, pay iRedmail maintainer for tickets and assistance if this is a business and have to be fixed.

last but not least, check out https://docs.iredmail.org/reset.user.password.html
Cheers.

You are quite confused with OS authentication to iRedmail mariadb authentication.

You provided your setup:
1.7.1
Download
Ubuntu 22.04
Mariadb   <---- mail user authentication are stored here, among all other internals.
Nginx
No Pro

17

Re: URGENT Fai login to iredadmin

Well I am very aware of that but thought perhaps I needed to login to one of the db and not use the root login.
But as I wrote it must be another reason because user and password work in netdata and they are the same as for ideradmin

chris.23lo wrote:
anders.yuran wrote:

When I look further I realize that it must be something else. I also have the same user and pw for netplan and there it works flawless. So why not in iredadmin and roundcube



chris.23lo wrote:

I can see there are a few choices

- you can restore - if your mail users allow lost of new emails since last "working" backup and you know exactly your backup is healthy and complete and restorable.

- you can run the script which outputs a sql command and then you can update your mail admin password via mysql CLI, yes, it is unknown to you but you can test it if you have a few testing accounts around. These open source scripts are not maintain by iRedmail, so you take the risk (yes, as an administrator role).

- you can, may be, pay iRedmail maintainer for tickets and assistance if this is a business and have to be fixed.

last but not least, check out https://docs.iredmail.org/reset.user.password.html
Cheers.

You are quite confused with OS authentication to iRedmail mariadb authentication.

You provided your setup:
1.7.1
Download
Ubuntu 22.04
Mariadb   <---- mail user authentication are stored here, among all other internals.
Nginx
No Pro

18

Re: URGENT Fai login to iredadmin

PROBLEM IS NOW SOLVED!
Thanks for the script, after trial and error I got it to work and was able to change password and now everything work as it should. Now we can finally buy a Pro licence.

Anders

anders.yuran wrote:

Well I am very aware of that but thought perhaps I needed to login to one of the db and not use the root login.
But as I wrote it must be another reason because user and password work in netdata and they are the same as for ideradmin

chris.23lo wrote:
anders.yuran wrote:

When I look further I realize that it must be something else. I also have the same user and pw for netplan and there it works flawless. So why not in iredadmin and roundcube

You are quite confused with OS authentication to iRedmail mariadb authentication.

You provided your setup:
1.7.1
Download
Ubuntu 22.04
Mariadb   <---- mail user authentication are stored here, among all other internals.
Nginx
No Pro