mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-26 09:26:00 +03:00
[GH-ISSUE #2084] Default password scheme list is empty #1520
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#1520
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 @bosgold on GitHub (Nov 20, 2020).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/2084
Originally assigned to: @tonioo on GitHub.
Impacted versions
Current behavior
Modoboa -> Parameters -> General
Default passwort scheme drop down list is empty but "This field is required".
root # doveadm pw -l
SHA1 SSHA512 SCRAM-SHA-256 BLF-CRYPT PLAIN HMAC-MD5 OTP SHA512 SHA RPA DES-CRYPT CRYPT SSHA MD5-CRYPT SKEY PLAIN-MD4 PLAIN-MD5 SCRAM-SHA-1 LANMAN SHA512-CRYPT CLEAR CLEARTEXT ARGON2I ARGON2ID SSHA256 NTLM MD5 PBKDF2 SHA256 CRAM-MD5 PLAIN-TRUNC SHA256-CRYPT SMD5 DIGEST-MD5 LDAP-MD5
modobao # doveadm pw -l
doveconf: Fatal: Error in configuration file /etc/dovecot/conf.d/10-ssl.conf line 18: ssl_key: Can't open file /etc/dovecot/private/dovecot.key.pem: Permission denied
/etc/dovecot/conf.d/10-ssl.conf
# PEM encoded X.509 SSL/TLS certificate and private key. They're opened before# dropping root privileges, so keep the key file unreadable by anyone but# root.Thus when sticking to the advice by Dovecot the command "doveadm pw -l" won't work for the modoboa user. And the "default password scheme" list stays empty.
@tonioo commented on GitHub (Dec 4, 2020):
@bosgold How did you install Modoboa? You need some sudo configuration to make this work.
@fyryNy commented on GitHub (Dec 16, 2020):
Hi, I had the same problem on Ubuntu 20.10, so if someone is struggling with this, this is what I did to fix it:
Edit "/etc/dovecot/dovecot-sql.conf.ext"
Find and uncomment #default_pass_scheme = MD5 and change to "default_pass_scheme = CRYPT" (or just add this line to config file)
Restart services.
It worked for me, so I hope it would work for someone else.
@bosgold commented on GitHub (Dec 16, 2020):
Installation was using the modoboa-installer. Sometime in 2018.
This problem came however only up when upgrading from Modoboa 1.15 to 1.17. Not sure when I've been the last time on the "Parameters - configure Modoboa" page, maybe not with version 1.15 but surely no later than 1.13 or 1.14. And back than it still worked.
Follwing runs as a crontab
Operations on mailboxes
"The cron script must be executed by the system user owning the mailboxes." -> system user: vmail
@tonioo commented on GitHub (Jan 27, 2021):
@bosgold Have you tried to run
sudo doveadm pw -las modoboa user?@reesing322 commented on GitHub (Feb 6, 2021):
As I have the same problem, I can answer this:
In the modoboa sudoers file is only this:
This is on a rather fresh install, I've used the installer to install modoboa on a clean latest Ubuntu Server.
I think after the installation, when I was first checkout out the website, I've seen 2 options (plain and one of the crypts),
but since I've added a first domain, the 'default password scheme' remains empty, and prevents saves to the parameters section.
@bosgold commented on GitHub (Feb 7, 2021):
Same result for me as @reesing322 when I try
modoboa@mail:~$ sudo doveadm pw -l
Also the same /etc/sudoers.d/modoboa content. And this brought me to the idea to try
At least now without asking for a password.
And when adding the user vmail to the group doveadm the error
is no more showing up.
But this does nothing change about the fact that the key file has to be readable by anyone to work.
and not
as suggested.
For this the the modobao sudoers file should read
and with this the command
will work as effectively eqivalent with
@reesing322 commented on GitHub (Feb 7, 2021):
@bosgold @tonioo
Indeed, the solution by Bosgold works. The issue with the empty "Default password scheme list" for me is solved by adding vmail to the dovecot group.
@bosgold Your solution for the 'permission denied' issue with the stats-writer might work, however, accessing the private key should not be necessary in this case. I have implemented the solution given here:
https://github.com/postfixadmin/postfixadmin/issues/381
The config reader will no longer fail over the permission issue, and you private key still has the same level of protection.
@greatpilaf commented on GitHub (Apr 29, 2021):
I had the same error, with the next enviroment:
OS Type: Debian
OS Version: Debian Bullseye
Modoboa: 1.17.0
Webserver: Nginx/1.18.0
Dovecot: 2.3.13
Certificates: self-signed located on /etc/ssl/cert.crt and /etc/ssl/private/cert.key
So, in the modoboa web app, parameters tab, the default password scheme appeared empty, when i was trying to execute:
doveadm pw -las modoboa user, gave me the errorCan't open file /etc/ssl/private/cert.key: Permission denied.So, i added the modoboa user to the group
ssl-cert, after that the modoboa user was able to read the key, but the next error was:Error: net_connect_unix(/run/dovecot/stats-writer) failed: Permission denied, then i added the modoboa user to thedovecotgroup too, after that and restart the services, the default password scheme showed all available options.Maybe this can help.
@fpiccinali commented on GitHub (Nov 26, 2021):
For ubuntu 20.04:
apt install python3-crypto
@MrGeneration commented on GitHub (Apr 13, 2022):
For anyone else bumping their head for like an hour like me.
If you followed above hints and solved the permission issues, make sure to restart Modoboas application handler (like e.g.
uwsgi).