configuration defaults



  • Hai,

    I was under the assumption that defaults are the same as shown in the config files.
    but the server.cfg shows
    #mysql_user = kopano

    but it tries to connect as root.
    Im setting up with minimal changes in the .cfg files atm.

    Did i miss something?


  • Kopano

    @thctlo you must have an old configuration file. The value in the cfg is for now installations indeed root: https://stash.kopano.io/projects/KC/repos/kopanocore/browse/installer/linux/server.cfg#131



  • Hi Felix.

    Then did this change happen, im missed this somewhere.
    I’ve re-checked the config in :/usr/share/doc/kopano/example-config/server.cfg and your right.

    Do you know also when the change is make from kopano back to root? which is in my opinion less secure.

    if its about creating the user and DB at install then i suggest, add this in the installer.
    This is usable on Debian bases systems.

    # Set RANDOMPASSWD
    RANDOMPASSWD(){ < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-16};echo; } 
    ##### Setup the Database
    SQLDBPWD="$(RANDOMPASSWD)"
    mysql --defaults-file=/etc/mysql/debian.cnf -Bse "CREATE DATABASE kopano"; 
    mysql --defaults-file=/etc/mysql/debian.cnf -Bse "CREATE USER kopano@localhost IDENTIFIED BY '$SQLDBPWD'";
    mysql --defaults-file=/etc/mysql/debian.cnf -Bse "GRANT all ON kopano.* TO 'kopano'@'localhost' IDENTIFIED BY '$SQLDBPWD'";
    
    

  • Kopano

    @thctlo said in configuration defaults:

    Do you know also when the change is make from kopano back to root

    as far as I could see this always used to be root (at least ever since we forked over from zarafa).

    Yes, of course one should not use root to login to MySQL, but the value here in the configuration file is just a default value and it should not be understood as a recommendation.

    Also we are not including any mysql configuration magic in our own packages since we cannot be certain that the admin actually wants to have mysql running on the same host at all.



  • @fbartels said in configuration defaults:

    Also we are not including any mysql configuration magic in our own packages since we cannot be certain that the admin actually wants to have mysql running on the same host at all.

    Ahh, yes, thats a good one.
    Thanks for clearing this up.


Log in to reply