-
Notifications
You must be signed in to change notification settings - Fork 794
Remove default install root password if set #682
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
Conversation
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' |
There was a problem hiding this comment.
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/
?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
21cdc6b
to
d915e37
Compare
d915e37
to
a26b80d
Compare
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. |
@JCotton1123 thanks for the reminder. |
Remove default install root password if set
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.