mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-25 17:06:01 +03:00
[GH-ISSUE #1477] Annoing warning in error log with mysql DB #1163
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#1163
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @niko-lay on GitHub (Apr 25, 2018).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/1477
Impacted versions
Steps to reproduce
Install modoboa with mysql, not mariadb. Set in installer.cfg
and provide root credentials
Current behavior
Each request to the database is accompanied with an annoying message in the logs
Apr 22 09:59:17 xxx dovecot: postlogin: Error: mysql: [Warning] Using a password on the command line interface can be insecure.Expected behavior
No message about mysql error/warning
Is there any ability to remove this message? For example, I want to use
mysql_config_editor, but I'm not sure if theproxy:mysqlunderstands this setting@tomcrus001 commented on GitHub (Oct 31, 2020):
Hey there.
As the databse-credentials are already contained in Modoboa's configuration file
settings.py, I'd suggest to add another command tomanage.pye.g.update-last-login, which will do the database-query in turn.This way the shell-script
postlogin.shcurrently being in charge of doing this isn't needed any more and therefor doesn't need to contain any username/password for accessing the database.I'd also be willing to contribute this myself. I have some experience with Django, but as I just started using Modoboa I'm not sure what would be the best Django-app to include this, maybe the
admin-app?@tomcrus001 commented on GitHub (Oct 31, 2020):
Some background information about the warning itself can be found here: End-User Guidelines for Password Security
In short the: password given to
mysql(or also any other DB-cli-tool) as command-line-parameter can possibly get seen by anybody who can see the process-list on the server. So this is a security-risk of leaking the database-password!@tonioo commented on GitHub (Nov 5, 2020):
@tomcrus001 That's actually a good idea! I think the core app would be the best place, since it contains the User model. What do you think?
@tomcrus001 commented on GitHub (Jan 8, 2021):
Just for convenience I'll document some background-information about where the mentioned
postlogin.shgets used and for what purpose:The dovecot-configuration in
/etc/dovecot/conf.d/10-master.confspecifies to call this script after login to imap-/pop3-services - see Dovecot-Documantation about this.The script just updates the timestamp of last user-login and get executed as modoboa-user
@tomcrus001 commented on GitHub (Jan 8, 2021):
I'll try now to implement this function as management-command as suggested before and make a pull-request as soon as I have implemented it.
After that there still exists the need to also change the modoboa-installer to use this new command instead
postlogin.sh.And probably there needs to get done some updates on already installed setups as well. Are there any update-scripts that get used for this?
@github-actions[bot] commented on GitHub (Jan 21, 2026):
This issue was closed because it has been stalled for 14 days with no activity.