AWStats and iRedMail Login Problems
From KlavoWiki
Jump to navigationJump to search
iRedMail uses SHA512 password hashes and Apache is unable to read these passwords. You will need to use a MD5 password hashes for Apache to read the password. Rather than changing the password I decided to create a new account specifically for AWStats. Looking at the AWStats configuration file it is looking for a user that has global domain rights. Based on this information I crated a new use within the SQL database.
Create a MD5 password.
doveadm pw -s 'MD5' -p 'ThisisMyPassword' | awk -F'{MD5}' '{print $2}'
Copy the MD5 password and use in the next commands.
Enter the SQL CLI
mysql -pMyLongandComplexSQLPassword vmail
Create a new user for AWStats. Username awstats with password from previous MD5 hash.
insert into mailbox (username, password, name, isglobaladmin, created) values ('awstats', '$1$xDPIzoZn$TKtQTV0qig0G7L.EoY2ay1', 'AWStats User', 1, now());
Change the password for user awstats
update mailbox set modified=now(), password='$1$3b.qn8Vu$FDI/.rO9YrCFDQsmC11GE.' where username='awstats';
Delete awstats user
delete from mailbox where username='awstats';
Display all Global Admins
select username, name, password, name from mailbox where isglobaladmin=1;