Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-2704

LP:454237 - deb package fails to add user for debian-sys-maint

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      deb package fails to add user for debian-sys-maint on installation.

      This causes package configuration to fail with an error:

      ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)

      and then this error will show up on any invocation of /etc/init.d/mysql start|stop|etc.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            psergey Sergei Petrunia added a comment -

            Re: deb package fails to add user for debian-sys-maint
            It is possible to connect to the server and there one can see that indeed mysql.user table has no debian-sys-maint user.

            Failure to add user is because of the following:

            bakery/debian-5.1/dist/Ubuntu/mariadb-server-5.1.postinst has this command:
            replace_query=`/bin/echo -e \
            "USE mysql\n" \
            "REPLACE INTO user SET " \
            " host='localhost', user='debian-sys-maint', password=password('$pass'), " \
            " Select_priv='Y', Insert_priv='Y', Update_priv='Y', Delete_priv='Y', " \
            " Create_priv='Y', Drop_priv='Y', Reload_priv='Y', Shutdown_priv='Y', " \
            " Process_priv='Y', File_priv='Y', Grant_priv='Y', References_priv='Y', " \
            " Index_priv='Y', Alter_priv='Y', Super_priv='Y', Show_db_priv='Y', "\
            " Create_tmp_table_priv='Y', Lock_tables_priv='Y', Execute_priv='Y', "\
            " Repl_slave_priv='Y', Repl_client_priv='Y', Create_view_priv='Y', "\
            " Show_view_priv='Y', Create_routine_priv='Y', Alter_routine_priv='Y', "\
            " Create_user_priv='Y', Event_priv='Y', Trigger_priv='Y' "`;

            On a server with all-defaults configuration the command will succeed with three warnings:
            Field 'ssl_cipher' doesn't have a default value
            Field 'x509_issuer' doesn't have a default value
            Field 'x509_subject' doesn't have a default value

            However, ourdelta-mariadb51-2/bakery/debian-5.1/additions/my.cnf has this line:

            sql_mode = NO_ENGINE_SUBSTITUTION,TRADITIONAL

            Which will make those warnings to be errors, and the command won't succeed any more.

            Show
            psergey Sergei Petrunia added a comment - Re: deb package fails to add user for debian-sys-maint It is possible to connect to the server and there one can see that indeed mysql.user table has no debian-sys-maint user. Failure to add user is because of the following: bakery/debian-5.1/dist/Ubuntu/mariadb-server-5.1.postinst has this command: replace_query=`/bin/echo -e \ "USE mysql\n" \ "REPLACE INTO user SET " \ " host='localhost', user='debian-sys-maint', password=password('$pass'), " \ " Select_priv='Y', Insert_priv='Y', Update_priv='Y', Delete_priv='Y', " \ " Create_priv='Y', Drop_priv='Y', Reload_priv='Y', Shutdown_priv='Y', " \ " Process_priv='Y', File_priv='Y', Grant_priv='Y', References_priv='Y', " \ " Index_priv='Y', Alter_priv='Y', Super_priv='Y', Show_db_priv='Y', "\ " Create_tmp_table_priv='Y', Lock_tables_priv='Y', Execute_priv='Y', "\ " Repl_slave_priv='Y', Repl_client_priv='Y', Create_view_priv='Y', "\ " Show_view_priv='Y', Create_routine_priv='Y', Alter_routine_priv='Y', "\ " Create_user_priv='Y', Event_priv='Y', Trigger_priv='Y' "`; On a server with all-defaults configuration the command will succeed with three warnings: Field 'ssl_cipher' doesn't have a default value Field 'x509_issuer' doesn't have a default value Field 'x509_subject' doesn't have a default value However, ourdelta-mariadb51-2/bakery/debian-5.1/additions/my.cnf has this line: sql_mode = NO_ENGINE_SUBSTITUTION,TRADITIONAL Which will make those warnings to be errors, and the command won't succeed any more.
            Hide
            psergey Sergei Petrunia added a comment -

            Re: deb package fails to add user for debian-sys-maint
            The suggested fix is to add

            ssl_cipher='', x509_issuer='', x509_subject=''

            into replace_query.

            Show
            psergey Sergei Petrunia added a comment - Re: deb package fails to add user for debian-sys-maint The suggested fix is to add ssl_cipher='', x509_issuer='', x509_subject='' into replace_query.
            Hide
            knielsen Kristian Nielsen added a comment -

            Re: deb package fails to add user for debian-sys-maint
            The fix committed before only works in Ubuntu, there is a typo in the Debian version (missing comma ",").

            Have pushed a fix for this to lp:~maria-captains/ourdelta/ourdelta-montyprogram-fixes , will file a merge request.

            Show
            knielsen Kristian Nielsen added a comment - Re: deb package fails to add user for debian-sys-maint The fix committed before only works in Ubuntu, there is a typo in the Debian version (missing comma ","). Have pushed a fix for this to lp:~maria-captains/ourdelta/ourdelta-montyprogram-fixes , will file a merge request.
            Hide
            arjenlentz Arjen Lentz added a comment -

            Re: deb package fails to add user for debian-sys-maint
            Resolved in 5.1.39 build.

            Show
            arjenlentz Arjen Lentz added a comment - Re: deb package fails to add user for debian-sys-maint Resolved in 5.1.39 build.
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 454237

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 454237

              People

              • Assignee:
                Unassigned
                Reporter:
                psergey Sergei Petrunia
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: