Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove default install root password if set #682

Merged
merged 1 commit into from
Aug 6, 2015

Conversation

JCotton1123
Copy link
Contributor

I haven't written any tests for this PR b/c I wasn't sure you'd be willing to merge it. If you're OK with this approach, I will write tests. If you're not, please provide some feedback on an alternate way to address this "feature".

New installations of MySQL will configure a default random password for the root user with an expiration. See http://datacharmer.blogspot.com/2012/11/mysql-568-broken-compatibility-ahead.html. Until the root password is changed, no actions can be performed. This PR adds detection of the mysql_secret file and removes this password. If the user desires to set a password it will be configured by the mysql_user resource further down in the mysql::server::root_password class.

@igalic
Copy link
Contributor

igalic commented Mar 5, 2015

i'm really unclear about the mechanics of this.

@@ -6,6 +6,7 @@
$purge_conf_dir = false
$restart = false
$root_password = 'UNSET'
$install_secret_file = '/.mysql_secret'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this supposed to be /, rather than /root/ ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When Puppet installs the MySQL-server package this file seems to end up at /.mysql_secret

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on which platform? which mysql flavour?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CentOS, Oracle MySQL

If you install the package manually the file ends up at /root/.mysql_secret, but when puppet installs it the file ends up at /.mysql_secret. At least in my initial tests. I'll ensure I write a test to cover this.

@JCotton1123 JCotton1123 force-pushed the process-secret-file branch 2 times, most recently from 21cdc6b to d915e37 Compare March 16, 2015 19:01
@JCotton1123
Copy link
Contributor Author

Hi, this has been hanging around for a while. Can you please let me know if it needs any additional work to make it mergable.

@igalic
Copy link
Contributor

igalic commented May 4, 2015

@JCotton1123 thanks for the reminder.

jonnytdevops added a commit that referenced this pull request Aug 6, 2015
Remove default install root password if set
@jonnytdevops jonnytdevops merged commit ced1a08 into puppetlabs:master Aug 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants