Ad Widget

Collapse

Encrypt DB password connect to mysql db in zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rahul.kolan@gmail.com
    Junior Member
    • Nov 2017
    • 2

    #1

    Encrypt DB password connect to mysql db in zabbix

    As per company policy should not use plain text password any where in server .
    in zabbix server i found plain text password in /etc/zabbix/web/zabbix.conf.php ,i need help to encrypt this password.using database mariadb.

    below the configuration file :-
    =======================
    <?php
    // Zabbix GUI configuration file.
    global $DB;

    $DB['TYPE'] = 'MYSQL';
    $DB['SERVER'] = 'localhost';
    $DB['PORT'] = '3306';
    $DB['DATABASE'] = 'zabbix';
    $DB['USER'] = 'root';
    $DB['PASSWORD'] = 'zabbix';

    // Schema name. Used for DB2 and PostgreSQL.
    $DB['SCHEMA'] = '';

    $ZBX_SERVER = 'server1';
    $ZBX_SERVER_PORT = '10051';
    $ZBX_SERVER_NAME = 'server1';

    $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;
    ================================



  • vesper1978
    Member
    • Nov 2016
    • 59

    #2
    You're not going to be able to encrypt the DB password in the zabbix.conf.php. What you'd be better off doing is setting it so that the only user that can read the file is the user that the web server runs as.

    Comment

    Working...