Skip to main content
Solved

can't change password

  • December 5, 2022
  • 21 replies
  • 7951 views

Forum|alt.badge.img+4

Hello,

I need your help, the password of my centreon has expired, so I have to change it but when I try to change it I get an error "Width must be an integer"

 

 

centreon 22.04 

Best answer by Ov3rFlo

Hi,

To change the default password, connect to your server as root and run this command:

[root@centreon-central ~]# mariadb -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 14
Server version: 10.5.15-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> use centreon;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [centreon]> INSERT INTO contact_password (password, contact_id, creation_date) VALUES ('$2y$10$ubq1hJ9z3YPXBhejjae.Ie9u3AcMrwFNImPhOnnkLmEoNtwRGwNrC', 1, (SELECT UNIX_TIMESTAMP(NOW())));
Query OK, 1 row affected (0.002 sec)

 

Now you can connect to Centreon with the login/password: admin/centreon

Don't forget to change this password by editing your profile !

21 replies

ponchoh
Centreonian
Forum|alt.badge.img+14
  • Centreonian
  • 531 replies
  • December 6, 2022

👋

 

@Kélian you can begin with this

 

or

 

Regarding the error, does the new password match your “password security policy” ?

🤞


lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • 1120 replies
  • December 8, 2022

Hi @Kélian did you have error in /var/log/php-fpm/centreon-error.log when you try to change password?


Forum|alt.badge.img+4
  • Author
  • Steward **
  • 29 replies
  • December 12, 2022

Hello @Laurent,

i just have one error for today

i’ve check if there is other log file but no


Forum|alt.badge.img+4
  • Author
  • Steward **
  • 29 replies
  • December 12, 2022

👋

 

@Kélian you can begin with this

 

or

 

Regarding the error, does the new password match your “password security policy” ?

🤞

Hello @ponchoh,

I’ve already check this, i have found with this topic how i can modify the database to regain access, and i have update manually the timestamp of the expiration of the password.

For the password security policy it’s a generated password like the oldest.

 


Forum|alt.badge.img+4
  • Steward **
  • 8 replies
  • December 30, 2022

I have the same problem. Where you able to solve this?


Forum|alt.badge.img+4
  • Author
  • Steward **
  • 29 replies
  • December 30, 2022

I have the same problem. Where you able to solve this?

Hello Thomas,

 

i have updated the timestamp of the password un the database


Forum|alt.badge.img+5
  • Centreonian
  • 19 replies
  • January 11, 2023

Hi, we are able to reproduce the bug and have certainly found the root cause of this issue. We’ll start to develop a patch for this soon.


Forum|alt.badge.img+2
  • Steward *
  • 5 replies
  • January 23, 2023

Hi, 

Could you please describe how to get rid of this issue? 

Thank you and regards,
Luis Miguel.

 


Forum|alt.badge.img
  • Steward *
  • 1 reply
  • Answer
  • January 30, 2023

Hi,

To change the default password, connect to your server as root and run this command:

[root@centreon-central ~]# mariadb -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 14
Server version: 10.5.15-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> use centreon;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [centreon]> INSERT INTO contact_password (password, contact_id, creation_date) VALUES ('$2y$10$ubq1hJ9z3YPXBhejjae.Ie9u3AcMrwFNImPhOnnkLmEoNtwRGwNrC', 1, (SELECT UNIX_TIMESTAMP(NOW())));
Query OK, 1 row affected (0.002 sec)

 

Now you can connect to Centreon with the login/password: admin/centreon

Don't forget to change this password by editing your profile !


Forum|alt.badge.img
  • Steward *
  • 1 reply
  • January 31, 2023

Any news on when this issue is resolved?
is this bugreport in a publicstate or in your internal github?


Forum|alt.badge.img+2
  • Steward *
  • 5 replies
  • February 23, 2023

Hi,

To change the default password, connect to your server as root and run this command:

 

 

Nice, it worked like a charm! 

I just can't believe the appliance comes with this issue, thank you very much for the code.
 

Don't forget to change this password by editing your profile !

 

Sorry, I don’t understand what you meant here. What profile?

 

Kind regards,

LM


ponchoh
Centreonian
Forum|alt.badge.img+14
  • Centreonian
  • 531 replies
  • February 23, 2023

@gianola I think they mean to change your admin password to the one that you want. 😎:spy:


Forum|alt.badge.img+2
  • Steward *
  • 5 replies
  • February 23, 2023

@gianola I think they mean to change your admin password to the one that you want. 😎🕵️️‍♂️

 

I guess you are right, thanks! :-) 

 

 


lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • 1120 replies
  • February 24, 2023

 

Nice, it worked like a charm! 

I just can't believe the appliance comes with this issue, thank you very much for the code.

I'm not sure I understand.

Centreon install a default security policy. This one ask for 12 characters including lowercase uppercase number and special characters. So if you don’t change it, your new password must matchs this policy.


Forum|alt.badge.img+6
  • Steward **
  • 11 replies
  • April 12, 2023

@Laurent I faced the same problem not installing a new centreon but upgrading it. My users already have their own password. But when their password expires, they cannot change it. It's just because they are not aware of the new password policy. However, they have no chance of knowing that the error is related to this because the message has nothing to do with the error. Can you seriously imagine a user being able to figure out what to do with that kind of message : "Width must be an integer" ? My first reflex was not to see the password policy but to look at the state of the database.


lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • 1120 replies
  • April 12, 2023

Hi @coolrider , we will improve error message but we can’t, for security reason, explain the policy.


Forum|alt.badge.img+6
  • Steward **
  • 11 replies
  • April 12, 2023

I understand but just indicate “your password don’t match the password policy” is enough. 

Thank you.


Forum|alt.badge.img+2
  • Steward *
  • 5 replies
  • August 30, 2023

I’m not able to change admin password from web panel as an error message tells me the password is not expired. Can’t force it?

Thx for your help.

 


lpinsivy
Centreonian
Forum|alt.badge.img+21
  • Centreonian
  • 1120 replies
  • August 31, 2023

HI @glg which version of Centreon do you use?


Forum|alt.badge.img+2
  • Steward *
  • 5 replies
  • September 21, 2023

HI @glg which version of Centreon do you use?

Centreon 23.04.7

 

Hi @Laurent !

Guess what i managed to update password with:

 

SELECT contact_id, contact_name FROM centreon.contact;

USE centreon;

UPDATE contact_password SET password = md5('newone') WHERE contact_id = 1;

 

But i can’t get rid of the last critical error concerning centreon-engine

centreon-central service:

CRITICAL: Cannot connect: Access denied for user 'centreon-engine'@'localhost'

Unable to hide passwords in command (Reason: Configuration has changed)

 

Does it make sense?

 

Best Regards

 

Gilles


Forum|alt.badge.img+2
  • Steward *
  • 5 replies
  • September 21, 2023

HI @glg which version of Centreon do you use?

NB: the service which is yelling is connection-time