Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-7187

puppetlabs-mysql : Allow empty root password

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: accounts, mysql
    • Labels:
      None
    • Environment:

      Module Branch: master

      Puppet: 5.5.1

    • Template:
      MODULES Bug Template
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      PR: https://github.com/puppetlabs/puppetlabs-mysql/pull/1075

       

      The root@localhost user got no password by default.

      The module is only able to set a password at this time but can`t set it back to an empty password.

      This PR fixes this, cause the user_provider checks for an correct mysql_native_password but does not allow an empty password.

       

      Changes: Allow empty user / root password.

       

      Before this PR: Can`t set empty passwords cause of the mysql_user provider failure:
      Error: Only mysql_native_password (*ABCD...XXX) hashes are supported.
      Error: /Stage[main]/Mysql::Server::Root_password/Mysql_user[root@localhost]/password_hash: change from [old password hash redacted] to [new password hash redacted] failed: Only mysql_native_password (*ABCD...XXX) hashes are supported.

      After this PR: Can set empty passwords cause regex of mysql_user providers password check extended:
      Info: /Stage[main]/Mysql::Server::Root_password/File[/root/.my.cnf]: Filebucketed /root/.my.cnf to puppet with sum 9d96b07caeee3d0e3e7fb49e0f891860
      Notice: /Stage[main]/Mysql::Server::Root_password/File[/root/.my.cnf]/content: content changed '{md5}9d96b07caeee3d0e3e7fb49e0f891860' to '{md5}337598bf15a160df1e57d2d90d5bc426'
      [root@vmxxxxxx ~]# cat /root/.my.cnf

          1. MANAGED BY PUPPET ###

      [mysql]
      user=root
      host=localhost
      password=''
      socket=/tmp/mysql.sock

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            Disappear89 Thomas
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support