1 (edited by beez 2015-07-22 13:41:13)

Topic: new installation broken when special char is used for password

======== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.2
- Linux/BSD distribution name and version: Ubuntu 14.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mariadb
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? N/A
- Related log if you're reporting an issue:
====

Hello there,

I was trying some new iredmail installation today,
and when a special char character is used for mysql root password,
the database for the mail, vmail, clubringer, iredadmin, etc... (all starting schemas failed to be created)

basically, I used a special character (hashtag) on mysql root password, eg: "PassWord#",
I know that from the begining, special characters is not recommended to be used in the password config.

I found the culprit though, its in the installation script <IRED>/functions/mysql.sh line 40
when creating temporary my.cnf, the password should be wrapped with quote, so special characters can be processed

    cat >> ${MYSQL_DEFAULTS_FILE_ROOT} <<EOF
[client]
user=${MYSQL_ROOT_USER}
password=${MYSQL_ROOT_PASSWD}
EOF

into:

    cat >> ${MYSQL_DEFAULTS_FILE_ROOT} <<EOF
[client]
user=${MYSQL_ROOT_USER}
password='${MYSQL_ROOT_PASSWD}'
EOF

hopefully you can add this fix in the future files, so when special chars are used, the database creation doesn't fail silently (maybe you also need to add checking function in the installation script to ensure the databases are created successfully)

----

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

2

Re: new installation broken when special char is used for password

Thanks for the feedback. This was fixed on Jul 15:
https://bitbucket.org/zhb/iredmail/comm … b16f798df9