/[smecontribs]/rpms/smeserver-zabbix-server/contribs10/smeserver-zabbix-server-0.1-bz11749-adminpass.patch
ViewVC logotype

Contents of /rpms/smeserver-zabbix-server/contribs10/smeserver-zabbix-server-0.1-bz11749-adminpass.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Tue Nov 9 05:20:12 2021 UTC (2 years, 11 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-zabbix-server-0_1-31_el7_sme, smeserver-zabbix-server-0_1-29_el7_sme, smeserver-zabbix-server-0_1-30_el7_sme, HEAD
* Tue Nov 09 2021 Jean-Philippe Pialasse <tests@pialasse.com> 0.1-29.sme
- set random password to Admin i fuser exists and password is zabbix [SME: 11749]

1 diff -Nur --no-dereference smeserver-zabbix-server-0.1.old/root/etc/e-smith/db/configuration/migrate/zabbix-server-database smeserver-zabbix-server-0.1/root/etc/e-smith/db/configuration/migrate/zabbix-server-database
2 --- smeserver-zabbix-server-0.1.old/root/etc/e-smith/db/configuration/migrate/zabbix-server-database 2021-11-08 23:59:33.595000000 -0500
3 +++ smeserver-zabbix-server-0.1/root/etc/e-smith/db/configuration/migrate/zabbix-server-database 2021-11-09 00:05:12.898000000 -0500
4 @@ -29,5 +29,10 @@
5 }
6 $rec->set_prop('DbPassword', $pw);
7 }
8 +
9 + my $AdminPass = $rec->prop('AdminPassword') ||
10 + $rec->set_prop('AdminPassword', `/usr/bin/openssl rand -base64 15 | /usr/bin/tr -c -d '[:graph:]'`);
11 +
12 +
13 }
14
15 diff -Nur --no-dereference smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/e-smith/sql/init/80zabbix-server smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/e-smith/sql/init/80zabbix-server
16 --- smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/e-smith/sql/init/80zabbix-server 2021-11-08 23:59:33.725000000 -0500
17 +++ smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/e-smith/sql/init/80zabbix-server 2021-11-09 00:13:00.980000000 -0500
18 @@ -7,6 +7,7 @@
19 chomp $schema;
20 my $curcharset= ( -d "/var/lib/mysql/$db" ) ? `echo 'show variables like "character_set_database";'|mysql $db|grep character_set_database|sed -r 's/^character_set_database\\s*([a-zA-Z0-9_-]+)/\\1/'` : "utf8";
21 chomp $curcharset;
22 +my $adminpass= ${'zabbix-server'}{'AdminPassword'} || 'zabbix';
23
24 $OUT .= <<"END";
25 #! /bin/sh
26 @@ -28,6 +29,12 @@
27 fi
28
29 /usr/bin/mysql <<EOF
30 +USE $db;
31 +update users set passwd=md5('$adminpass') where alias='Admin' and passwd=md5('zabbix');
32 +EOF
33 +
34 +
35 +/usr/bin/mysql <<EOF
36 USE mysql;
37
38 REPLACE INTO user (

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed