1 (edited by oermolaev 2021-10-21 14:36:41)

Topic: The new user cannot login in to the roundcube

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

Oct 21 09:18:35 mail roundcube: <23kcqdii> DB Error: [1364] Field 'alias' doesn't have a default value (SQL Query: INSERT INTO `users` (`created`, `last_login`, `username`, `mail_host`, `language`, `preferences`) VALUES (now(), now(), 'newusername@mydomain.com', '127.0.0.1', 'ru_RU', 'a:0:{}')) in /opt/www/roundcubemail-1.5.0/program/lib/Roundcube/rcube_db.php on line 566 (POST /mail/?_task=login&_action=login)
Oct 21 09:18:35 mail roundcube: <23kcqdii> PHP Error: Failed to create new user in /opt/www/roundcubemail-1.5.0/program/lib/Roundcube/rcube_user.php on line 726 (POST /mail/?_task=login&_action=login)
Oct 21 09:18:35 mail roundcube: <23kcqdii> PHP Error: Failed to create a user record. Maybe aborted by a plugin? in /opt/www/roundcubemail-1.5.0/program/include/rcmail.php on line 799 (POST /mail/?_task=login&_action=login)


====

The new user cannot login in to the roundcube

----

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

2

Re: The new user cannot login in to the roundcube

you should update to latest, since there were some database related changes

3

Re: The new user cannot login in to the roundcube

Seems you didn't correctly update Roundcube package?

4

Re: The new user cannot login in to the roundcube

ZhangHuangbin wrote:

Seems you didn't correctly update Roundcube package?

Perhaps .. I performed ./bin/installto.sh <target-folder> according to HowTo.
Old users are freely logging in Roundcube, but the newly created is not logined: "Unsuccessful login attempt"

5

Re: The new user cannot login in to the roundcube

Cthulhu wrote:

you should update to latest, since there were some database related changes

Updated all components to the latest versions. I also updated the post.

6

Re: The new user cannot login in to the roundcube

FYI: https://github.com/roundcube/roundcubemail/issues/5717

Did you check the console output when performing upgrade? It should report whether the SQL structure were successfully updated or failed.

7

Re: The new user cannot login in to the roundcube

ZhangHuangbin wrote:

FYI: https://github.com/roundcube/roundcubemail/issues/5717

Did you check the console output when performing upgrade? It should report whether the SQL structure were successfully updated or failed.

I updated iredmail a long time ago. This March. I don't remember the details, but I was pleased with the results of the update. Adding new users was not checked as there was no need.
Solution on your link? "The workaround would be to allow null values"?

8

Re: The new user cannot login in to the roundcube

It seems your upgrade missed some SQL structure in Roundcube sql db.

9

Re: The new user cannot login in to the roundcube

ZhangHuangbin wrote:

It seems your upgrade missed some SQL structure in Roundcube sql db.

Is it possible to recreate the SQL roundcubemail structure from scratch?
Or add the new user record to the SQL table manually?
Or can you suggest another direction?

10

Re: The new user cannot login in to the roundcube

Try to upgrade the SQL structure manually:

cd /opt/www/roundcubemail/
./bin/updatedb.sh --dir=./SQL --package roundcube

Pay close attention to the console output. If it doesn't work, please copy the full console output and paste here for troubleshooting.

11

Re: The new user cannot login in to the roundcube

ZhangHuangbin, here is the console output

root@mail:/opt/www/roundcubemail# ./bin/updatedb.sh --dir=./SQL --package roundcube
Updating database schema (2018021600)... [FAILED]
ERROR: Error in DDL upgrade 2018021600: [1050] Table 'filestore' already exists

12

Re: The new user cannot login in to the roundcube

Try to update file 2018021600.sql manually:

cd /opt/www/roundcubemail/SQL/mysql/
mysql roundcubemail

# Now it enters MySQL command line, below are SQL commands.

SOURCE 2018021600.sql;

What's the output? If it goes well, please import (with SQL command `SOURCE xxx.sql`) other NEW sql files too.

13

Re: The new user cannot login in to the roundcube

root@mail:/opt/www/roundcubemail/SQL/mysql# mysql roundcubemail 
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 117592
Server version: 10.3.29-MariaDB-0+deb10u1 Debian 10

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [roundcubemail]> SOURCE 2018021600.sql;
ERROR 1050 (42S01) at line 1 in file: '2018021600.sql': Table 'filestore' already exists
MariaDB [roundcubemail]> 

14

Re: The new user cannot login in to the roundcube

Despite this and other errors, after

import (with SQL command `SOURCE xxx.sql`) other NEW sql files too

the problem of logging into Roundcube for a new user is gone.
Has the problem been resolved?

15

Re: The new user cannot login in to the roundcube

ZhangHuangbin, anyway, coffee for you from me