Remove other default accounts due to security reasons
This commit is contained in:
parent
995a291afa
commit
d31940e3f0
2 changed files with 10 additions and 0 deletions
8
manifests/server/account_security.pp
Normal file
8
manifests/server/account_security.pp
Normal 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'],
|
||||
}
|
||||
}
|
|
@ -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}" |>>
|
||||
|
|
Loading…
Reference in a new issue