initial commit of file from CVS for smeserver-mysql on Sat Mar 23 16:06:28 AEDT 2024
This commit is contained in:
12
root/etc/e-smith/templates/var/lib/mysql/set.password
Normal file
12
root/etc/e-smith/templates/var/lib/mysql/set.password
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
use esmith::util;
|
||||
|
||||
my $pw = esmith::util::LdapPassword();
|
||||
|
||||
$OUT .= "use mysql;\n";
|
||||
$OUT .= "ALTER TABLE user MODIFY Password char(41) NOT NULL default '';\n";
|
||||
$OUT .= "UPDATE user SET password=password('$pw') WHERE user='root';\n";
|
||||
$OUT .= "DELETE FROM db WHERE user='';\n";
|
||||
$OUT .= "DELETE FROM user WHERE user='';\n";
|
||||
$OUT .= "FLUSH PRIVILEGES;\n";
|
||||
}
|
9
root/etc/e-smith/templates/var/lib/mysql/set.password2
Normal file
9
root/etc/e-smith/templates/var/lib/mysql/set.password2
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
use esmith::util;
|
||||
|
||||
my $pw = esmith::util::LdapPassword();
|
||||
|
||||
$OUT .= "use mysql;\n";
|
||||
$OUT .= "SET PASSWORD FOR 'root'\@localhost = PASSWORD(\"$pw\"); \n";
|
||||
$OUT .= "FLUSH PRIVILEGES;\n";
|
||||
}
|
Reference in New Issue
Block a user