[CentOS 7 + FOG1.5.5] Password MariaDB FOG + Password WEB



  • Hello to the FOG team,
    I just installed my FOG server version 1.5.5 on a CentOS 7.

    I am deploying a FOG server and I am having some difficulties that I am going to expose you.

    1. I would like to change the FOG password of the web interface. From which file can we make and which commands?
      I found on the wikifog: https: //wiki.fogproject.org/wiki/index.php? Title = Password_Central
      mysql -D fog
      INSERT INTO users (uName, uPass, uCreateDate, uCreateBy, uType, uDisplay, uAllowAPI, uAPitoken) VALUES (‘fog’, ‘00’, ‘localAdmin’, 0, ‘fog’, 1, ‘’);
      to leave

    Is there another method?

    1. I would like to add a password to the database via this execution sequence:
      mysql
      ALTER USER ‘root’ @ ‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘’;

    You must know the password in two files: “define (” MYSQL_PASSWORD “,” “);”

    • /var/www/fog/commons/config.php. This file is missing in my server.
    • /opt/fog/service/etc/config.php. This file contains 1 line
      <? php define (‘WEBROOT’, ‘/ var / www / html / fog /’);

    So I think this method is not correct.

    On the net, I found this sequence to confirm that this one is the good one.

    To secure the DBMS, run the mysql_secure_installation command:
    mysql_secure_installation

    And answer the questions as follows:
    Enter the current password for root (enter for none): (press the Enter key directly on the keyboard)

    Set a root password? [Y / n] Y
    New password: MdpROOTsql
    Re-enter the new password: MdpROOTsql
    Delete anonymous users? [Y / n] Y
    Prohibit remote root connection? [Y / n] Y
    Delete the test database and access it? [Y / n] Y
    Reload the privilege tables now? [Y / n] Y

    Configuring the new FOG mysql root password
    Edit the file /opt/fog/.fogsettings and enter the password on line 21:
    nano /opt/fog/.fogsettings
    snmysqlpass = ‘MdpROOTsql’

    Edit the file /var/www/fog/lib/fog/config.class.php and enter the password on line 50:
    nano /var/www/fog/lib/fog/config.class.php
    define (‘DATABASE_PASSWORD’, “MdpROOTsql”);

    Thank you for your answers and help with my request.
    Guillaume



  • @Quazz

    Perfect,
    You resolv my problems.

    The first step OK :
    Web Interface -> Users -> List ALL Users -> fog -> Change password

    The second point OK :
    Edit the file /var/www/fog/lib/fog/config.class.php:

    nano /var/www/fog/lib/fog/config.class.php
    define (‘DATABASE_PASSWORD’, “MdpROOTsql”);
    

    The FOG server is still functional in the Web and the database requires a password to enter!

    Everything is good for this open ticket. I thank you for the efficiency of your response.

    Continue like this.
    Best regards.



  • This post is deleted!


  • This post is deleted!

  • Moderator

    @Guillaume-IT You need to edit two files

    /opt/fog/.fogsettings (edit snmysqlpass)
    

    and

    /var/www/fog/lib/fog/config.class.php (edit define (‘DATABASE_PASSWORD’, “MdpROOTsql”);)
    


  • @Quazz Thank you for your answer. You resolve the first point. But for second point can you help me?


  • Moderator

    You can change the password on the Web UI for any account, including fog from the users menu on the Web UI.

    As for the MySQL password, it says what to do

    Configuring the new FOG mysql root password
    Edit the file /opt/fog/.fogsettings and enter the password on line 21:
    nano /opt/fog/.fogsettings
    snmysqlpass = ‘MdpROOTsql’
    
    Edit the file /var/www/fog/lib/fog/config.class.php and enter the password on line 50:
    nano /var/www/fog/lib/fog/config.class.php
    define (‘DATABASE_PASSWORD’, “MdpROOTsql”);
    

Log in to reply
 

450
Online

6.2k
Users

13.6k
Topics

128.0k
Posts