You are not logged in.
Pages: 1
Topic closed
Hello.
I have a GLPI instance running, where I haven't touched it for a while.
Then when I tried to login to my admin account, it didn't have the administrative rights anymore.
I then proceeded to try and login to the GLPI user (This is not disabled), but here I just get told I use the wrong password.
Confused about this, I proceeded to look at how to reset the password for the GLPI user in the database, and I have found these two up until now:
forum.glpi-project.org/viewtopic.php?id=12725
techexpert.tips/glpi/glpi-password-recovery/
Neither of these have worked out for me, and I am now a little stuck.
I need to get back into the server, but I am a bit lost on how.
Any help is very appreciated.
Thanks.
Last edited by hAry2 (2020-05-20 16:53:51)
Offline
with glpi 9.4 :
update glpi_users set `password`='$2y$10$rXXzbc2ShaiCldwkw4AZL.n.9QSH7c0c9XJAyyjrbL9BwmWditAYm' where `id`='2'
will reset password to glpi for user glpi
Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1 Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6
Offline
There is no user in that table with the ID specified.
As a matter of fact, when I run the following in mariadb the entire table starts at ID: 473
select id,name,password from glpi_users;
I use LDAP, hence so many users. I do however have a user in LDAP called GLPI as well. Is that able to screw anything over. I cannot see any other GLPI default users in the database either.
Offline
INSERT INTO `glpi_users` (`id`, `name`, `password`, `list_limit`, `authtype`, `last_login`, `date_mod`)
VALUES ('2','glpi','$2y$10$rXXzbc2ShaiCldwkw4AZL.n.9QSH7c0c9XJAyyjrbL9BwmWditAYm','20','1','2014-06-18 08:02:24','2014-06-18 08:02:24');
Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1 Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6
Offline
if glpi user has no profile then :
INSERT INTO `glpi_profiles_users` VALUES ('2','2','4','0','1','0');
Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1 Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6
Offline
That kinda did the job.
I don't know how or why all of this happened in the first place, but running the SQL lines in your two replies did add the GLPI user again. I did though restore from an old backup I had lying around since all the other standard users were also missing, and somehow the permissions had fucked up as well.
Thank you for the help nonetheless.
Offline
Pages: 1
Topic closed