Remove other default accounts due to security reasons

This commit is contained in:
mh 2011-02-25 17:27:19 +01:00
parent 995a291afa
commit d31940e3f0
2 changed files with 10 additions and 0 deletions

View file

@ -0,0 +1,8 @@
class mysql::server::account_security {
# some installations have some default users which are not required.
# We remove them here. You can subclass this class to overwrite this behavior.
mysql_user{ [ "root@${fqdn}", "root@127.0.0.1", "@${fqdn}", "@localhost", "@%" ]:
ensure => 'absent',
require => Service['mysql'],
}
}

View file

@ -76,6 +76,8 @@ class mysql::server::base {
require => Package['mysql-server'],
}
include mysql::server::account_security
# Collect all databases and users
Mysql_database<<| tag == "mysql_${fqdn}" |>>
Mysql_user<<| tag == "mysql_${fqdn}" |>>